From 900765f42d1c88f4ad1a2339af305b6916d03fb4 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Wed, 12 Jun 2024 20:13:03 +0000 Subject: [PATCH 1/2] Remove generated site files --- .gitignore | 7 +- docs/APIHashable.html | 384 - docs/AbstractCoreTap.html | 625 - docs/AbstractDownloadStrategy.html | 1087 - docs/AbstractDownloadStrategy/Pourable.html | 203 - docs/AbstractFileDownloadStrategy.html | 486 - docs/ArchRequirement.html | 537 - docs/Array.html | 922 - docs/Attr.html | 320 - docs/Attrable.html | 317 - docs/BazaarDownloadStrategy.html | 438 - docs/Bottle.html | 1174 - docs/Bottle/Filename.html | 1056 - docs/BottleFormulaUnavailableError.html | 229 - docs/BottleSpecification.html | 1482 - docs/Build.html | 1242 - docs/BuildEnvironment.html | 742 - docs/BuildEnvironment/DSL.html | 307 - docs/BuildError.html | 1005 - docs/BuildFlagsError.html | 265 - docs/BuildOptions.html | 897 - docs/CVSDownloadStrategy.html | 389 - docs/Cachable.html | 289 - docs/CacheStore.html | 495 - docs/CacheStoreDatabase.html | 1089 - docs/CannotInstallFormulaError.html | 122 - docs/Cask.html | 131 - docs/Cask/AbstractCaskErrorWithToken.html | 419 - docs/Cask/Artifact.html | 130 - docs/Cask/Artifact/AbstractArtifact.html | 1061 - docs/Cask/Artifact/AbstractFlightBlock.html | 683 - docs/Cask/Artifact/AbstractUninstall.html | 648 - docs/Cask/Artifact/App.html | 197 - docs/Cask/Artifact/Artifact.html | 533 - docs/Cask/Artifact/AudioUnitPlugin.html | 197 - docs/Cask/Artifact/Binary.html | 293 - docs/Cask/Artifact/Colorpicker.html | 197 - docs/Cask/Artifact/Dictionary.html | 197 - docs/Cask/Artifact/Font.html | 197 - docs/Cask/Artifact/InputMethod.html | 197 - docs/Cask/Artifact/Installer.html | 762 - .../Artifact/Installer/ManualInstaller.html | 223 - .../Artifact/Installer/ScriptInstaller.html | 226 - docs/Cask/Artifact/InternetPlugin.html | 197 - docs/Cask/Artifact/KeyboardLayout.html | 348 - docs/Cask/Artifact/Manpage.html | 533 - docs/Cask/Artifact/Mdimporter.html | 374 - docs/Cask/Artifact/Moved.html | 501 - docs/Cask/Artifact/Pkg.html | 625 - docs/Cask/Artifact/PostflightBlock.html | 189 - docs/Cask/Artifact/PreflightBlock.html | 189 - docs/Cask/Artifact/Prefpane.html | 292 - docs/Cask/Artifact/Qlplugin.html | 441 - docs/Cask/Artifact/Relocated.html | 768 - docs/Cask/Artifact/ScreenSaver.html | 197 - docs/Cask/Artifact/Service.html | 197 - docs/Cask/Artifact/StageOnly.html | 432 - docs/Cask/Artifact/Suite.html | 370 - docs/Cask/Artifact/Symlinked.html | 591 - docs/Cask/Artifact/Uninstall.html | 373 - docs/Cask/Artifact/Vst3Plugin.html | 292 - docs/Cask/Artifact/VstPlugin.html | 292 - docs/Cask/Artifact/Zap.html | 288 - docs/Cask/ArtifactSet.html | 290 - docs/Cask/Audit.html | 1435 - docs/Cask/Auditor.html | 653 - docs/Cask/Cache.html | 213 - docs/Cask/Cask.html | 5364 --- docs/Cask/CaskAlreadyCreatedError.html | 169 - docs/Cask/CaskCannotBeInstalledError.html | 326 - docs/Cask/CaskConflictError.html | 326 - docs/Cask/CaskCyclicDependencyError.html | 173 - docs/Cask/CaskError.html | 141 - docs/Cask/CaskInvalidError.html | 173 - docs/Cask/CaskLoader.html | 687 - .../CaskLoader/AbstractContentLoader.html | 346 - docs/Cask/CaskLoader/FromAPILoader.html | 1270 - docs/Cask/CaskLoader/FromContentLoader.html | 454 - .../CaskLoader/FromInstalledPathLoader.html | 317 - docs/Cask/CaskLoader/FromInstanceLoader.html | 435 - docs/Cask/CaskLoader/FromNameLoader.html | 368 - docs/Cask/CaskLoader/FromPathLoader.html | 730 - docs/Cask/CaskLoader/FromTapLoader.html | 615 - docs/Cask/CaskLoader/FromURILoader.html | 583 - docs/Cask/CaskLoader/ILoader.html | 243 - docs/Cask/CaskLoader/NullLoader.html | 478 - docs/Cask/CaskNotInstalledError.html | 169 - docs/Cask/CaskQuarantineError.html | 393 - docs/Cask/CaskQuarantinePropagationError.html | 169 - docs/Cask/CaskQuarantineReleaseError.html | 169 - .../CaskSelfReferencingDependencyError.html | 177 - docs/Cask/CaskTokenMismatchError.html | 250 - docs/Cask/CaskUnavailableError.html | 173 - docs/Cask/CaskUnreadableError.html | 177 - docs/Cask/CaskUnspecifiedError.html | 145 - docs/Cask/Caskroom.html | 571 - docs/Cask/Config.html | 1685 - docs/Cask/DSL.html | 3222 -- docs/Cask/DSL/Base.html | 388 - docs/Cask/DSL/Caveats.html | 561 - docs/Cask/DSL/ConflictsWith.html | 339 - docs/Cask/DSL/Container.html | 516 - docs/Cask/DSL/DependsOn.html | 670 - docs/Cask/DSL/Postflight.html | 197 - docs/Cask/DSL/Preflight.html | 197 - docs/Cask/DSL/UninstallPostflight.html | 164 - docs/Cask/DSL/UninstallPreflight.html | 197 - docs/Cask/DSL/Version.html | 1545 - docs/Cask/Denylist.html | 238 - docs/Cask/Download.html | 1052 - docs/Cask/Info.html | 703 - docs/Cask/Installer.html | 5129 -- docs/Cask/List.html | 345 - docs/Cask/Metadata.html | 560 - docs/Cask/Migrator.html | 810 - docs/Cask/MultipleCaskErrors.html | 233 - docs/Cask/Pkg.html | 1135 - docs/Cask/Quarantine.html | 1359 - docs/Cask/Reinstall.html | 261 - docs/Cask/Staged.html | 377 - docs/Cask/TapCaskAmbiguityError.html | 453 - docs/Cask/TapCaskUnavailableError.html | 334 - docs/Cask/URL.html | 961 - docs/Cask/URL/BlockDSL.html | 428 - docs/Cask/URL/BlockDSL/PageWithURL.html | 216 - docs/Cask/URL/DSL.html | 1565 - docs/Cask/Uninstall.html | 231 - docs/Cask/Upgrade.html | 900 - docs/Cask/Utils.html | 906 - docs/CaskDependent.html | 901 - docs/CaskDependent/Requirement.html | 213 - docs/CaskDescriptionCacheStore.html | 502 - docs/CaskLock.html | 236 - docs/Caveats.html | 701 - docs/Checksum.html | 673 - docs/ChecksumMismatchError.html | 319 - docs/ChecksumMissingError.html | 137 - docs/ChildProcessError.html | 393 - docs/Cleaner.html | 414 - docs/CodesignRequirement.html | 406 - docs/Commands.html | 2272 - docs/CompilerConstants.html | 214 - docs/CompilerFailure.html | 638 - docs/CompilerSelectionError.html | 228 - docs/CompilerSelector.html | 893 - docs/CompilerSelector/Compiler.html | 413 - docs/Context.html | 644 - docs/Context/ContextStruct.html | 462 - docs/CoreCaskTap.html | 997 - docs/CoreTap.html | 2205 - docs/CurlApacheMirrorDownloadStrategy.html | 303 - docs/CurlDownloadStrategy.html | 698 - docs/CurlDownloadStrategyError.html | 235 - docs/CurlGitHubPackagesDownloadStrategy.html | 389 - docs/CurlPostDownloadStrategy.html | 232 - docs/CxxStdlib.html | 542 - docs/CyclicDependencyError.html | 227 - docs/DATAPatch.html | 422 - docs/Debrew.html | 554 - docs/Debrew/Formula.html | 330 - docs/Debrew/Menu.html | 590 - docs/Debrew/Menu/Entry.html | 324 - docs/Dependable.html | 1018 - docs/Dependencies.html | 634 - docs/DependenciesHelpers.html | 515 - docs/Dependency.html | 1622 - docs/DependencyCollector.html | 1652 - docs/DeprecateDisable.html | 449 - docs/DeprecatedOption.html | 536 - docs/DescriptionCacheStore.html | 885 - docs/Descriptions.html | 428 - docs/DevelopmentTools.html | 2004 - docs/DiskUsageExtension.html | 395 - docs/DownloadError.html | 313 - docs/DownloadStrategyDetector.html | 454 - docs/Downloadable.html | 1433 - docs/DuplicateResourceError.html | 221 - docs/ELFShim.html | 1368 - docs/ENV.html | 217 - docs/EmbeddedPatch.html | 590 - docs/Enumerable.html | 324 - docs/EnvActivation.html | 713 - docs/ErrorDuringExecution.html | 646 - docs/ExternalPatch.html | 650 - docs/FalseClass.html | 289 - docs/File.html | 329 - docs/Formatter.html | 957 - docs/Formula.html | 28862 ----------- docs/FormulaAmbiguousPythonError.html | 233 - docs/FormulaCellarChecks.html | 3220 -- docs/FormulaClassUnavailableError.html | 279 - docs/FormulaClassUnavailableErrorModule.html | 349 - docs/FormulaConflict.html | 325 - docs/FormulaConflictError.html | 556 - docs/FormulaInfo.html | 953 - ...mulaInstallationAlreadyAttemptedError.html | 221 - docs/FormulaInstaller.html | 8559 ---- docs/FormulaLock.html | 236 - docs/FormulaOrCaskUnavailableError.html | 417 - docs/FormulaOrCaskUnspecifiedError.html | 234 - docs/FormulaPin.html | 717 - docs/FormulaSpecificationError.html | 122 - docs/FormulaUnavailableError.html | 340 - docs/FormulaUnknownPythonError.html | 233 - docs/FormulaUnreadableError.html | 277 - docs/FormulaUnreadableErrorModule.html | 206 - docs/FormulaUnspecifiedError.html | 234 - docs/FormulaValidationError.html | 379 - docs/FormulaVersions.html | 526 - docs/Formulary.html | 3952 -- docs/Formulary/FormulaContentsLoader.html | 407 - docs/Formulary/FormulaLoader.html | 800 - docs/Formulary/FromAPILoader.html | 550 - docs/Formulary/FromBottleLoader.html | 523 - docs/Formulary/FromCacheLoader.html | 314 - docs/Formulary/FromKegLoader.html | 314 - docs/Formulary/FromNameLoader.html | 366 - docs/Formulary/FromPathLoader.html | 515 - docs/Formulary/FromTapLoader.html | 806 - docs/Formulary/FromURILoader.html | 628 - docs/Formulary/NullLoader.html | 485 - docs/Formulary/PathnameWriteMkpath.html | 117 - docs/FossilDownloadStrategy.html | 505 - docs/GitDownloadStrategy.html | 458 - docs/GitHub.html | 5478 --- docs/GitHub/API.html | 1393 - .../GitHub/API/AuthenticationFailedError.html | 280 - docs/GitHub/API/Error.html | 223 - docs/GitHub/API/HTTPNotFoundError.html | 236 - .../API/MissingAuthenticationError.html | 234 - docs/GitHub/API/RateLimitExceededError.html | 315 - docs/GitHub/API/ValidationFailedError.html | 246 - docs/GitHub/Actions.html | 579 - docs/GitHub/Actions/Annotation.html | 588 - docs/GitHubArtifactDownloadStrategy.html | 385 - docs/GitHubGitDownloadStrategy.html | 584 - docs/GitHubPackages.html | 951 - docs/GitHubReleases.html | 322 - docs/GitHubRunner.html | 1003 - docs/GitHubRunnerMatrix.html | 443 - docs/GitRepository.html | 1684 - docs/Hardware.html | 464 - docs/Hardware/CPU.html | 3277 -- docs/Hash.html | 1585 - docs/HeadSoftwareSpec.html | 293 - docs/Homebrew.html | 3567 -- docs/Homebrew/API.html | 1035 - docs/Homebrew/API/Analytics.html | 323 - docs/Homebrew/API/Cask.html | 631 - docs/Homebrew/API/Download.html | 468 - docs/Homebrew/API/DownloadStrategy.html | 330 - docs/Homebrew/API/Formula.html | 905 - docs/Homebrew/AbstractCommand.html | 852 - docs/Homebrew/Assertions.html | 402 - docs/Homebrew/Attestation.html | 821 - docs/Homebrew/Attestation/GhAuthNeeded.html | 138 - .../Attestation/InvalidAttestationError.html | 137 - docs/Homebrew/BumpVersionParser.html | 837 - docs/Homebrew/BundleVersion.html | 889 - docs/Homebrew/CLI.html | 129 - docs/Homebrew/CLI/Args.html | 2197 - docs/Homebrew/CLI/InvalidConstraintError.html | 257 - docs/Homebrew/CLI/MaxNamedArgumentsError.html | 277 - docs/Homebrew/CLI/MinNamedArgumentsError.html | 267 - docs/Homebrew/CLI/NamedArgs.html | 2029 - .../CLI/NumberOfNamedArgumentsError.html | 267 - docs/Homebrew/CLI/OptionConflictError.html | 248 - docs/Homebrew/CLI/OptionConstraintError.html | 280 - docs/Homebrew/CLI/Parser.html | 3433 -- docs/Homebrew/Cleanup.html | 3897 -- docs/Homebrew/Cmd.html | 129 - docs/Homebrew/Cmd/Analytics.html | 357 - docs/Homebrew/Cmd/Analytics/Args.html | 170 - docs/Homebrew/Cmd/Autoremove.html | 321 - docs/Homebrew/Cmd/Autoremove/Args.html | 335 - docs/Homebrew/Cmd/Cache.html | 496 - docs/Homebrew/Cmd/Cache/Args.html | 1001 - docs/Homebrew/Cmd/Caskroom.html | 422 - docs/Homebrew/Cmd/Caskroom/Args.html | 170 - docs/Homebrew/Cmd/Cellar.html | 418 - docs/Homebrew/Cmd/Cellar/Args.html | 170 - docs/Homebrew/Cmd/CleanupCmd.html | 387 - docs/Homebrew/Cmd/CleanupCmd/Args.html | 631 - docs/Homebrew/Cmd/Command.html | 329 - docs/Homebrew/Cmd/Command/Args.html | 170 - docs/Homebrew/Cmd/CommandsCmd.html | 357 - docs/Homebrew/Cmd/CommandsCmd/Args.html | 261 - docs/Homebrew/Cmd/CompletionsCmd.html | 351 - docs/Homebrew/Cmd/CompletionsCmd/Args.html | 170 - docs/Homebrew/Cmd/Config.html | 321 - docs/Homebrew/Cmd/Config/Args.html | 170 - docs/Homebrew/Cmd/Deps.html | 533 - docs/Homebrew/Cmd/Deps/Args.html | 2111 - docs/Homebrew/Cmd/Desc.html | 381 - docs/Homebrew/Cmd/Desc/Args.html | 927 - docs/Homebrew/Cmd/Developer.html | 369 - docs/Homebrew/Cmd/Developer/Args.html | 170 - docs/Homebrew/Cmd/Docs.html | 321 - docs/Homebrew/Cmd/Docs/Args.html | 170 - docs/Homebrew/Cmd/Doctor.html | 411 - docs/Homebrew/Cmd/Doctor/Args.html | 409 - docs/Homebrew/Cmd/Env.html | 450 - docs/Homebrew/Cmd/Env/Args.html | 335 - docs/Homebrew/Cmd/FetchCmd.html | 589 - docs/Homebrew/Cmd/FetchCmd/Args.html | 1445 - docs/Homebrew/Cmd/GistLogs.html | 341 - docs/Homebrew/Cmd/GistLogs/Args.html | 557 - docs/Homebrew/Cmd/HelpCmd.html | 321 - docs/Homebrew/Cmd/HelpCmd/Args.html | 170 - docs/Homebrew/Cmd/Home.html | 345 - docs/Homebrew/Cmd/Home/Args.html | 483 - docs/Homebrew/Cmd/Info.html | 520 - docs/Homebrew/Cmd/Info/Args.html | 1149 - docs/Homebrew/Cmd/InstallCmd.html | 799 - docs/Homebrew/Cmd/InstallCmd/Args.html | 3961 -- docs/Homebrew/Cmd/Leaves.html | 341 - docs/Homebrew/Cmd/Leaves/Args.html | 483 - docs/Homebrew/Cmd/Link.html | 499 - docs/Homebrew/Cmd/Link/Args.html | 631 - docs/Homebrew/Cmd/List.html | 487 - docs/Homebrew/Cmd/List/Args.html | 1149 - docs/Homebrew/Cmd/Log.html | 347 - docs/Homebrew/Cmd/Log/Args.html | 1001 - docs/Homebrew/Cmd/Migrate.html | 335 - docs/Homebrew/Cmd/Migrate/Args.html | 779 - docs/Homebrew/Cmd/Missing.html | 351 - docs/Homebrew/Cmd/Missing/Args.html | 261 - docs/Homebrew/Cmd/NodenvSync.html | 363 - docs/Homebrew/Cmd/NodenvSync/Args.html | 170 - docs/Homebrew/Cmd/OptionsCmd.html | 361 - docs/Homebrew/Cmd/OptionsCmd/Args.html | 483 - docs/Homebrew/Cmd/Outdated.html | 385 - docs/Homebrew/Cmd/Outdated/Args.html | 927 - docs/Homebrew/Cmd/Pin.html | 337 - docs/Homebrew/Cmd/Pin/Args.html | 170 - docs/Homebrew/Cmd/Postinstall.html | 339 - docs/Homebrew/Cmd/Postinstall/Args.html | 170 - docs/Homebrew/Cmd/Prefix.html | 555 - docs/Homebrew/Cmd/Prefix/Args.html | 335 - docs/Homebrew/Cmd/PrettyListing.html | 261 - docs/Homebrew/Cmd/PyenvSync.html | 361 - docs/Homebrew/Cmd/PyenvSync/Args.html | 170 - docs/Homebrew/Cmd/RbenvSync.html | 363 - docs/Homebrew/Cmd/RbenvSync/Args.html | 170 - docs/Homebrew/Cmd/ReadallCmd.html | 375 - docs/Homebrew/Cmd/ReadallCmd/Args.html | 631 - docs/Homebrew/Cmd/Reinstall.html | 465 - docs/Homebrew/Cmd/Reinstall/Args.html | 2999 -- docs/Homebrew/Cmd/Repository.html | 418 - docs/Homebrew/Cmd/Repository/Args.html | 170 - docs/Homebrew/Cmd/SearchCmd.html | 404 - docs/Homebrew/Cmd/SearchCmd/Args.html | 1445 - docs/Homebrew/Cmd/TapCmd.html | 361 - docs/Homebrew/Cmd/TapCmd/Args.html | 557 - docs/Homebrew/Cmd/TapInfo.html | 345 - docs/Homebrew/Cmd/TapInfo/Args.html | 335 - docs/Homebrew/Cmd/UninstallCmd.html | 401 - docs/Homebrew/Cmd/UninstallCmd/Args.html | 779 - docs/Homebrew/Cmd/UnlinkCmd.html | 341 - docs/Homebrew/Cmd/UnlinkCmd/Args.html | 335 - docs/Homebrew/Cmd/Unpin.html | 337 - docs/Homebrew/Cmd/Unpin/Args.html | 170 - docs/Homebrew/Cmd/Untap.html | 607 - docs/Homebrew/Cmd/Untap/Args.html | 335 - docs/Homebrew/Cmd/UpdateReport.html | 329 - docs/Homebrew/Cmd/UpdateReport/Args.html | 483 - docs/Homebrew/Cmd/UpgradeCmd.html | 351 - docs/Homebrew/Cmd/UpgradeCmd/Args.html | 3369 -- docs/Homebrew/Cmd/Uses.html | 405 - docs/Homebrew/Cmd/Uses/Args.html | 1075 - docs/Homebrew/Completions.html | 2079 - docs/Homebrew/Completions/Variables.html | 502 - docs/Homebrew/DevCmd.html | 129 - docs/Homebrew/DevCmd/Audit.html | 763 - docs/Homebrew/DevCmd/Audit/Args.html | 2037 - docs/Homebrew/DevCmd/Bottle.html | 1102 - docs/Homebrew/DevCmd/Bottle/Args.html | 1149 - docs/Homebrew/DevCmd/Bump.html | 399 - docs/Homebrew/DevCmd/Bump/Args.html | 1075 - .../Homebrew/DevCmd/Bump/VersionBumpInfo.html | 986 - docs/Homebrew/DevCmd/BumpCaskPr.html | 543 - docs/Homebrew/DevCmd/BumpCaskPr/Args.html | 1371 - docs/Homebrew/DevCmd/BumpFormulaPr.html | 932 - docs/Homebrew/DevCmd/BumpFormulaPr/Args.html | 1889 - docs/Homebrew/DevCmd/BumpRevision.html | 405 - docs/Homebrew/DevCmd/BumpRevision/Args.html | 557 - .../Homebrew/DevCmd/BumpUnversionedCasks.html | 433 - .../DevCmd/BumpUnversionedCasks/Args.html | 483 - docs/Homebrew/DevCmd/Cat.html | 391 - docs/Homebrew/DevCmd/Cat/Args.html | 483 - docs/Homebrew/DevCmd/Contributions.html | 481 - docs/Homebrew/DevCmd/Contributions/Args.html | 557 - docs/Homebrew/DevCmd/Create.html | 335 - docs/Homebrew/DevCmd/Create/Args.html | 1593 - .../Homebrew/DevCmd/DetermineTestRunners.html | 363 - .../DevCmd/DetermineTestRunners/Args.html | 409 - docs/Homebrew/DevCmd/DispatchBuildBottle.html | 432 - .../DevCmd/DispatchBuildBottle/Args.html | 853 - docs/Homebrew/DevCmd/Edit.html | 407 - docs/Homebrew/DevCmd/Edit/Args.html | 557 - docs/Homebrew/DevCmd/Extract.html | 588 - docs/Homebrew/DevCmd/Extract/Args.html | 409 - docs/Homebrew/DevCmd/FormulaCmd.html | 333 - docs/Homebrew/DevCmd/FormulaCmd/Args.html | 170 - docs/Homebrew/DevCmd/GenerateCaskApi.html | 443 - .../Homebrew/DevCmd/GenerateCaskApi/Args.html | 335 - docs/Homebrew/DevCmd/GenerateFormulaApi.html | 441 - .../DevCmd/GenerateFormulaApi/Args.html | 335 - .../DevCmd/GenerateManCompletions.html | 363 - .../DevCmd/GenerateManCompletions/Args.html | 170 - docs/Homebrew/DevCmd/InstallBundlerGems.html | 339 - .../DevCmd/InstallBundlerGems/Args.html | 335 - docs/Homebrew/DevCmd/Irb.html | 475 - docs/Homebrew/DevCmd/Irb/Args.html | 335 - docs/Homebrew/DevCmd/Linkage.html | 361 - docs/Homebrew/DevCmd/Linkage/Args.html | 483 - docs/Homebrew/DevCmd/LivecheckCmd.html | 452 - docs/Homebrew/DevCmd/LivecheckCmd/Args.html | 1149 - docs/Homebrew/DevCmd/PrAutomerge.html | 395 - docs/Homebrew/DevCmd/PrAutomerge/Args.html | 779 - docs/Homebrew/DevCmd/PrPublish.html | 389 - docs/Homebrew/DevCmd/PrPublish/Args.html | 631 - docs/Homebrew/DevCmd/PrPull.html | 1407 - docs/Homebrew/DevCmd/PrPull/Args.html | 1741 - docs/Homebrew/DevCmd/PrUpload.html | 467 - docs/Homebrew/DevCmd/PrUpload/Args.html | 853 - docs/Homebrew/DevCmd/Prof.html | 415 - docs/Homebrew/DevCmd/Prof/Args.html | 335 - docs/Homebrew/DevCmd/Release.html | 447 - docs/Homebrew/DevCmd/Release/Args.html | 335 - docs/Homebrew/DevCmd/Ruby.html | 337 - docs/Homebrew/DevCmd/Ruby/Args.html | 335 - docs/Homebrew/DevCmd/Rubydoc.html | 349 - docs/Homebrew/DevCmd/Rubydoc/Args.html | 335 - docs/Homebrew/DevCmd/Sh.html | 395 - docs/Homebrew/DevCmd/Sh/Args.html | 409 - docs/Homebrew/DevCmd/StyleCmd.html | 371 - docs/Homebrew/DevCmd/StyleCmd/Args.html | 853 - docs/Homebrew/DevCmd/TapNew.html | 649 - docs/Homebrew/DevCmd/TapNew/Args.html | 483 - docs/Homebrew/DevCmd/Test.html | 469 - docs/Homebrew/DevCmd/Test/Args.html | 557 - docs/Homebrew/DevCmd/Tests.html | 579 - docs/Homebrew/DevCmd/Tests/Args.html | 779 - docs/Homebrew/DevCmd/Typecheck.html | 435 - docs/Homebrew/DevCmd/Typecheck/Args.html | 705 - docs/Homebrew/DevCmd/Unbottled.html | 455 - docs/Homebrew/DevCmd/Unbottled/Args.html | 557 - docs/Homebrew/DevCmd/Unpack.html | 403 - docs/Homebrew/DevCmd/Unpack/Args.html | 631 - docs/Homebrew/DevCmd/UpdateLicenseData.html | 353 - .../DevCmd/UpdateLicenseData/Args.html | 170 - docs/Homebrew/DevCmd/UpdateMaintainers.html | 417 - .../DevCmd/UpdateMaintainers/Args.html | 170 - .../DevCmd/UpdatePythonResources.html | 343 - .../DevCmd/UpdatePythonResources/Args.html | 927 - docs/Homebrew/DevCmd/UpdateSponsors.html | 454 - docs/Homebrew/DevCmd/UpdateSponsors/Args.html | 170 - docs/Homebrew/DevCmd/UpdateTest.html | 604 - docs/Homebrew/DevCmd/UpdateTest/Args.html | 483 - docs/Homebrew/DevCmd/VendorGems.html | 447 - docs/Homebrew/DevCmd/VendorGems/Args.html | 409 - docs/Homebrew/Diagnostic.html | 319 - docs/Homebrew/Diagnostic/Checks.html | 8679 ---- docs/Homebrew/Diagnostic/Volumes.html | 401 - docs/Homebrew/EnvConfig.html | 8075 ---- docs/Homebrew/Fetch.html | 317 - docs/Homebrew/FormulaAuditor.html | 4431 -- docs/Homebrew/FormulaCreator.html | 1202 - docs/Homebrew/FreePort.html | 218 - docs/Homebrew/Help.html | 256 - docs/Homebrew/Install.html | 1166 - docs/Homebrew/Livecheck.html | 3951 -- docs/Homebrew/Livecheck/Constants.html | 156 - docs/Homebrew/Livecheck/Error.html | 137 - docs/Homebrew/Livecheck/LivecheckVersion.html | 467 - docs/Homebrew/Livecheck/SkipConditions.html | 2185 - docs/Homebrew/Livecheck/Strategy.html | 1229 - docs/Homebrew/Livecheck/Strategy/Apache.html | 591 - .../Livecheck/Strategy/Bitbucket.html | 608 - docs/Homebrew/Livecheck/Strategy/Cpan.html | 587 - docs/Homebrew/Livecheck/Strategy/Crate.html | 662 - .../Livecheck/Strategy/ElectronBuilder.html | 503 - .../Livecheck/Strategy/ExtractPlist.html | 671 - .../Livecheck/Strategy/ExtractPlist/Item.html | 377 - docs/Homebrew/Livecheck/Strategy/Git.html | 827 - .../Livecheck/Strategy/GithubLatest.html | 597 - .../Livecheck/Strategy/GithubReleases.html | 832 - docs/Homebrew/Livecheck/Strategy/Gnome.html | 624 - docs/Homebrew/Livecheck/Strategy/Gnu.html | 610 - docs/Homebrew/Livecheck/Strategy/Hackage.html | 603 - .../Livecheck/Strategy/HeaderMatch.html | 682 - docs/Homebrew/Livecheck/Strategy/Json.html | 817 - .../Livecheck/Strategy/Launchpad.html | 578 - docs/Homebrew/Livecheck/Strategy/Npm.html | 577 - .../Livecheck/Strategy/PageMatch.html | 692 - docs/Homebrew/Livecheck/Strategy/Pypi.html | 612 - .../Livecheck/Strategy/Sourceforge.html | 609 - docs/Homebrew/Livecheck/Strategy/Sparkle.html | 1126 - .../Livecheck/Strategy/Sparkle/Item.html | 1157 - docs/Homebrew/Livecheck/Strategy/Xml.html | 975 - docs/Homebrew/Livecheck/Strategy/Xorg.html | 680 - docs/Homebrew/Livecheck/Strategy/Yaml.html | 817 - docs/Homebrew/Manpages.html | 1198 - docs/Homebrew/Manpages/Converter.html | 129 - .../Homebrew/Manpages/Converter/Kramdown.html | 369 - docs/Homebrew/Manpages/Converter/Roff.html | 406 - docs/Homebrew/Manpages/Parser.html | 127 - docs/Homebrew/Manpages/Parser/Ronn.html | 357 - docs/Homebrew/Manpages/Variables.html | 1125 - docs/Homebrew/MissingFormula.html | 900 - docs/Homebrew/Parlour.html | 283 - docs/Homebrew/ResourceAuditor.html | 1860 - docs/Homebrew/Search.html | 936 - docs/Homebrew/Service.html | 5744 --- docs/Homebrew/Settings.html | 362 - docs/Homebrew/SimulateSystem.html | 855 - docs/Homebrew/SourceLocation.html | 426 - docs/Homebrew/Style.html | 1620 - docs/Homebrew/Style/Offense.html | 747 - docs/Homebrew/Style/Offenses.html | 382 - docs/Homebrew/TapAuditor.html | 1378 - docs/Homebrew/Uninstall.html | 603 - .../Homebrew/Uninstall/DependentsMessage.html | 451 - .../Uninstall/DeveloperDependentsMessage.html | 247 - .../NondeveloperDependentsMessage.html | 249 - docs/Homebrew/Unlink.html | 291 - docs/Homebrew/UnversionedCaskChecker.html | 1933 - docs/Homebrew/Upgrade.html | 1291 - docs/HomebrewCurlDownloadStrategy.html | 231 - docs/HomebrewCurlDownloadStrategyError.html | 229 - docs/IO.html | 247 - docs/IRB.html | 215 - docs/Ignorable.html | 412 - docs/Ignorable/ExceptionMixin.html | 281 - docs/InstallRenamed.html | 413 - docs/InstalledDependents.html | 306 - docs/Keg.html | 7310 --- docs/Keg/AlreadyLinkedError.html | 227 - docs/Keg/ConflictError.html | 270 - docs/Keg/DirectoryNotWritableError.html | 161 - docs/Keg/LinkError.html | 461 - docs/Keg/Relocation.html | 765 - docs/KegOnlyReason.html | 784 - docs/KegUnspecifiedError.html | 234 - docs/Kernel.html | 3368 -- docs/Language.html | 129 - docs/Language/Go.html | 244 - docs/Language/Java.html | 423 - docs/Language/Node.html | 646 - docs/Language/Node/Shebang.html | 320 - docs/Language/Perl.html | 125 - docs/Language/Perl/Shebang.html | 330 - docs/Language/Python.html | 1020 - docs/Language/Python/Shebang.html | 338 - docs/Language/Python/Virtualenv.html | 789 - .../Python/Virtualenv/Virtualenv.html | 853 - docs/LazyObject.html | 221 - docs/LinkageCacheStore.html | 665 - docs/LinkageChecker.html | 998 - docs/LinuxRequirement.html | 308 - docs/LinuxRunnerSpec.html | 890 - docs/Livecheck.html | 1633 - docs/LocalBottleDownloadStrategy.html | 276 - docs/Locale.html | 898 - docs/Locale/ParserError.html | 137 - docs/LockFile.html | 542 - docs/MacOSRequirement.html | 1014 - docs/MacOSRunnerSpec.html | 696 - docs/MacOSVersion.html | 1089 - docs/MacOSVersion/Error.html | 318 - docs/MacOSVersionErrorCompat.html | 133 - docs/MachOShim.html | 1639 - docs/Mechanize.html | 143 - docs/Mechanize/HTTP.html | 143 - docs/Mechanize/HTTP/ContentDisposition.html | 769 - .../HTTP/ContentDispositionParser.html | 252 - docs/MercurialDownloadStrategy.html | 436 - docs/Messages.html | 944 - docs/Metafiles.html | 377 - docs/Method.html | 216 - docs/MethodDeprecatedError.html | 217 - docs/Migrator.html | 3614 -- docs/Migrator/MigrationNeededError.html | 227 - docs/Migrator/MigratorDifferentTapsError.html | 241 - docs/Migrator/MigratorNoOldpathError.html | 221 - docs/MissingApplyError.html | 137 - docs/Mktemp.html | 752 - docs/Module.html | 251 - docs/MultipleVersionsInstalledError.html | 122 - docs/NilClass.html | 289 - docs/NoSuchKegError.html | 305 - docs/NoUnzipCurlDownloadStrategy.html | 315 - docs/NotAKegError.html | 137 - docs/Numeric.html | 305 - docs/OS.html | 701 - docs/OS/Linux.html | 435 - docs/OS/Linux/Elf.html | 290 - docs/OS/Linux/Glibc.html | 553 - docs/OS/Linux/Kernel.html | 291 - docs/OS/Linux/Ld.html | 550 - docs/OS/Mac.html | 1928 - docs/OS/Mac/BaseSDKLocator/NoSDKError.html | 136 - docs/OS/Mac/CLT.html | 1636 - docs/OS/Mac/CLTSDKLocator.html | 249 - docs/OS/Mac/SDK.html | 553 - docs/OS/Mac/Xcode.html | 2125 - docs/OS/Mac/XcodeSDKLocator.html | 249 - docs/Object.html | 573 - docs/ObserverPathnameExtension.html | 1076 - docs/OnSystem.html | 999 - docs/OnSystem/MacOSAndLinux.html | 209 - docs/OnSystem/MacOSOnly.html | 342 - docs/OperationInProgressError.html | 233 - docs/Option.html | 448 - docs/Options.html | 1350 - docs/PATH.html | 1162 - docs/Patch.html | 236 - docs/Pathname.html | 3247 -- docs/PkgVersion.html | 1196 - docs/PourBottleCheck.html | 322 - docs/PyPI.html | 1105 - docs/PyPI/Package.html | 932 - docs/Readall.html | 756 - docs/Repology.html | 590 - docs/Reporter.html | 993 - docs/Reporter/ReporterRevisionUnsetError.html | 201 - docs/ReporterHub.html | 619 - docs/Requirement.html | 2310 - docs/Requirements.html | 330 - docs/Resource.html | 2267 - docs/Resource/Go.html | 283 - docs/Resource/Partial.html | 324 - docs/Resource/PatchResource.html | 509 - docs/ResourceMissingError.html | 221 - docs/ResourceStageContext.html | 386 - docs/RuboCop.html | 129 - docs/RuboCop/AST.html | 127 - docs/RuboCop/AST/Node.html | 930 - docs/RuboCop/Cask.html | 129 - docs/RuboCop/Cask/AST.html | 129 - docs/RuboCop/Cask/AST/CaskBlock.html | 475 - docs/RuboCop/Cask/AST/CaskHeader.html | 710 - docs/RuboCop/Cask/AST/Stanza.html | 939 - docs/RuboCop/Cask/AST/StanzaBlock.html | 543 - docs/RuboCop/Cask/Constants.html | 311 - docs/RuboCop/Cop.html | 131 - docs/RuboCop/Cop/Cask.html | 131 - .../Cop/Cask/ArrayAlphabetization.html | 448 - docs/RuboCop/Cop/Cask/CaskHelp.html | 536 - docs/RuboCop/Cop/Cask/Desc.html | 300 - docs/RuboCop/Cop/Cask/Discontinued.html | 484 - .../Cop/Cask/HomepageUrlTrailingSlash.html | 349 - docs/RuboCop/Cop/Cask/NoOverrides.html | 659 - docs/RuboCop/Cop/Cask/OnDescStanza.html | 238 - docs/RuboCop/Cop/Cask/OnHomepageStanza.html | 238 - .../Cop/Cask/OnSystemConditionals.html | 441 - docs/RuboCop/Cop/Cask/OnUrlStanza.html | 238 - docs/RuboCop/Cop/Cask/SharedFilelistGlob.html | 266 - docs/RuboCop/Cop/Cask/StanzaGrouping.html | 321 - docs/RuboCop/Cop/Cask/StanzaOrder.html | 395 - .../Cop/Cask/UninstallMethodsOrder.html | 558 - docs/RuboCop/Cop/Cask/Url.html | 335 - .../Cop/Cask/UrlLegacyCommaSeparators.html | 324 - docs/RuboCop/Cop/Cask/Variables.html | 383 - docs/RuboCop/Cop/DescHelper.html | 532 - docs/RuboCop/Cop/FormulaAudit.html | 129 - .../Cop/FormulaAudit/AssertStatements.html | 300 - .../FormulaAudit/BottleDigestIndentation.html | 318 - .../Cop/FormulaAudit/BottleFormat.html | 340 - .../RuboCop/Cop/FormulaAudit/BottleOrder.html | 498 - .../FormulaAudit/BottleTagIndentation.html | 318 - docs/RuboCop/Cop/FormulaAudit/Caveats.html | 291 - docs/RuboCop/Cop/FormulaAudit/Checksum.html | 373 - .../Cop/FormulaAudit/ChecksumCase.html | 294 - .../Cop/FormulaAudit/ClassInheritance.html | 274 - docs/RuboCop/Cop/FormulaAudit/ClassName.html | 314 - docs/RuboCop/Cop/FormulaAudit/Comments.html | 328 - .../Cop/FormulaAudit/ComponentsOrder.html | 1162 - .../FormulaAudit/ComponentsRedundancy.html | 450 - docs/RuboCop/Cop/FormulaAudit/Conflicts.html | 363 - .../Cop/FormulaAudit/DependencyOrder.html | 2112 - .../FormulaAudit/DeprecateDisableDate.html | 420 - .../FormulaAudit/DeprecateDisableReason.html | 490 - docs/RuboCop/Cop/FormulaAudit/Desc.html | 297 - docs/RuboCop/Cop/FormulaAudit/Files.html | 316 - .../FormulaAudit/GenerateCompletionsDSL.html | 606 - docs/RuboCop/Cop/FormulaAudit/GitUrls.html | 393 - docs/RuboCop/Cop/FormulaAudit/Homepage.html | 442 - docs/RuboCop/Cop/FormulaAudit/KegOnly.html | 407 - .../Cop/FormulaAudit/LicenseArrays.html | 290 - docs/RuboCop/Cop/FormulaAudit/Licenses.html | 395 - docs/RuboCop/Cop/FormulaAudit/Lines.html | 292 - .../LivecheckRegexCaseInsensitive.html | 337 - .../FormulaAudit/LivecheckRegexExtension.html | 337 - .../LivecheckRegexIfPageMatch.html | 295 - .../LivecheckRegexParentheses.html | 298 - .../Cop/FormulaAudit/LivecheckSkip.html | 311 - .../FormulaAudit/LivecheckUrlProvided.html | 288 - .../Cop/FormulaAudit/LivecheckUrlSymbol.html | 361 - .../Cop/FormulaAudit/MacOSOnLinux.html | 321 - .../Cop/FormulaAudit/Miscellaneous.html | 1390 - docs/RuboCop/Cop/FormulaAudit/MpiCheck.html | 290 - .../FormulaAudit/OnSystemConditionals.html | 394 - .../Cop/FormulaAudit/OptionDeclarations.html | 596 - docs/RuboCop/Cop/FormulaAudit/Options.html | 405 - docs/RuboCop/Cop/FormulaAudit/Patches.html | 447 - .../Cop/FormulaAudit/ProvidedByMacos.html | 355 - docs/RuboCop/Cop/FormulaAudit/PyPiUrls.html | 393 - .../Cop/FormulaAudit/PyoxidizerCheck.html | 275 - .../Cop/FormulaAudit/PythonVersions.html | 340 - .../Cop/FormulaAudit/QuicTLSCheck.html | 290 - .../ResourceRequiresDependencies.html | 334 - .../Cop/FormulaAudit/SafePopenCommands.html | 310 - docs/RuboCop/Cop/FormulaAudit/Service.html | 385 - .../Cop/FormulaAudit/ShellVariables.html | 312 - .../SingleGenerateCompletionsDSLCall.html | 373 - docs/RuboCop/Cop/FormulaAudit/Test.html | 444 - docs/RuboCop/Cop/FormulaAudit/Text.html | 570 - docs/RuboCop/Cop/FormulaAudit/Urls.html | 756 - .../Cop/FormulaAudit/UsesFromMacos.html | 356 - docs/RuboCop/Cop/FormulaAudit/Version.html | 284 - docs/RuboCop/Cop/FormulaAuditStrict.html | 129 - .../Cop/FormulaAuditStrict/GitUrls.html | 393 - .../Cop/FormulaAuditStrict/MakeCheck.html | 298 - .../Cop/FormulaAuditStrict/Requirements.html | 270 - .../Cop/FormulaAuditStrict/RustCheck.html | 336 - .../Cop/FormulaAuditStrict/TestPresent.html | 270 - docs/RuboCop/Cop/FormulaAuditStrict/Text.html | 636 - docs/RuboCop/Cop/FormulaCop.html | 1943 - docs/RuboCop/Cop/HelperFunctions.html | 3099 -- docs/RuboCop/Cop/Homebrew.html | 129 - docs/RuboCop/Cop/Homebrew/Blank.html | 401 - docs/RuboCop/Cop/Homebrew/CompactBlank.html | 554 - .../Cop/Homebrew/ExecShellMetacharacters.html | 317 - docs/RuboCop/Cop/Homebrew/IORead.html | 274 - .../Cop/Homebrew/InstallBundlerGems.html | 274 - docs/RuboCop/Cop/Homebrew/MoveToExtendOS.html | 366 - docs/RuboCop/Cop/Homebrew/NegateInclude.html | 415 - docs/RuboCop/Cop/Homebrew/Presence.html | 544 - docs/RuboCop/Cop/Homebrew/Present.html | 542 - .../Cop/Homebrew/SafeNavigationWithBlank.html | 401 - docs/RuboCop/Cop/Homebrew/ShellCommands.html | 380 - .../Cop/OnSystemConditionalsHelper.html | 1694 - docs/SBOM.html | 1134 - docs/SPDX.html | 1392 - docs/Sandbox.html | 2051 - docs/SharedAudits.html | 1208 - docs/SharedEnvExtension.html | 2408 - docs/ShebangDetectionError.html | 221 - docs/Singleton.html | 199 - docs/SoftwareSpec.html | 2835 -- docs/Sorbet/Private.html | 129 - docs/Sorbet/Private/Static.html | 129 - docs/Sorbet/Private/Static/ENVClass.html | 207 - docs/Stdenv.html | 1357 - docs/String.html | 470 - docs/StringInreplaceExtension.html | 910 - docs/StringPatch.html | 309 - docs/SubversionDownloadStrategy.html | 512 - docs/Superenv.html | 2474 - docs/Symbol.html | 292 - docs/SystemCommand.html | 1131 - docs/SystemCommand/Mixin.html | 274 - docs/SystemCommand/Result.html | 1107 - docs/SystemConfig.html | 2061 - docs/Tab.html | 4155 -- docs/Tap.html | 8103 ---- docs/Tap/InvalidNameError.html | 136 - docs/TapAlreadyTappedError.html | 311 - docs/TapConfig.html | 620 - docs/TapCoreRemoteMismatchError.html | 251 - docs/TapFormulaAmbiguityError.html | 469 - docs/TapFormulaClassUnavailableError.html | 374 - docs/TapFormulaOrCaskUnavailableError.html | 323 - docs/TapFormulaUnavailableError.html | 493 - docs/TapFormulaUnreadableError.html | 290 - docs/TapNoCustomRemoteError.html | 311 - docs/TapRemoteMismatchError.html | 536 - docs/TapUnavailableError.html | 331 - docs/Tapioca.html | 115 - docs/Tapioca/Compilers.html | 115 - docs/Tapioca/Compilers/Args.html | 685 - docs/Tapioca/Compilers/EnvConfig.html | 350 - docs/Tapioca/Compilers/RuboCop.html | 400 - docs/Tapioca/Compilers/Tty.html | 322 - docs/TestRunnerFormula.html | 1488 - docs/Time.html | 306 - docs/TrueClass.html | 289 - docs/Tty.html | 2258 - docs/URL.html | 555 - docs/UnbottledError.html | 236 - docs/UnboundMethod.html | 216 - docs/UnpackStrategy.html | 1216 - docs/UnpackStrategy/Air.html | 433 - docs/UnpackStrategy/Bazaar.html | 281 - docs/UnpackStrategy/Bzip2.html | 351 - docs/UnpackStrategy/Cab.html | 552 - docs/UnpackStrategy/Compress.html | 354 - docs/UnpackStrategy/Cvs.html | 281 - docs/UnpackStrategy/Directory.html | 355 - docs/UnpackStrategy/Dmg.html | 368 - docs/UnpackStrategy/Dmg/Bom.html | 501 - docs/UnpackStrategy/Dmg/Bom/EmptyError.html | 228 - docs/UnpackStrategy/Dmg/Bom/Error.html | 140 - docs/UnpackStrategy/Executable.html | 361 - docs/UnpackStrategy/Fossil.html | 364 - docs/UnpackStrategy/GenericUnar.html | 435 - docs/UnpackStrategy/Git.html | 281 - docs/UnpackStrategy/Gzip.html | 351 - docs/UnpackStrategy/Jar.html | 365 - docs/UnpackStrategy/Lha.html | 431 - docs/UnpackStrategy/LuaRock.html | 365 - docs/UnpackStrategy/Lzip.html | 431 - docs/UnpackStrategy/Lzma.html | 431 - docs/UnpackStrategy/Mercurial.html | 281 - docs/UnpackStrategy/MicrosoftOfficeXml.html | 375 - docs/UnpackStrategy/Otf.html | 359 - docs/UnpackStrategy/P7Zip.html | 431 - docs/UnpackStrategy/Pax.html | 351 - docs/UnpackStrategy/Pkg.html | 361 - docs/UnpackStrategy/Rar.html | 431 - .../SelfExtractingExecutable.html | 361 - docs/UnpackStrategy/Sit.html | 359 - docs/UnpackStrategy/Subversion.html | 281 - docs/UnpackStrategy/Tar.html | 388 - docs/UnpackStrategy/Ttf.html | 365 - docs/UnpackStrategy/Uncompressed.html | 333 - docs/UnpackStrategy/Xar.html | 351 - docs/UnpackStrategy/Xz.html | 431 - docs/UnpackStrategy/Zip.html | 374 - docs/UnpackStrategy/Zstd.html | 431 - docs/UnsatisfiedRequirements.html | 229 - docs/UnsupportedInstallationMethod.html | 122 - docs/UsageError.html | 311 - docs/User.html | 365 - docs/UsesFromMacOSDependency.html | 780 - docs/Utils.html | 2183 - docs/Utils/AST.html | 870 - docs/Utils/AST/FormulaAST.html | 1164 - docs/Utils/Analytics.html | 2894 -- docs/Utils/Backtrace.html | 518 - docs/Utils/Bottles.html | 1093 - docs/Utils/Bottles/Collector.html | 702 - docs/Utils/Bottles/MacOSOverride.html | 238 - docs/Utils/Bottles/Tag.html | 1227 - docs/Utils/Bottles/TagSpecification.html | 487 - docs/Utils/Curl.html | 2683 -- docs/Utils/Git.html | 1379 - docs/Utils/Gzip.html | 452 - docs/Utils/Inreplace.html | 467 - docs/Utils/Inreplace/Error.html | 227 - docs/Utils/Link.html | 468 - docs/Utils/Path.html | 244 - docs/Utils/Service.html | 681 - docs/Utils/Shebang.html | 273 - docs/Utils/Shebang/RewriteInfo.html | 483 - docs/Utils/Shell.html | 1269 - docs/Utils/Svn.html | 573 - docs/Utils/Tar.html | 474 - docs/Utils/Timer.html | 343 - docs/Utils/TopologicalHash.html | 332 - docs/Utils/UID.html | 243 - docs/VCSDownloadStrategy.html | 717 - docs/Version.html | 2131 - docs/Version/AlphaToken.html | 221 - docs/Version/BetaToken.html | 221 - docs/Version/CompositeToken.html | 283 - docs/Version/NumericToken.html | 455 - docs/Version/Parser.html | 258 - docs/Version/PatchToken.html | 221 - docs/Version/PostToken.html | 221 - docs/Version/PreToken.html | 221 - docs/Version/RCToken.html | 221 - docs/Version/RegexParser.html | 490 - docs/Version/StemParser.html | 338 - docs/Version/StringToken.html | 375 - docs/Version/Token.html | 1050 - docs/Version/UrlParser.html | 277 - docs/Warnings.html | 268 - docs/XcodeRequirement.html | 640 - docs/_index.html | 6017 --- docs/class_list.html | 51 - docs/css/common.css | 1 - docs/css/full_list.css | 58 - docs/css/style.css | 497 - docs/file.README.html | 77 - docs/file_list.html | 56 - docs/frames.html | 22 - docs/index.html | 77 - docs/js/app.js | 314 - docs/js/full_list.js | 216 - docs/js/jquery.js | 4 - docs/method_list.html | 40219 ---------------- docs/top-level-namespace.html | 1237 - 895 files changed, 6 insertions(+), 669390 deletions(-) delete mode 100644 docs/APIHashable.html delete mode 100644 docs/AbstractCoreTap.html delete mode 100644 docs/AbstractDownloadStrategy.html delete mode 100644 docs/AbstractDownloadStrategy/Pourable.html delete mode 100644 docs/AbstractFileDownloadStrategy.html delete mode 100644 docs/ArchRequirement.html delete mode 100644 docs/Array.html delete mode 100644 docs/Attr.html delete mode 100644 docs/Attrable.html delete mode 100644 docs/BazaarDownloadStrategy.html delete mode 100644 docs/Bottle.html delete mode 100644 docs/Bottle/Filename.html delete mode 100644 docs/BottleFormulaUnavailableError.html delete mode 100644 docs/BottleSpecification.html delete mode 100644 docs/Build.html delete mode 100644 docs/BuildEnvironment.html delete mode 100644 docs/BuildEnvironment/DSL.html delete mode 100644 docs/BuildError.html delete mode 100644 docs/BuildFlagsError.html delete mode 100644 docs/BuildOptions.html delete mode 100644 docs/CVSDownloadStrategy.html delete mode 100644 docs/Cachable.html delete mode 100644 docs/CacheStore.html delete mode 100644 docs/CacheStoreDatabase.html delete mode 100644 docs/CannotInstallFormulaError.html delete mode 100644 docs/Cask.html delete mode 100644 docs/Cask/AbstractCaskErrorWithToken.html delete mode 100644 docs/Cask/Artifact.html delete mode 100644 docs/Cask/Artifact/AbstractArtifact.html delete mode 100644 docs/Cask/Artifact/AbstractFlightBlock.html delete mode 100644 docs/Cask/Artifact/AbstractUninstall.html delete mode 100644 docs/Cask/Artifact/App.html delete mode 100644 docs/Cask/Artifact/Artifact.html delete mode 100644 docs/Cask/Artifact/AudioUnitPlugin.html delete mode 100644 docs/Cask/Artifact/Binary.html delete mode 100644 docs/Cask/Artifact/Colorpicker.html delete mode 100644 docs/Cask/Artifact/Dictionary.html delete mode 100644 docs/Cask/Artifact/Font.html delete mode 100644 docs/Cask/Artifact/InputMethod.html delete mode 100644 docs/Cask/Artifact/Installer.html delete mode 100644 docs/Cask/Artifact/Installer/ManualInstaller.html delete mode 100644 docs/Cask/Artifact/Installer/ScriptInstaller.html delete mode 100644 docs/Cask/Artifact/InternetPlugin.html delete mode 100644 docs/Cask/Artifact/KeyboardLayout.html delete mode 100644 docs/Cask/Artifact/Manpage.html delete mode 100644 docs/Cask/Artifact/Mdimporter.html delete mode 100644 docs/Cask/Artifact/Moved.html delete mode 100644 docs/Cask/Artifact/Pkg.html delete mode 100644 docs/Cask/Artifact/PostflightBlock.html delete mode 100644 docs/Cask/Artifact/PreflightBlock.html delete mode 100644 docs/Cask/Artifact/Prefpane.html delete mode 100644 docs/Cask/Artifact/Qlplugin.html delete mode 100644 docs/Cask/Artifact/Relocated.html delete mode 100644 docs/Cask/Artifact/ScreenSaver.html delete mode 100644 docs/Cask/Artifact/Service.html delete mode 100644 docs/Cask/Artifact/StageOnly.html delete mode 100644 docs/Cask/Artifact/Suite.html delete mode 100644 docs/Cask/Artifact/Symlinked.html delete mode 100644 docs/Cask/Artifact/Uninstall.html delete mode 100644 docs/Cask/Artifact/Vst3Plugin.html delete mode 100644 docs/Cask/Artifact/VstPlugin.html delete mode 100644 docs/Cask/Artifact/Zap.html delete mode 100644 docs/Cask/ArtifactSet.html delete mode 100644 docs/Cask/Audit.html delete mode 100644 docs/Cask/Auditor.html delete mode 100644 docs/Cask/Cache.html delete mode 100644 docs/Cask/Cask.html delete mode 100644 docs/Cask/CaskAlreadyCreatedError.html delete mode 100644 docs/Cask/CaskCannotBeInstalledError.html delete mode 100644 docs/Cask/CaskConflictError.html delete mode 100644 docs/Cask/CaskCyclicDependencyError.html delete mode 100644 docs/Cask/CaskError.html delete mode 100644 docs/Cask/CaskInvalidError.html delete mode 100644 docs/Cask/CaskLoader.html delete mode 100644 docs/Cask/CaskLoader/AbstractContentLoader.html delete mode 100644 docs/Cask/CaskLoader/FromAPILoader.html delete mode 100644 docs/Cask/CaskLoader/FromContentLoader.html delete mode 100644 docs/Cask/CaskLoader/FromInstalledPathLoader.html delete mode 100644 docs/Cask/CaskLoader/FromInstanceLoader.html delete mode 100644 docs/Cask/CaskLoader/FromNameLoader.html delete mode 100644 docs/Cask/CaskLoader/FromPathLoader.html delete mode 100644 docs/Cask/CaskLoader/FromTapLoader.html delete mode 100644 docs/Cask/CaskLoader/FromURILoader.html delete mode 100644 docs/Cask/CaskLoader/ILoader.html delete mode 100644 docs/Cask/CaskLoader/NullLoader.html delete mode 100644 docs/Cask/CaskNotInstalledError.html delete mode 100644 docs/Cask/CaskQuarantineError.html delete mode 100644 docs/Cask/CaskQuarantinePropagationError.html delete mode 100644 docs/Cask/CaskQuarantineReleaseError.html delete mode 100644 docs/Cask/CaskSelfReferencingDependencyError.html delete mode 100644 docs/Cask/CaskTokenMismatchError.html delete mode 100644 docs/Cask/CaskUnavailableError.html delete mode 100644 docs/Cask/CaskUnreadableError.html delete mode 100644 docs/Cask/CaskUnspecifiedError.html delete mode 100644 docs/Cask/Caskroom.html delete mode 100644 docs/Cask/Config.html delete mode 100644 docs/Cask/DSL.html delete mode 100644 docs/Cask/DSL/Base.html delete mode 100644 docs/Cask/DSL/Caveats.html delete mode 100644 docs/Cask/DSL/ConflictsWith.html delete mode 100644 docs/Cask/DSL/Container.html delete mode 100644 docs/Cask/DSL/DependsOn.html delete mode 100644 docs/Cask/DSL/Postflight.html delete mode 100644 docs/Cask/DSL/Preflight.html delete mode 100644 docs/Cask/DSL/UninstallPostflight.html delete mode 100644 docs/Cask/DSL/UninstallPreflight.html delete mode 100644 docs/Cask/DSL/Version.html delete mode 100644 docs/Cask/Denylist.html delete mode 100644 docs/Cask/Download.html delete mode 100644 docs/Cask/Info.html delete mode 100644 docs/Cask/Installer.html delete mode 100644 docs/Cask/List.html delete mode 100644 docs/Cask/Metadata.html delete mode 100644 docs/Cask/Migrator.html delete mode 100644 docs/Cask/MultipleCaskErrors.html delete mode 100644 docs/Cask/Pkg.html delete mode 100644 docs/Cask/Quarantine.html delete mode 100644 docs/Cask/Reinstall.html delete mode 100644 docs/Cask/Staged.html delete mode 100644 docs/Cask/TapCaskAmbiguityError.html delete mode 100644 docs/Cask/TapCaskUnavailableError.html delete mode 100644 docs/Cask/URL.html delete mode 100644 docs/Cask/URL/BlockDSL.html delete mode 100644 docs/Cask/URL/BlockDSL/PageWithURL.html delete mode 100644 docs/Cask/URL/DSL.html delete mode 100644 docs/Cask/Uninstall.html delete mode 100644 docs/Cask/Upgrade.html delete mode 100644 docs/Cask/Utils.html delete mode 100644 docs/CaskDependent.html delete mode 100644 docs/CaskDependent/Requirement.html delete mode 100644 docs/CaskDescriptionCacheStore.html delete mode 100644 docs/CaskLock.html delete mode 100644 docs/Caveats.html delete mode 100644 docs/Checksum.html delete mode 100644 docs/ChecksumMismatchError.html delete mode 100644 docs/ChecksumMissingError.html delete mode 100644 docs/ChildProcessError.html delete mode 100644 docs/Cleaner.html delete mode 100644 docs/CodesignRequirement.html delete mode 100644 docs/Commands.html delete mode 100644 docs/CompilerConstants.html delete mode 100644 docs/CompilerFailure.html delete mode 100644 docs/CompilerSelectionError.html delete mode 100644 docs/CompilerSelector.html delete mode 100644 docs/CompilerSelector/Compiler.html delete mode 100644 docs/Context.html delete mode 100644 docs/Context/ContextStruct.html delete mode 100644 docs/CoreCaskTap.html delete mode 100644 docs/CoreTap.html delete mode 100644 docs/CurlApacheMirrorDownloadStrategy.html delete mode 100644 docs/CurlDownloadStrategy.html delete mode 100644 docs/CurlDownloadStrategyError.html delete mode 100644 docs/CurlGitHubPackagesDownloadStrategy.html delete mode 100644 docs/CurlPostDownloadStrategy.html delete mode 100644 docs/CxxStdlib.html delete mode 100644 docs/CyclicDependencyError.html delete mode 100644 docs/DATAPatch.html delete mode 100644 docs/Debrew.html delete mode 100644 docs/Debrew/Formula.html delete mode 100644 docs/Debrew/Menu.html delete mode 100644 docs/Debrew/Menu/Entry.html delete mode 100644 docs/Dependable.html delete mode 100644 docs/Dependencies.html delete mode 100644 docs/DependenciesHelpers.html delete mode 100644 docs/Dependency.html delete mode 100644 docs/DependencyCollector.html delete mode 100644 docs/DeprecateDisable.html delete mode 100644 docs/DeprecatedOption.html delete mode 100644 docs/DescriptionCacheStore.html delete mode 100644 docs/Descriptions.html delete mode 100644 docs/DevelopmentTools.html delete mode 100644 docs/DiskUsageExtension.html delete mode 100644 docs/DownloadError.html delete mode 100644 docs/DownloadStrategyDetector.html delete mode 100644 docs/Downloadable.html delete mode 100644 docs/DuplicateResourceError.html delete mode 100644 docs/ELFShim.html delete mode 100644 docs/ENV.html delete mode 100644 docs/EmbeddedPatch.html delete mode 100644 docs/Enumerable.html delete mode 100644 docs/EnvActivation.html delete mode 100644 docs/ErrorDuringExecution.html delete mode 100644 docs/ExternalPatch.html delete mode 100644 docs/FalseClass.html delete mode 100644 docs/File.html delete mode 100644 docs/Formatter.html delete mode 100644 docs/Formula.html delete mode 100644 docs/FormulaAmbiguousPythonError.html delete mode 100644 docs/FormulaCellarChecks.html delete mode 100644 docs/FormulaClassUnavailableError.html delete mode 100644 docs/FormulaClassUnavailableErrorModule.html delete mode 100644 docs/FormulaConflict.html delete mode 100644 docs/FormulaConflictError.html delete mode 100644 docs/FormulaInfo.html delete mode 100644 docs/FormulaInstallationAlreadyAttemptedError.html delete mode 100644 docs/FormulaInstaller.html delete mode 100644 docs/FormulaLock.html delete mode 100644 docs/FormulaOrCaskUnavailableError.html delete mode 100644 docs/FormulaOrCaskUnspecifiedError.html delete mode 100644 docs/FormulaPin.html delete mode 100644 docs/FormulaSpecificationError.html delete mode 100644 docs/FormulaUnavailableError.html delete mode 100644 docs/FormulaUnknownPythonError.html delete mode 100644 docs/FormulaUnreadableError.html delete mode 100644 docs/FormulaUnreadableErrorModule.html delete mode 100644 docs/FormulaUnspecifiedError.html delete mode 100644 docs/FormulaValidationError.html delete mode 100644 docs/FormulaVersions.html delete mode 100644 docs/Formulary.html delete mode 100644 docs/Formulary/FormulaContentsLoader.html delete mode 100644 docs/Formulary/FormulaLoader.html delete mode 100644 docs/Formulary/FromAPILoader.html delete mode 100644 docs/Formulary/FromBottleLoader.html delete mode 100644 docs/Formulary/FromCacheLoader.html delete mode 100644 docs/Formulary/FromKegLoader.html delete mode 100644 docs/Formulary/FromNameLoader.html delete mode 100644 docs/Formulary/FromPathLoader.html delete mode 100644 docs/Formulary/FromTapLoader.html delete mode 100644 docs/Formulary/FromURILoader.html delete mode 100644 docs/Formulary/NullLoader.html delete mode 100644 docs/Formulary/PathnameWriteMkpath.html delete mode 100644 docs/FossilDownloadStrategy.html delete mode 100644 docs/GitDownloadStrategy.html delete mode 100644 docs/GitHub.html delete mode 100644 docs/GitHub/API.html delete mode 100644 docs/GitHub/API/AuthenticationFailedError.html delete mode 100644 docs/GitHub/API/Error.html delete mode 100644 docs/GitHub/API/HTTPNotFoundError.html delete mode 100644 docs/GitHub/API/MissingAuthenticationError.html delete mode 100644 docs/GitHub/API/RateLimitExceededError.html delete mode 100644 docs/GitHub/API/ValidationFailedError.html delete mode 100644 docs/GitHub/Actions.html delete mode 100644 docs/GitHub/Actions/Annotation.html delete mode 100644 docs/GitHubArtifactDownloadStrategy.html delete mode 100644 docs/GitHubGitDownloadStrategy.html delete mode 100644 docs/GitHubPackages.html delete mode 100644 docs/GitHubReleases.html delete mode 100644 docs/GitHubRunner.html delete mode 100644 docs/GitHubRunnerMatrix.html delete mode 100644 docs/GitRepository.html delete mode 100644 docs/Hardware.html delete mode 100644 docs/Hardware/CPU.html delete mode 100644 docs/Hash.html delete mode 100644 docs/HeadSoftwareSpec.html delete mode 100644 docs/Homebrew.html delete mode 100644 docs/Homebrew/API.html delete mode 100644 docs/Homebrew/API/Analytics.html delete mode 100644 docs/Homebrew/API/Cask.html delete mode 100644 docs/Homebrew/API/Download.html delete mode 100644 docs/Homebrew/API/DownloadStrategy.html delete mode 100644 docs/Homebrew/API/Formula.html delete mode 100644 docs/Homebrew/AbstractCommand.html delete mode 100644 docs/Homebrew/Assertions.html delete mode 100644 docs/Homebrew/Attestation.html delete mode 100644 docs/Homebrew/Attestation/GhAuthNeeded.html delete mode 100644 docs/Homebrew/Attestation/InvalidAttestationError.html delete mode 100644 docs/Homebrew/BumpVersionParser.html delete mode 100644 docs/Homebrew/BundleVersion.html delete mode 100644 docs/Homebrew/CLI.html delete mode 100644 docs/Homebrew/CLI/Args.html delete mode 100644 docs/Homebrew/CLI/InvalidConstraintError.html delete mode 100644 docs/Homebrew/CLI/MaxNamedArgumentsError.html delete mode 100644 docs/Homebrew/CLI/MinNamedArgumentsError.html delete mode 100644 docs/Homebrew/CLI/NamedArgs.html delete mode 100644 docs/Homebrew/CLI/NumberOfNamedArgumentsError.html delete mode 100644 docs/Homebrew/CLI/OptionConflictError.html delete mode 100644 docs/Homebrew/CLI/OptionConstraintError.html delete mode 100644 docs/Homebrew/CLI/Parser.html delete mode 100644 docs/Homebrew/Cleanup.html delete mode 100644 docs/Homebrew/Cmd.html delete mode 100644 docs/Homebrew/Cmd/Analytics.html delete mode 100644 docs/Homebrew/Cmd/Analytics/Args.html delete mode 100644 docs/Homebrew/Cmd/Autoremove.html delete mode 100644 docs/Homebrew/Cmd/Autoremove/Args.html delete mode 100644 docs/Homebrew/Cmd/Cache.html delete mode 100644 docs/Homebrew/Cmd/Cache/Args.html delete mode 100644 docs/Homebrew/Cmd/Caskroom.html delete mode 100644 docs/Homebrew/Cmd/Caskroom/Args.html delete mode 100644 docs/Homebrew/Cmd/Cellar.html delete mode 100644 docs/Homebrew/Cmd/Cellar/Args.html delete mode 100644 docs/Homebrew/Cmd/CleanupCmd.html delete mode 100644 docs/Homebrew/Cmd/CleanupCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/Command.html delete mode 100644 docs/Homebrew/Cmd/Command/Args.html delete mode 100644 docs/Homebrew/Cmd/CommandsCmd.html delete mode 100644 docs/Homebrew/Cmd/CommandsCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/CompletionsCmd.html delete mode 100644 docs/Homebrew/Cmd/CompletionsCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/Config.html delete mode 100644 docs/Homebrew/Cmd/Config/Args.html delete mode 100644 docs/Homebrew/Cmd/Deps.html delete mode 100644 docs/Homebrew/Cmd/Deps/Args.html delete mode 100644 docs/Homebrew/Cmd/Desc.html delete mode 100644 docs/Homebrew/Cmd/Desc/Args.html delete mode 100644 docs/Homebrew/Cmd/Developer.html delete mode 100644 docs/Homebrew/Cmd/Developer/Args.html delete mode 100644 docs/Homebrew/Cmd/Docs.html delete mode 100644 docs/Homebrew/Cmd/Docs/Args.html delete mode 100644 docs/Homebrew/Cmd/Doctor.html delete mode 100644 docs/Homebrew/Cmd/Doctor/Args.html delete mode 100644 docs/Homebrew/Cmd/Env.html delete mode 100644 docs/Homebrew/Cmd/Env/Args.html delete mode 100644 docs/Homebrew/Cmd/FetchCmd.html delete mode 100644 docs/Homebrew/Cmd/FetchCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/GistLogs.html delete mode 100644 docs/Homebrew/Cmd/GistLogs/Args.html delete mode 100644 docs/Homebrew/Cmd/HelpCmd.html delete mode 100644 docs/Homebrew/Cmd/HelpCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/Home.html delete mode 100644 docs/Homebrew/Cmd/Home/Args.html delete mode 100644 docs/Homebrew/Cmd/Info.html delete mode 100644 docs/Homebrew/Cmd/Info/Args.html delete mode 100644 docs/Homebrew/Cmd/InstallCmd.html delete mode 100644 docs/Homebrew/Cmd/InstallCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/Leaves.html delete mode 100644 docs/Homebrew/Cmd/Leaves/Args.html delete mode 100644 docs/Homebrew/Cmd/Link.html delete mode 100644 docs/Homebrew/Cmd/Link/Args.html delete mode 100644 docs/Homebrew/Cmd/List.html delete mode 100644 docs/Homebrew/Cmd/List/Args.html delete mode 100644 docs/Homebrew/Cmd/Log.html delete mode 100644 docs/Homebrew/Cmd/Log/Args.html delete mode 100644 docs/Homebrew/Cmd/Migrate.html delete mode 100644 docs/Homebrew/Cmd/Migrate/Args.html delete mode 100644 docs/Homebrew/Cmd/Missing.html delete mode 100644 docs/Homebrew/Cmd/Missing/Args.html delete mode 100644 docs/Homebrew/Cmd/NodenvSync.html delete mode 100644 docs/Homebrew/Cmd/NodenvSync/Args.html delete mode 100644 docs/Homebrew/Cmd/OptionsCmd.html delete mode 100644 docs/Homebrew/Cmd/OptionsCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/Outdated.html delete mode 100644 docs/Homebrew/Cmd/Outdated/Args.html delete mode 100644 docs/Homebrew/Cmd/Pin.html delete mode 100644 docs/Homebrew/Cmd/Pin/Args.html delete mode 100644 docs/Homebrew/Cmd/Postinstall.html delete mode 100644 docs/Homebrew/Cmd/Postinstall/Args.html delete mode 100644 docs/Homebrew/Cmd/Prefix.html delete mode 100644 docs/Homebrew/Cmd/Prefix/Args.html delete mode 100644 docs/Homebrew/Cmd/PrettyListing.html delete mode 100644 docs/Homebrew/Cmd/PyenvSync.html delete mode 100644 docs/Homebrew/Cmd/PyenvSync/Args.html delete mode 100644 docs/Homebrew/Cmd/RbenvSync.html delete mode 100644 docs/Homebrew/Cmd/RbenvSync/Args.html delete mode 100644 docs/Homebrew/Cmd/ReadallCmd.html delete mode 100644 docs/Homebrew/Cmd/ReadallCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/Reinstall.html delete mode 100644 docs/Homebrew/Cmd/Reinstall/Args.html delete mode 100644 docs/Homebrew/Cmd/Repository.html delete mode 100644 docs/Homebrew/Cmd/Repository/Args.html delete mode 100644 docs/Homebrew/Cmd/SearchCmd.html delete mode 100644 docs/Homebrew/Cmd/SearchCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/TapCmd.html delete mode 100644 docs/Homebrew/Cmd/TapCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/TapInfo.html delete mode 100644 docs/Homebrew/Cmd/TapInfo/Args.html delete mode 100644 docs/Homebrew/Cmd/UninstallCmd.html delete mode 100644 docs/Homebrew/Cmd/UninstallCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/UnlinkCmd.html delete mode 100644 docs/Homebrew/Cmd/UnlinkCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/Unpin.html delete mode 100644 docs/Homebrew/Cmd/Unpin/Args.html delete mode 100644 docs/Homebrew/Cmd/Untap.html delete mode 100644 docs/Homebrew/Cmd/Untap/Args.html delete mode 100644 docs/Homebrew/Cmd/UpdateReport.html delete mode 100644 docs/Homebrew/Cmd/UpdateReport/Args.html delete mode 100644 docs/Homebrew/Cmd/UpgradeCmd.html delete mode 100644 docs/Homebrew/Cmd/UpgradeCmd/Args.html delete mode 100644 docs/Homebrew/Cmd/Uses.html delete mode 100644 docs/Homebrew/Cmd/Uses/Args.html delete mode 100644 docs/Homebrew/Completions.html delete mode 100644 docs/Homebrew/Completions/Variables.html delete mode 100644 docs/Homebrew/DevCmd.html delete mode 100644 docs/Homebrew/DevCmd/Audit.html delete mode 100644 docs/Homebrew/DevCmd/Audit/Args.html delete mode 100644 docs/Homebrew/DevCmd/Bottle.html delete mode 100644 docs/Homebrew/DevCmd/Bottle/Args.html delete mode 100644 docs/Homebrew/DevCmd/Bump.html delete mode 100644 docs/Homebrew/DevCmd/Bump/Args.html delete mode 100644 docs/Homebrew/DevCmd/Bump/VersionBumpInfo.html delete mode 100644 docs/Homebrew/DevCmd/BumpCaskPr.html delete mode 100644 docs/Homebrew/DevCmd/BumpCaskPr/Args.html delete mode 100644 docs/Homebrew/DevCmd/BumpFormulaPr.html delete mode 100644 docs/Homebrew/DevCmd/BumpFormulaPr/Args.html delete mode 100644 docs/Homebrew/DevCmd/BumpRevision.html delete mode 100644 docs/Homebrew/DevCmd/BumpRevision/Args.html delete mode 100644 docs/Homebrew/DevCmd/BumpUnversionedCasks.html delete mode 100644 docs/Homebrew/DevCmd/BumpUnversionedCasks/Args.html delete mode 100644 docs/Homebrew/DevCmd/Cat.html delete mode 100644 docs/Homebrew/DevCmd/Cat/Args.html delete mode 100644 docs/Homebrew/DevCmd/Contributions.html delete mode 100644 docs/Homebrew/DevCmd/Contributions/Args.html delete mode 100644 docs/Homebrew/DevCmd/Create.html delete mode 100644 docs/Homebrew/DevCmd/Create/Args.html delete mode 100644 docs/Homebrew/DevCmd/DetermineTestRunners.html delete mode 100644 docs/Homebrew/DevCmd/DetermineTestRunners/Args.html delete mode 100644 docs/Homebrew/DevCmd/DispatchBuildBottle.html delete mode 100644 docs/Homebrew/DevCmd/DispatchBuildBottle/Args.html delete mode 100644 docs/Homebrew/DevCmd/Edit.html delete mode 100644 docs/Homebrew/DevCmd/Edit/Args.html delete mode 100644 docs/Homebrew/DevCmd/Extract.html delete mode 100644 docs/Homebrew/DevCmd/Extract/Args.html delete mode 100644 docs/Homebrew/DevCmd/FormulaCmd.html delete mode 100644 docs/Homebrew/DevCmd/FormulaCmd/Args.html delete mode 100644 docs/Homebrew/DevCmd/GenerateCaskApi.html delete mode 100644 docs/Homebrew/DevCmd/GenerateCaskApi/Args.html delete mode 100644 docs/Homebrew/DevCmd/GenerateFormulaApi.html delete mode 100644 docs/Homebrew/DevCmd/GenerateFormulaApi/Args.html delete mode 100644 docs/Homebrew/DevCmd/GenerateManCompletions.html delete mode 100644 docs/Homebrew/DevCmd/GenerateManCompletions/Args.html delete mode 100644 docs/Homebrew/DevCmd/InstallBundlerGems.html delete mode 100644 docs/Homebrew/DevCmd/InstallBundlerGems/Args.html delete mode 100644 docs/Homebrew/DevCmd/Irb.html delete mode 100644 docs/Homebrew/DevCmd/Irb/Args.html delete mode 100644 docs/Homebrew/DevCmd/Linkage.html delete mode 100644 docs/Homebrew/DevCmd/Linkage/Args.html delete mode 100644 docs/Homebrew/DevCmd/LivecheckCmd.html delete mode 100644 docs/Homebrew/DevCmd/LivecheckCmd/Args.html delete mode 100644 docs/Homebrew/DevCmd/PrAutomerge.html delete mode 100644 docs/Homebrew/DevCmd/PrAutomerge/Args.html delete mode 100644 docs/Homebrew/DevCmd/PrPublish.html delete mode 100644 docs/Homebrew/DevCmd/PrPublish/Args.html delete mode 100644 docs/Homebrew/DevCmd/PrPull.html delete mode 100644 docs/Homebrew/DevCmd/PrPull/Args.html delete mode 100644 docs/Homebrew/DevCmd/PrUpload.html delete mode 100644 docs/Homebrew/DevCmd/PrUpload/Args.html delete mode 100644 docs/Homebrew/DevCmd/Prof.html delete mode 100644 docs/Homebrew/DevCmd/Prof/Args.html delete mode 100644 docs/Homebrew/DevCmd/Release.html delete mode 100644 docs/Homebrew/DevCmd/Release/Args.html delete mode 100644 docs/Homebrew/DevCmd/Ruby.html delete mode 100644 docs/Homebrew/DevCmd/Ruby/Args.html delete mode 100644 docs/Homebrew/DevCmd/Rubydoc.html delete mode 100644 docs/Homebrew/DevCmd/Rubydoc/Args.html delete mode 100644 docs/Homebrew/DevCmd/Sh.html delete mode 100644 docs/Homebrew/DevCmd/Sh/Args.html delete mode 100644 docs/Homebrew/DevCmd/StyleCmd.html delete mode 100644 docs/Homebrew/DevCmd/StyleCmd/Args.html delete mode 100644 docs/Homebrew/DevCmd/TapNew.html delete mode 100644 docs/Homebrew/DevCmd/TapNew/Args.html delete mode 100644 docs/Homebrew/DevCmd/Test.html delete mode 100644 docs/Homebrew/DevCmd/Test/Args.html delete mode 100644 docs/Homebrew/DevCmd/Tests.html delete mode 100644 docs/Homebrew/DevCmd/Tests/Args.html delete mode 100644 docs/Homebrew/DevCmd/Typecheck.html delete mode 100644 docs/Homebrew/DevCmd/Typecheck/Args.html delete mode 100644 docs/Homebrew/DevCmd/Unbottled.html delete mode 100644 docs/Homebrew/DevCmd/Unbottled/Args.html delete mode 100644 docs/Homebrew/DevCmd/Unpack.html delete mode 100644 docs/Homebrew/DevCmd/Unpack/Args.html delete mode 100644 docs/Homebrew/DevCmd/UpdateLicenseData.html delete mode 100644 docs/Homebrew/DevCmd/UpdateLicenseData/Args.html delete mode 100644 docs/Homebrew/DevCmd/UpdateMaintainers.html delete mode 100644 docs/Homebrew/DevCmd/UpdateMaintainers/Args.html delete mode 100644 docs/Homebrew/DevCmd/UpdatePythonResources.html delete mode 100644 docs/Homebrew/DevCmd/UpdatePythonResources/Args.html delete mode 100644 docs/Homebrew/DevCmd/UpdateSponsors.html delete mode 100644 docs/Homebrew/DevCmd/UpdateSponsors/Args.html delete mode 100644 docs/Homebrew/DevCmd/UpdateTest.html delete mode 100644 docs/Homebrew/DevCmd/UpdateTest/Args.html delete mode 100644 docs/Homebrew/DevCmd/VendorGems.html delete mode 100644 docs/Homebrew/DevCmd/VendorGems/Args.html delete mode 100644 docs/Homebrew/Diagnostic.html delete mode 100644 docs/Homebrew/Diagnostic/Checks.html delete mode 100644 docs/Homebrew/Diagnostic/Volumes.html delete mode 100644 docs/Homebrew/EnvConfig.html delete mode 100644 docs/Homebrew/Fetch.html delete mode 100644 docs/Homebrew/FormulaAuditor.html delete mode 100644 docs/Homebrew/FormulaCreator.html delete mode 100644 docs/Homebrew/FreePort.html delete mode 100644 docs/Homebrew/Help.html delete mode 100644 docs/Homebrew/Install.html delete mode 100644 docs/Homebrew/Livecheck.html delete mode 100644 docs/Homebrew/Livecheck/Constants.html delete mode 100644 docs/Homebrew/Livecheck/Error.html delete mode 100644 docs/Homebrew/Livecheck/LivecheckVersion.html delete mode 100644 docs/Homebrew/Livecheck/SkipConditions.html delete mode 100644 docs/Homebrew/Livecheck/Strategy.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Apache.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Bitbucket.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Cpan.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Crate.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/ElectronBuilder.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/ExtractPlist.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/ExtractPlist/Item.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Git.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/GithubLatest.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/GithubReleases.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Gnome.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Gnu.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Hackage.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/HeaderMatch.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Json.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Launchpad.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Npm.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/PageMatch.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Pypi.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Sourceforge.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Sparkle.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Sparkle/Item.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Xml.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Xorg.html delete mode 100644 docs/Homebrew/Livecheck/Strategy/Yaml.html delete mode 100644 docs/Homebrew/Manpages.html delete mode 100644 docs/Homebrew/Manpages/Converter.html delete mode 100644 docs/Homebrew/Manpages/Converter/Kramdown.html delete mode 100644 docs/Homebrew/Manpages/Converter/Roff.html delete mode 100644 docs/Homebrew/Manpages/Parser.html delete mode 100644 docs/Homebrew/Manpages/Parser/Ronn.html delete mode 100644 docs/Homebrew/Manpages/Variables.html delete mode 100644 docs/Homebrew/MissingFormula.html delete mode 100644 docs/Homebrew/Parlour.html delete mode 100644 docs/Homebrew/ResourceAuditor.html delete mode 100644 docs/Homebrew/Search.html delete mode 100644 docs/Homebrew/Service.html delete mode 100644 docs/Homebrew/Settings.html delete mode 100644 docs/Homebrew/SimulateSystem.html delete mode 100644 docs/Homebrew/SourceLocation.html delete mode 100644 docs/Homebrew/Style.html delete mode 100644 docs/Homebrew/Style/Offense.html delete mode 100644 docs/Homebrew/Style/Offenses.html delete mode 100644 docs/Homebrew/TapAuditor.html delete mode 100644 docs/Homebrew/Uninstall.html delete mode 100644 docs/Homebrew/Uninstall/DependentsMessage.html delete mode 100644 docs/Homebrew/Uninstall/DeveloperDependentsMessage.html delete mode 100644 docs/Homebrew/Uninstall/NondeveloperDependentsMessage.html delete mode 100644 docs/Homebrew/Unlink.html delete mode 100644 docs/Homebrew/UnversionedCaskChecker.html delete mode 100644 docs/Homebrew/Upgrade.html delete mode 100644 docs/HomebrewCurlDownloadStrategy.html delete mode 100644 docs/HomebrewCurlDownloadStrategyError.html delete mode 100644 docs/IO.html delete mode 100644 docs/IRB.html delete mode 100644 docs/Ignorable.html delete mode 100644 docs/Ignorable/ExceptionMixin.html delete mode 100644 docs/InstallRenamed.html delete mode 100644 docs/InstalledDependents.html delete mode 100644 docs/Keg.html delete mode 100644 docs/Keg/AlreadyLinkedError.html delete mode 100644 docs/Keg/ConflictError.html delete mode 100644 docs/Keg/DirectoryNotWritableError.html delete mode 100644 docs/Keg/LinkError.html delete mode 100644 docs/Keg/Relocation.html delete mode 100644 docs/KegOnlyReason.html delete mode 100644 docs/KegUnspecifiedError.html delete mode 100644 docs/Kernel.html delete mode 100644 docs/Language.html delete mode 100644 docs/Language/Go.html delete mode 100644 docs/Language/Java.html delete mode 100644 docs/Language/Node.html delete mode 100644 docs/Language/Node/Shebang.html delete mode 100644 docs/Language/Perl.html delete mode 100644 docs/Language/Perl/Shebang.html delete mode 100644 docs/Language/Python.html delete mode 100644 docs/Language/Python/Shebang.html delete mode 100644 docs/Language/Python/Virtualenv.html delete mode 100644 docs/Language/Python/Virtualenv/Virtualenv.html delete mode 100644 docs/LazyObject.html delete mode 100644 docs/LinkageCacheStore.html delete mode 100644 docs/LinkageChecker.html delete mode 100644 docs/LinuxRequirement.html delete mode 100644 docs/LinuxRunnerSpec.html delete mode 100644 docs/Livecheck.html delete mode 100644 docs/LocalBottleDownloadStrategy.html delete mode 100644 docs/Locale.html delete mode 100644 docs/Locale/ParserError.html delete mode 100644 docs/LockFile.html delete mode 100644 docs/MacOSRequirement.html delete mode 100644 docs/MacOSRunnerSpec.html delete mode 100644 docs/MacOSVersion.html delete mode 100644 docs/MacOSVersion/Error.html delete mode 100644 docs/MacOSVersionErrorCompat.html delete mode 100644 docs/MachOShim.html delete mode 100644 docs/Mechanize.html delete mode 100644 docs/Mechanize/HTTP.html delete mode 100644 docs/Mechanize/HTTP/ContentDisposition.html delete mode 100644 docs/Mechanize/HTTP/ContentDispositionParser.html delete mode 100644 docs/MercurialDownloadStrategy.html delete mode 100644 docs/Messages.html delete mode 100644 docs/Metafiles.html delete mode 100644 docs/Method.html delete mode 100644 docs/MethodDeprecatedError.html delete mode 100644 docs/Migrator.html delete mode 100644 docs/Migrator/MigrationNeededError.html delete mode 100644 docs/Migrator/MigratorDifferentTapsError.html delete mode 100644 docs/Migrator/MigratorNoOldpathError.html delete mode 100644 docs/MissingApplyError.html delete mode 100644 docs/Mktemp.html delete mode 100644 docs/Module.html delete mode 100644 docs/MultipleVersionsInstalledError.html delete mode 100644 docs/NilClass.html delete mode 100644 docs/NoSuchKegError.html delete mode 100644 docs/NoUnzipCurlDownloadStrategy.html delete mode 100644 docs/NotAKegError.html delete mode 100644 docs/Numeric.html delete mode 100644 docs/OS.html delete mode 100644 docs/OS/Linux.html delete mode 100644 docs/OS/Linux/Elf.html delete mode 100644 docs/OS/Linux/Glibc.html delete mode 100644 docs/OS/Linux/Kernel.html delete mode 100644 docs/OS/Linux/Ld.html delete mode 100644 docs/OS/Mac.html delete mode 100644 docs/OS/Mac/BaseSDKLocator/NoSDKError.html delete mode 100644 docs/OS/Mac/CLT.html delete mode 100644 docs/OS/Mac/CLTSDKLocator.html delete mode 100644 docs/OS/Mac/SDK.html delete mode 100644 docs/OS/Mac/Xcode.html delete mode 100644 docs/OS/Mac/XcodeSDKLocator.html delete mode 100644 docs/Object.html delete mode 100644 docs/ObserverPathnameExtension.html delete mode 100644 docs/OnSystem.html delete mode 100644 docs/OnSystem/MacOSAndLinux.html delete mode 100644 docs/OnSystem/MacOSOnly.html delete mode 100644 docs/OperationInProgressError.html delete mode 100644 docs/Option.html delete mode 100644 docs/Options.html delete mode 100644 docs/PATH.html delete mode 100644 docs/Patch.html delete mode 100644 docs/Pathname.html delete mode 100644 docs/PkgVersion.html delete mode 100644 docs/PourBottleCheck.html delete mode 100644 docs/PyPI.html delete mode 100644 docs/PyPI/Package.html delete mode 100644 docs/Readall.html delete mode 100644 docs/Repology.html delete mode 100644 docs/Reporter.html delete mode 100644 docs/Reporter/ReporterRevisionUnsetError.html delete mode 100644 docs/ReporterHub.html delete mode 100644 docs/Requirement.html delete mode 100644 docs/Requirements.html delete mode 100644 docs/Resource.html delete mode 100644 docs/Resource/Go.html delete mode 100644 docs/Resource/Partial.html delete mode 100644 docs/Resource/PatchResource.html delete mode 100644 docs/ResourceMissingError.html delete mode 100644 docs/ResourceStageContext.html delete mode 100644 docs/RuboCop.html delete mode 100644 docs/RuboCop/AST.html delete mode 100644 docs/RuboCop/AST/Node.html delete mode 100644 docs/RuboCop/Cask.html delete mode 100644 docs/RuboCop/Cask/AST.html delete mode 100644 docs/RuboCop/Cask/AST/CaskBlock.html delete mode 100644 docs/RuboCop/Cask/AST/CaskHeader.html delete mode 100644 docs/RuboCop/Cask/AST/Stanza.html delete mode 100644 docs/RuboCop/Cask/AST/StanzaBlock.html delete mode 100644 docs/RuboCop/Cask/Constants.html delete mode 100644 docs/RuboCop/Cop.html delete mode 100644 docs/RuboCop/Cop/Cask.html delete mode 100644 docs/RuboCop/Cop/Cask/ArrayAlphabetization.html delete mode 100644 docs/RuboCop/Cop/Cask/CaskHelp.html delete mode 100644 docs/RuboCop/Cop/Cask/Desc.html delete mode 100644 docs/RuboCop/Cop/Cask/Discontinued.html delete mode 100644 docs/RuboCop/Cop/Cask/HomepageUrlTrailingSlash.html delete mode 100644 docs/RuboCop/Cop/Cask/NoOverrides.html delete mode 100644 docs/RuboCop/Cop/Cask/OnDescStanza.html delete mode 100644 docs/RuboCop/Cop/Cask/OnHomepageStanza.html delete mode 100644 docs/RuboCop/Cop/Cask/OnSystemConditionals.html delete mode 100644 docs/RuboCop/Cop/Cask/OnUrlStanza.html delete mode 100644 docs/RuboCop/Cop/Cask/SharedFilelistGlob.html delete mode 100644 docs/RuboCop/Cop/Cask/StanzaGrouping.html delete mode 100644 docs/RuboCop/Cop/Cask/StanzaOrder.html delete mode 100644 docs/RuboCop/Cop/Cask/UninstallMethodsOrder.html delete mode 100644 docs/RuboCop/Cop/Cask/Url.html delete mode 100644 docs/RuboCop/Cop/Cask/UrlLegacyCommaSeparators.html delete mode 100644 docs/RuboCop/Cop/Cask/Variables.html delete mode 100644 docs/RuboCop/Cop/DescHelper.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/AssertStatements.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/BottleDigestIndentation.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/BottleFormat.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/BottleOrder.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/BottleTagIndentation.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Caveats.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Checksum.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/ChecksumCase.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/ClassInheritance.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/ClassName.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Comments.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/ComponentsOrder.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/ComponentsRedundancy.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Conflicts.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/DependencyOrder.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/DeprecateDisableDate.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/DeprecateDisableReason.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Desc.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Files.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/GenerateCompletionsDSL.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/GitUrls.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Homepage.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/KegOnly.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/LicenseArrays.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Licenses.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Lines.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/LivecheckRegexCaseInsensitive.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/LivecheckRegexExtension.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/LivecheckRegexIfPageMatch.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/LivecheckRegexParentheses.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/LivecheckSkip.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/LivecheckUrlProvided.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/LivecheckUrlSymbol.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/MacOSOnLinux.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Miscellaneous.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/MpiCheck.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/OnSystemConditionals.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/OptionDeclarations.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Options.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Patches.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/ProvidedByMacos.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/PyPiUrls.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/PyoxidizerCheck.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/PythonVersions.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/QuicTLSCheck.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/ResourceRequiresDependencies.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/SafePopenCommands.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Service.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/ShellVariables.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/SingleGenerateCompletionsDSLCall.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Test.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Text.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Urls.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/UsesFromMacos.html delete mode 100644 docs/RuboCop/Cop/FormulaAudit/Version.html delete mode 100644 docs/RuboCop/Cop/FormulaAuditStrict.html delete mode 100644 docs/RuboCop/Cop/FormulaAuditStrict/GitUrls.html delete mode 100644 docs/RuboCop/Cop/FormulaAuditStrict/MakeCheck.html delete mode 100644 docs/RuboCop/Cop/FormulaAuditStrict/Requirements.html delete mode 100644 docs/RuboCop/Cop/FormulaAuditStrict/RustCheck.html delete mode 100644 docs/RuboCop/Cop/FormulaAuditStrict/TestPresent.html delete mode 100644 docs/RuboCop/Cop/FormulaAuditStrict/Text.html delete mode 100644 docs/RuboCop/Cop/FormulaCop.html delete mode 100644 docs/RuboCop/Cop/HelperFunctions.html delete mode 100644 docs/RuboCop/Cop/Homebrew.html delete mode 100644 docs/RuboCop/Cop/Homebrew/Blank.html delete mode 100644 docs/RuboCop/Cop/Homebrew/CompactBlank.html delete mode 100644 docs/RuboCop/Cop/Homebrew/ExecShellMetacharacters.html delete mode 100644 docs/RuboCop/Cop/Homebrew/IORead.html delete mode 100644 docs/RuboCop/Cop/Homebrew/InstallBundlerGems.html delete mode 100644 docs/RuboCop/Cop/Homebrew/MoveToExtendOS.html delete mode 100644 docs/RuboCop/Cop/Homebrew/NegateInclude.html delete mode 100644 docs/RuboCop/Cop/Homebrew/Presence.html delete mode 100644 docs/RuboCop/Cop/Homebrew/Present.html delete mode 100644 docs/RuboCop/Cop/Homebrew/SafeNavigationWithBlank.html delete mode 100644 docs/RuboCop/Cop/Homebrew/ShellCommands.html delete mode 100644 docs/RuboCop/Cop/OnSystemConditionalsHelper.html delete mode 100644 docs/SBOM.html delete mode 100644 docs/SPDX.html delete mode 100644 docs/Sandbox.html delete mode 100644 docs/SharedAudits.html delete mode 100644 docs/SharedEnvExtension.html delete mode 100644 docs/ShebangDetectionError.html delete mode 100644 docs/Singleton.html delete mode 100644 docs/SoftwareSpec.html delete mode 100644 docs/Sorbet/Private.html delete mode 100644 docs/Sorbet/Private/Static.html delete mode 100644 docs/Sorbet/Private/Static/ENVClass.html delete mode 100644 docs/Stdenv.html delete mode 100644 docs/String.html delete mode 100644 docs/StringInreplaceExtension.html delete mode 100644 docs/StringPatch.html delete mode 100644 docs/SubversionDownloadStrategy.html delete mode 100644 docs/Superenv.html delete mode 100644 docs/Symbol.html delete mode 100644 docs/SystemCommand.html delete mode 100644 docs/SystemCommand/Mixin.html delete mode 100644 docs/SystemCommand/Result.html delete mode 100644 docs/SystemConfig.html delete mode 100644 docs/Tab.html delete mode 100644 docs/Tap.html delete mode 100644 docs/Tap/InvalidNameError.html delete mode 100644 docs/TapAlreadyTappedError.html delete mode 100644 docs/TapConfig.html delete mode 100644 docs/TapCoreRemoteMismatchError.html delete mode 100644 docs/TapFormulaAmbiguityError.html delete mode 100644 docs/TapFormulaClassUnavailableError.html delete mode 100644 docs/TapFormulaOrCaskUnavailableError.html delete mode 100644 docs/TapFormulaUnavailableError.html delete mode 100644 docs/TapFormulaUnreadableError.html delete mode 100644 docs/TapNoCustomRemoteError.html delete mode 100644 docs/TapRemoteMismatchError.html delete mode 100644 docs/TapUnavailableError.html delete mode 100644 docs/Tapioca.html delete mode 100644 docs/Tapioca/Compilers.html delete mode 100644 docs/Tapioca/Compilers/Args.html delete mode 100644 docs/Tapioca/Compilers/EnvConfig.html delete mode 100644 docs/Tapioca/Compilers/RuboCop.html delete mode 100644 docs/Tapioca/Compilers/Tty.html delete mode 100644 docs/TestRunnerFormula.html delete mode 100644 docs/Time.html delete mode 100644 docs/TrueClass.html delete mode 100644 docs/Tty.html delete mode 100644 docs/URL.html delete mode 100644 docs/UnbottledError.html delete mode 100644 docs/UnboundMethod.html delete mode 100644 docs/UnpackStrategy.html delete mode 100644 docs/UnpackStrategy/Air.html delete mode 100644 docs/UnpackStrategy/Bazaar.html delete mode 100644 docs/UnpackStrategy/Bzip2.html delete mode 100644 docs/UnpackStrategy/Cab.html delete mode 100644 docs/UnpackStrategy/Compress.html delete mode 100644 docs/UnpackStrategy/Cvs.html delete mode 100644 docs/UnpackStrategy/Directory.html delete mode 100644 docs/UnpackStrategy/Dmg.html delete mode 100644 docs/UnpackStrategy/Dmg/Bom.html delete mode 100644 docs/UnpackStrategy/Dmg/Bom/EmptyError.html delete mode 100644 docs/UnpackStrategy/Dmg/Bom/Error.html delete mode 100644 docs/UnpackStrategy/Executable.html delete mode 100644 docs/UnpackStrategy/Fossil.html delete mode 100644 docs/UnpackStrategy/GenericUnar.html delete mode 100644 docs/UnpackStrategy/Git.html delete mode 100644 docs/UnpackStrategy/Gzip.html delete mode 100644 docs/UnpackStrategy/Jar.html delete mode 100644 docs/UnpackStrategy/Lha.html delete mode 100644 docs/UnpackStrategy/LuaRock.html delete mode 100644 docs/UnpackStrategy/Lzip.html delete mode 100644 docs/UnpackStrategy/Lzma.html delete mode 100644 docs/UnpackStrategy/Mercurial.html delete mode 100644 docs/UnpackStrategy/MicrosoftOfficeXml.html delete mode 100644 docs/UnpackStrategy/Otf.html delete mode 100644 docs/UnpackStrategy/P7Zip.html delete mode 100644 docs/UnpackStrategy/Pax.html delete mode 100644 docs/UnpackStrategy/Pkg.html delete mode 100644 docs/UnpackStrategy/Rar.html delete mode 100644 docs/UnpackStrategy/SelfExtractingExecutable.html delete mode 100644 docs/UnpackStrategy/Sit.html delete mode 100644 docs/UnpackStrategy/Subversion.html delete mode 100644 docs/UnpackStrategy/Tar.html delete mode 100644 docs/UnpackStrategy/Ttf.html delete mode 100644 docs/UnpackStrategy/Uncompressed.html delete mode 100644 docs/UnpackStrategy/Xar.html delete mode 100644 docs/UnpackStrategy/Xz.html delete mode 100644 docs/UnpackStrategy/Zip.html delete mode 100644 docs/UnpackStrategy/Zstd.html delete mode 100644 docs/UnsatisfiedRequirements.html delete mode 100644 docs/UnsupportedInstallationMethod.html delete mode 100644 docs/UsageError.html delete mode 100644 docs/User.html delete mode 100644 docs/UsesFromMacOSDependency.html delete mode 100644 docs/Utils.html delete mode 100644 docs/Utils/AST.html delete mode 100644 docs/Utils/AST/FormulaAST.html delete mode 100644 docs/Utils/Analytics.html delete mode 100644 docs/Utils/Backtrace.html delete mode 100644 docs/Utils/Bottles.html delete mode 100644 docs/Utils/Bottles/Collector.html delete mode 100644 docs/Utils/Bottles/MacOSOverride.html delete mode 100644 docs/Utils/Bottles/Tag.html delete mode 100644 docs/Utils/Bottles/TagSpecification.html delete mode 100644 docs/Utils/Curl.html delete mode 100644 docs/Utils/Git.html delete mode 100644 docs/Utils/Gzip.html delete mode 100644 docs/Utils/Inreplace.html delete mode 100644 docs/Utils/Inreplace/Error.html delete mode 100644 docs/Utils/Link.html delete mode 100644 docs/Utils/Path.html delete mode 100644 docs/Utils/Service.html delete mode 100644 docs/Utils/Shebang.html delete mode 100644 docs/Utils/Shebang/RewriteInfo.html delete mode 100644 docs/Utils/Shell.html delete mode 100644 docs/Utils/Svn.html delete mode 100644 docs/Utils/Tar.html delete mode 100644 docs/Utils/Timer.html delete mode 100644 docs/Utils/TopologicalHash.html delete mode 100644 docs/Utils/UID.html delete mode 100644 docs/VCSDownloadStrategy.html delete mode 100644 docs/Version.html delete mode 100644 docs/Version/AlphaToken.html delete mode 100644 docs/Version/BetaToken.html delete mode 100644 docs/Version/CompositeToken.html delete mode 100644 docs/Version/NumericToken.html delete mode 100644 docs/Version/Parser.html delete mode 100644 docs/Version/PatchToken.html delete mode 100644 docs/Version/PostToken.html delete mode 100644 docs/Version/PreToken.html delete mode 100644 docs/Version/RCToken.html delete mode 100644 docs/Version/RegexParser.html delete mode 100644 docs/Version/StemParser.html delete mode 100644 docs/Version/StringToken.html delete mode 100644 docs/Version/Token.html delete mode 100644 docs/Version/UrlParser.html delete mode 100644 docs/Warnings.html delete mode 100644 docs/XcodeRequirement.html delete mode 100644 docs/_index.html delete mode 100644 docs/class_list.html delete mode 100644 docs/css/common.css delete mode 100644 docs/css/full_list.css delete mode 100644 docs/css/style.css delete mode 100644 docs/file.README.html delete mode 100644 docs/file_list.html delete mode 100644 docs/frames.html delete mode 100644 docs/index.html delete mode 100644 docs/js/app.js delete mode 100644 docs/js/full_list.js delete mode 100644 docs/js/jquery.js delete mode 100644 docs/method_list.html delete mode 100644 docs/top-level-namespace.html diff --git a/.gitignore b/.gitignore index b8cc71c44..e60dee1f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ .yardoc/ _site/ -brew/ +brew vendor/ Gemfile.lock + +# Exclude the generated site files +docs/ +!docs/_config.yml +!docs/CNAME \ No newline at end of file diff --git a/docs/APIHashable.html b/docs/APIHashable.html deleted file mode 100644 index 48d9f5d09..000000000 --- a/docs/APIHashable.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - Module: APIHashable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: APIHashable - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Cask::Cask, Formula
-
- - - -
-
Defined in:
-
extend/api_hashable.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Used to substitute common paths with generic placeholders when generating JSON for the API.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #generated_hash!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'extend/api_hashable.rb', line 20
-
-def generated_hash!
-  return unless generating_hash?
-
-  # Revert monkeypatches for API generation
-  Object.send(:remove_const, :HOMEBREW_PREFIX)
-  Object.const_set(:HOMEBREW_PREFIX, @old_homebrew_prefix)
-  ENV["HOME"] = @old_home
-
-  @generating_hash = false
-end
-
-
- -
-

- - #generating_hash!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-
-
# File 'extend/api_hashable.rb', line 6
-
-def generating_hash!
-  return if generating_hash?
-
-  # Apply monkeypatches for API generation
-  @old_homebrew_prefix = HOMEBREW_PREFIX
-  @old_homebrew_cellar = HOMEBREW_CELLAR
-  @old_home = Dir.home
-  Object.send(:remove_const, :HOMEBREW_PREFIX)
-  Object.const_set(:HOMEBREW_PREFIX, Pathname.new(HOMEBREW_PREFIX_PLACEHOLDER))
-  ENV["HOME"] = HOMEBREW_HOME_PLACEHOLDER
-
-  @generating_hash = true
-end
-
-
- -
-

- - #generating_hash?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-34
-
-
# File 'extend/api_hashable.rb', line 31
-
-def generating_hash?
-  @generating_hash ||= false
-  @generating_hash == true
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/AbstractCoreTap.html b/docs/AbstractCoreTap.html deleted file mode 100644 index 7085454bd..000000000 --- a/docs/AbstractCoreTap.html +++ /dev/null @@ -1,625 +0,0 @@ - - - - - - - Class: AbstractCoreTap - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: AbstractCoreTap - Abstract - - -

-
- -
-
Inherits:
-
- Tap - - - show all - -
-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - - - - - - -
-
Defined in:
-
tap.rb
-
- -
- -

Overview

-
-
- This class is abstract. -

It cannot be directly instantiated. Subclasses must implement the abstract methods below.

-
-
- - -
-
-
- - -
-

Direct Known Subclasses

-

CoreCaskTap, CoreTap

-
- - - -

Constant Summary

- -

Constants inherited - from Tap

-

Tap::HOMEBREW_TAP_JSON_FILES, Tap::TAP_DIRECTORY

- - - - -

Instance Attribute Summary

- -

Attributes inherited from Tap

-

#full_name, #git_repository, #name, #path, #repository, #user

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from Tap

-

#alias_dir, #alias_file_to_name, #alias_files, #alias_reverse_table, #alias_table, #aliases, all, #allow_bump?, #allowed_by_env?, allowed_taps, #audit_exception, #audit_exceptions, #autobump, #cask_dir, #cask_file?, #cask_files, #cask_files_by_name, #cask_renames, #cask_reverse_renames, #cask_tokens, #clear_cache, cmd_directories, #command_dir, #command_files, #config, #contents, #core_cask_tap?, #core_tap?, #custom_remote?, #default_remote, each, fetch, #fix_remote_configuration, #forbidden_by_env?, forbidden_taps, #formula_dir, #formula_file?, #formula_files, #formula_files_by_name, #formula_names, #formula_renames, #formula_reverse_renames, from_path, #git?, #git_branch, #git_head, #git_last_commit, #initialize, #install, installed, #installed?, #issues_url, #link_completions_and_manpages, names, #new_cask_path, #new_formula_path, #official?, #potential_formula_dirs, #prefix_to_versioned_formulae_names, #private?, #pypi_formula_mappings, #relative_cask_path, #remote, #remote_repo, #repository_var_suffix, #reverse_tap_migrations_renames, #shallow?, #style_exceptions, #synced_versions_formulae, tap_migration_oldnames, #tap_migrations, #to_hash, #uninstall, untapped_official_taps, with_cask_token, with_formula_name

- - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Enumerable

-

#compact_blank, #exclude?

-
-

Constructor Details

- -

This class inherits a constructor from Tap

- -
- - -
-

Class Method Details

- - -
-

- - .ensure_installed!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
Deprecated.

Use AbstractCoreTap.instance.ensure_installed! instead.

-
-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1161
-1162
-1163
-1164
-1165
-
-
# File 'tap.rb', line 1161
-
-def self.ensure_installed!
-  odeprecated "`#{self}.ensure_installed!`", "`#{self}.instance.ensure_installed!`"
-
-  instance.ensure_installed!
-end
-
-
- -
-

- - .instanceT.attached_class - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get the singleton instance for this Tap.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.attached_class) - - - -
  • - -
- -
- - - - -
-
-
-
-1148
-1149
-1150
-
-
# File 'tap.rb', line 1148
-
-def self.instance
-  @instance ||= T.unsafe(self).new
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #ensure_installed!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1153
-1154
-1155
-1156
-1157
-1158
-
-
# File 'tap.rb', line 1153
-
-def ensure_installed!
-  return unless Homebrew::EnvConfig.no_install_from_api?
-  return if Homebrew::EnvConfig.automatically_set_no_install_from_api?
-
-  super
-end
-
-
- -
-

- - #formula_file_to_name(file) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - file - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1168
-1169
-1170
-
-
# File 'tap.rb', line 1168
-
-def formula_file_to_name(file)
-  file.basename(".rb").to_s
-end
-
-
- -
-

- - #should_report_analytics?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1173
-1174
-1175
-1176
-1177
-
-
# File 'tap.rb', line 1173
-
-def should_report_analytics?
-  return super if Homebrew::EnvConfig.no_install_from_api?
-
-  true
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/AbstractDownloadStrategy.html b/docs/AbstractDownloadStrategy.html deleted file mode 100644 index e1ccce93a..000000000 --- a/docs/AbstractDownloadStrategy.html +++ /dev/null @@ -1,1087 +0,0 @@ - - - - - - - Class: AbstractDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: AbstractDownloadStrategy - Abstract - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
Context, FileUtils, SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

Abstract superclass for all download strategies.

-
-
- - -
-
-
- - -
-

Direct Known Subclasses

-

AbstractFileDownloadStrategy, VCSDownloadStrategy

-
-

Defined Under Namespace

-

- - - Modules: Pourable - - - - -

- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ AbstractDownloadStrategy - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of AbstractDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-56
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'download_strategy.rb', line 56
-
-def initialize(url, name, version, **meta)
-  @url = url
-  @name = name
-  @version = version
-  @cache = meta.fetch(:cache, HOMEBREW_CACHE)
-  @meta = meta
-  @quiet = false
-  extend Pourable if meta[:bottle]
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #cacheObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-52
-53
-54
-
-
# File 'download_strategy.rb', line 52
-
-def cache
-  @cache
-end
-
-
- - - -
-

- - #cached_locationPathname (readonly) - - - - - -

-
-

Location of the cached download.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'download_strategy.rb', line 50
-
-def cached_location
-  @cached_location
-end
-
-
- - - -
-

- - #urlString (readonly) - - - - - -

-
-

The download URL.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-44
-45
-46
-
-
# File 'download_strategy.rb', line 44
-
-def url
-  @url
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #basenameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-142
-143
-144
-
-
# File 'download_strategy.rb', line 142
-
-def basename
-  cached_location.basename
-end
-
-
- -
-

- - #clear_cacheObject - - - - - -

-
-

Remove #cached_location and any other files associated with the resource -from the cache.

- - -
-
-
- - -
- - - - -
-
-
-
-138
-139
-140
-
-
# File 'download_strategy.rb', line 138
-
-def clear_cache
-  rm_rf(cached_location)
-end
-
-
- -
-

- - #fetch(timeout: nil) ⇒ Object - - - - - -

-
-

Download and cache the resource at #cached_location.

- - -
-
-
- - -
- - - - -
-
-
-
-69
-
-
# File 'download_strategy.rb', line 69
-
-def fetch(timeout: nil); end
-
-
- -
-

- - #quiet!void - - - - - -

-
-

This method returns an undefined value.

Disable any output during downloading.

- - -
-
-
- - -
- - - - -
-
-
-
-75
-76
-77
-
-
# File 'download_strategy.rb', line 75
-
-def quiet!
-  @quiet = true
-end
-
-
- -
-

- - #quiet?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-86
-87
-88
-
-
# File 'download_strategy.rb', line 86
-
-def quiet?
-  Context.current.quiet? || @quiet
-end
-
-
- -
-

- - #shutup!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
Deprecated.

Use #quiet! instead.

-
-

This method returns an undefined value.

Disable any output during downloading.

- - -
-
-
- - -
- - - - -
-
-
-
-81
-82
-83
-84
-
-
# File 'download_strategy.rb', line 81
-
-def shutup!
-  odisabled "`AbstractDownloadStrategy#shutup!`", "`AbstractDownloadStrategy#quiet!`"
-  quiet!
-end
-
-
- -
-

- - #source_modified_timeTime - - - - - -

-
-

Returns the most recent modified time for all files in the current working directory after stage.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-130
-131
-132
-
-
# File 'download_strategy.rb', line 130
-
-def source_modified_time
-  Pathname.pwd.to_enum(:find).select(&:file?).map(&:mtime).max
-end
-
-
- -
-

- - #stage(&block) ⇒ Object - - - - - -

-
-

Unpack #cached_location into the current working directory.

- -

Additionally, if a block is given, the working directory was previously empty -and a single directory is extracted from the archive, the block will be called -with the working directory changed to that directory. Otherwise this method -will return, or the block will be called, without changing the current working -directory.

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-105
-106
-107
-
-
# File 'download_strategy.rb', line 99
-
-def stage(&block)
-  UnpackStrategy.detect(cached_location,
-                        prioritize_extension: true,
-                        ref_type: @ref_type, ref: @ref)
-                .extract_nestedly(basename:,
-                                  prioritize_extension: true,
-                                  verbose:              verbose? && !quiet?)
-  chdir(&block) if block
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/AbstractDownloadStrategy/Pourable.html b/docs/AbstractDownloadStrategy/Pourable.html deleted file mode 100644 index 9e520b5fa..000000000 --- a/docs/AbstractDownloadStrategy/Pourable.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - Module: AbstractDownloadStrategy::Pourable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: AbstractDownloadStrategy::Pourable - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb,
- download_strategy.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #stageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-
-
# File 'download_strategy.rb', line 34
-
-def stage
-  ohai "Pouring #{basename}"
-  super
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/AbstractFileDownloadStrategy.html b/docs/AbstractFileDownloadStrategy.html deleted file mode 100644 index 0ac037d8f..000000000 --- a/docs/AbstractFileDownloadStrategy.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - - - Class: AbstractFileDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: AbstractFileDownloadStrategy - Abstract - - Private -

-
- -
-
Inherits:
-
- AbstractDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

Abstract superclass for all download strategies downloading a single file.

-
-
- - -
-
-
- - -
- - - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#clear_cache, #fetch, #initialize, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -

This class inherits a constructor from AbstractDownloadStrategy

- -
- - -
-

Instance Method Details

- - -
-

- - #basenameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-305
-306
-307
-
-
# File 'download_strategy.rb', line 305
-
-def basename
-  cached_location.basename.sub(/^[\da-f]{64}--/, "")
-end
-
-
- -
-

- - #cached_locationObject - - - - - -

-
-

Path for storing the completed download.

- - -
-
-
- - -
- - - - -
-
-
-
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-
-
# File 'download_strategy.rb', line 291
-
-def cached_location
-  return @cached_location if defined?(@cached_location)
-
-  url_sha256 = Digest::SHA256.hexdigest(url)
-  downloads = Pathname.glob(HOMEBREW_CACHE/"downloads/#{url_sha256}--*")
-                      .reject { |path| path.extname.end_with?(".incomplete") }
-
-  @cached_location = if downloads.count == 1
-    downloads.first
-  else
-    HOMEBREW_CACHE/"downloads/#{url_sha256}--#{Utils.safe_filename(resolved_basename)}"
-  end
-end
-
-
- -
-
-
-

Path of the symlink (whose name includes the resource name, version and extension) -pointing to #cached_location.

- - -
-
-
- - -
- - - - -
-
-
-
-281
-282
-283
-284
-285
-286
-
-
# File 'download_strategy.rb', line 281
-
-def symlink_location
-  return @symlink_location if defined?(@symlink_location)
-
-  ext = Pathname(parse_basename(url)).extname
-  @symlink_location = @cache/Utils.safe_filename("#{name}--#{version}#{ext}")
-end
-
-
- -
-

- - #temporary_pathObject - - - - - -

-
-

Path for storing an incomplete download while the download is still in progress.

- - -
-
-
- - -
- - - - -
-
-
-
-273
-274
-275
-
-
# File 'download_strategy.rb', line 273
-
-def temporary_path
-  @temporary_path ||= Pathname.new("#{cached_location}.incomplete")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/ArchRequirement.html b/docs/ArchRequirement.html deleted file mode 100644 index 8cde8d1a5..000000000 --- a/docs/ArchRequirement.html +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - - Class: ArchRequirement - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: ArchRequirement - - - Private -

-
- -
-
Inherits:
-
- Requirement - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
requirements/arch_requirement.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A requirement on a specific architecture.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Dependable

-

Dependable::RESERVED_TAGS

- - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #arch ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from Requirement

-

#cask, #download, #name

- - - -

Attributes included from Dependable

-

#tags

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Requirement

-

cask, download, #env, env, #env_proc, expand, fatal, #fatal?, #mktemp, #modify_build_environment, #option_names, prune, prune?, #satisfied?, #satisfied_result_parent, satisfy

- - - - - - - - - -

Methods included from BuildEnvironment::DSL

-

#env, #inherited

- - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- - - - - - - - - -

Methods included from Dependable

-

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

-
-

Constructor Details

- -
-

- - #initialize(tags) ⇒ ArchRequirement - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ArchRequirement.

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-
-
# File 'requirements/arch_requirement.rb', line 12
-
-def initialize(tags)
-  @arch = tags.shift
-  super
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #archObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'requirements/arch_requirement.rb', line 10
-
-def arch
-  @arch
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #display_sString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-37
-38
-
-
# File 'requirements/arch_requirement.rb', line 36
-
-def display_s
-  "#{@arch} architecture"
-end
-
-
- -
-

- - #messageString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'requirements/arch_requirement.rb', line 26
-
-def message
-  "The #{@arch} architecture is required for this software."
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Array.html b/docs/Array.html deleted file mode 100644 index bfc3f6c79..000000000 --- a/docs/Array.html +++ /dev/null @@ -1,922 +0,0 @@ - - - - - - - Class: Array - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Array - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/array.rb,
- extend/blank.rb,
extend/object/deep_dup.rb,
extend/array.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-

Direct Known Subclasses

-

Homebrew::CLI::NamedArgs

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #blank?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array is blank if it's empty:

- -
[].blank?      # => true
-[1,2,3].blank? # => false
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-99
-
-
# File 'extend/blank.rb', line 99
-
-def blank? = empty?
-
-
- -
-

- - #deep_dupT.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a deep copy of array.

- -

array = [1, [2, 3]] - dup = array.deep_dup - dup[1][2] = 4

- -

array[1][2] # => nil - dup[1][2] # => 4

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'extend/object/deep_dup.rb', line 32
-
-def deep_dup
-  T.unsafe(self).map(&:deep_dup)
-end
-
-
- -
-

- - #fifthElem? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Equal to self[4].

- -

Example

- -
%w( a b c d e ).fifth # => "e"
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Elem, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'extend/array.rb', line 39
-
-def fifth = self[4]
-
-
- -
-

- - #fourthElem? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Equal to self[3].

- -

Example

- -
%w( a b c d e ).fourth # => "d"
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Elem, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'extend/array.rb', line 30
-
-def fourth = self[3]
-
-
- -
-

- - #present?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-102
-
-
# File 'extend/blank.rb', line 102
-
-def present? = !empty? # :nodoc:
-
-
- -
-

- - #secondElem? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Equal to self[1].

- -

Example

- -
%w( a b c d e ).second # => "b"
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Elem, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-
-
# File 'extend/array.rb', line 12
-
-def second = self[1]
-
-
- -
-

- - #thirdElem? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Equal to self[2].

- -

Example

- -
%w( a b c d e ).third # => "c"
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Elem, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'extend/array.rb', line 21
-
-def third = self[2]
-
-
- -
-

- - #to_sentence(words_connector: ", ", two_words_connector: " and ", last_word_connector: " and ") ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Converts the array to a comma-separated sentence where the last element is -joined by the connector word.

- -

Examples

- -
[].to_sentence                      # => ""
-['one'].to_sentence                 # => "one"
-['one', 'two'].to_sentence          # => "one and two"
-['one', 'two', 'three'].to_sentence # => "one, two and three"
-['one', 'two'].to_sentence(two_words_connector: '-')
-# => "one-two"
-
- -
['one', 'two', 'three'].to_sentence(words_connector: ' or ', last_word_connector: ' or at least ')
-# => "one or two or at least three"
-
- -

Copyright (c) David Heinemeier Hansson

- -

Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense and/or sell copies of the Software and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions:

- -

The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software.

- -

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

- - -
-
-
-

Parameters:

-
    - -
  • - - words_connector - - - (String) - - - (defaults to: ", ") - - - — -

    The sign or word used to join all but the last -element in arrays with three or more elements (default: ", ").

    -
    - -
  • - -
  • - - two_words_connector - - - (String) - - - (defaults to: " and ") - - - — -

    The sign or word used to join the elements -in arrays with two elements (default: " and ").

    -
    - -
  • - -
  • - - last_word_connector - - - (String) - - - (defaults to: " and ") - - - — -

    The sign or word used to join the last element -in arrays with three or more elements (default: " and ").

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'extend/array.rb', line 93
-
-def to_sentence(words_connector: ", ", two_words_connector: " and ", last_word_connector: " and ")
-  case length
-  when 0
-    +""
-  when 1
-    # This is not typesafe, if the array contains a BasicObject
-    +T.unsafe(self[0]).to_s
-  when 2
-    +"#{self[0]}#{two_words_connector}#{self[1]}"
-  else
-    +"#{T.must(self[0...-1]).join(words_connector)}#{last_word_connector}#{self[-1]}"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Attr.html b/docs/Attr.html deleted file mode 100644 index c991401e1..000000000 --- a/docs/Attr.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - Class: Attr - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Attr - - - Private -

-
- -
-
Inherits:
-
- Parlour::Plugin - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/parlour/attr.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Parlour type signature generator plugin for Homebrew DSL attributes.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Instance Method Details

- - -
-

- - #generate(root) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - root - - - (Parlour::RbiGenerator::Namespace) - - - -
  • - -
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-
-
# File 'sorbet/parlour/attr.rb', line 7
-
-def generate(root)
-  tree = T.let([], T::Array[T.untyped])
-  Homebrew::Parlour.ast_list.each do |node|
-    tree += find_custom_attr(node)
-  end
-  process_custom_attr(tree, root)
-end
-
-
- -
-

- - #strictnessString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'sorbet/parlour/attr.rb', line 16
-
-def strictness
-  "strict"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Attrable.html b/docs/Attrable.html deleted file mode 100644 index 50e60b02a..000000000 --- a/docs/Attrable.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - Module: Attrable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Attrable - - - Private -

-
- - - - - - - - - -
-
Included in:
-
BottleSpecification, Cask::Artifact::AbstractArtifact, Cask::Audit, Cask::Cask, Cask::DSL, Cask::DSL::Caveats, Cask::Installer, Debrew, Formula, FormulaInstaller, Homebrew::Cleanup, Requirement, SystemCommand
-
- - - -
-
Defined in:
-
attrable.rb,
- attrable.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #attr_predicate(*attrs) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - attrs - - - (Symbol) - - - -
  • - -
- - -
- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-
-
# File 'attrable.rb', line 6
-
-def attr_predicate(*attrs)
-  attrs.each do |attr|
-    define_method attr do
-      instance_variable_get("@#{attr.to_s.sub(/\?$/, "")}") == true
-    end
-  end
-end
-
-
- -
-

- - #attr_rw(*attrs) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - attrs - - - (Symbol) - - - -
  • - -
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'attrable.rb', line 15
-
-def attr_rw(*attrs)
-  attrs.each do |attr|
-    define_method attr do |val = nil|
-      val.nil? ? instance_variable_get(:"@#{attr}") : instance_variable_set(:"@#{attr}", val)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/BazaarDownloadStrategy.html b/docs/BazaarDownloadStrategy.html deleted file mode 100644 index a5f757352..000000000 --- a/docs/BazaarDownloadStrategy.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - Class: BazaarDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: BazaarDownloadStrategy - - - -

-
- -
-
Inherits:
-
- VCSDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a Bazaar repository.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from VCSDownloadStrategy

-

VCSDownloadStrategy::REF_TYPES

- - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from VCSDownloadStrategy

-

#commit_outdated?, #fetch, #fetch_last_commit, #head?

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #quiet!, #quiet?, #shutup!, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ BazaarDownloadStrategy - - - - - -

-
-

Returns a new instance of BazaarDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-1328
-1329
-1330
-1331
-
-
# File 'download_strategy.rb', line 1328
-
-def initialize(url, name, version, **meta)
-  super
-  @url = @url.sub(%r{^bzr://}, "")
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #last_commitString - - - - - -

-
-

Return last commit's unique identifier for the repository.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1349
-1350
-1351
-1352
-
-
# File 'download_strategy.rb', line 1349
-
-def last_commit
-  out, = silent_command("bzr", args: ["revno", cached_location])
-  out.chomp
-end
-
-
- -
-

- - #source_modified_timeTime - - - - - -

-
-

Returns the most recent modified time for all files in the current working directory after stage.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-1337
-1338
-1339
-1340
-1341
-1342
-1343
-
-
# File 'download_strategy.rb', line 1337
-
-def source_modified_time
-  out, = silent_command("bzr", args: ["log", "-l", "1", "--timezone=utc", cached_location])
-  timestamp = out.chomp
-  raise "Could not get any timestamps from bzr!" if timestamp.blank?
-
-  Time.parse(timestamp)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Bottle.html b/docs/Bottle.html deleted file mode 100644 index 5593410fb..000000000 --- a/docs/Bottle.html +++ /dev/null @@ -1,1174 +0,0 @@ - - - - - - - Class: Bottle - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Bottle - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
software_spec.rb
-
- -
- -

Defined Under Namespace

-

- - - - - Classes: Filename - - -

- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #cellar ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute cellar.

    -
    - -
  • - - - -
  • - - - #name ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute name.

    -
    - -
  • - - - -
  • - - - #rebuild ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute rebuild.

    -
    - -
  • - - - -
  • - - - #resource ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute resource.

    -
    - -
  • - - - -
  • - - - #tag ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute tag.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula, spec, tag = nil) ⇒ Bottle - - - - - -

-
-

Returns a new instance of Bottle.

- - -
-
-
- - -
- - - - -
-
-
-
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-
-
# File 'software_spec.rb', line 344
-
-def initialize(formula, spec, tag = nil)
-  @name = formula.name
-  @resource = Resource.new
-  @resource.owner = formula
-  @spec = spec
-
-  tag_spec = spec.tag_specification_for(Utils::Bottles.tag(tag))
-
-  @tag = tag_spec.tag
-  @cellar = tag_spec.cellar
-  @rebuild = spec.rebuild
-
-  @resource.version(formula.pkg_version.to_s)
-  @resource.checksum = tag_spec.checksum
-
-  @fetch_tab_retried = false
-
-  root_url(spec.root_url, spec.root_url_specs)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #cellarObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute cellar.

- - -
-
-
- - -
- - - - -
-
-
-
-339
-340
-341
-
-
# File 'software_spec.rb', line 339
-
-def cellar
-  @cellar
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute name.

- - -
-
-
- - -
- - - - -
-
-
-
-339
-340
-341
-
-
# File 'software_spec.rb', line 339
-
-def name
-  @name
-end
-
-
- - - -
-

- - #rebuildObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute rebuild.

- - -
-
-
- - -
- - - - -
-
-
-
-339
-340
-341
-
-
# File 'software_spec.rb', line 339
-
-def rebuild
-  @rebuild
-end
-
-
- - - -
-

- - #resourceObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute resource.

- - -
-
-
- - -
- - - - -
-
-
-
-339
-340
-341
-
-
# File 'software_spec.rb', line 339
-
-def resource
-  @resource
-end
-
-
- - - -
-

- - #tagObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute tag.

- - -
-
-
- - -
- - - - -
-
-
-
-339
-340
-341
-
-
# File 'software_spec.rb', line 339
-
-def tag
-  @tag
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #clear_cacheObject - - - - - -

- - - - -
-
-
-
-373
-374
-375
-376
-377
-
-
# File 'software_spec.rb', line 373
-
-def clear_cache
-  @resource.clear_cache
-  github_packages_manifest_resource&.clear_cache
-  @fetch_tab_retried = false
-end
-
-
- -
-

- - #compatible_locations?Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-379
-380
-381
-
-
# File 'software_spec.rb', line 379
-
-def compatible_locations?
-  @spec.compatible_locations?(tag: @tag)
-end
-
-
- -
-

- - #fetch(verify_download_integrity: true) ⇒ Object - - - - - -

- - - - -
-
-
-
-364
-365
-366
-367
-368
-369
-370
-371
-
-
# File 'software_spec.rb', line 364
-
-def fetch(verify_download_integrity: true)
-  @resource.fetch(verify_download_integrity:)
-rescue DownloadError
-  raise unless fallback_on_error
-
-  fetch_tab
-  retry
-end
-
-
- -
-

- - #fetch_tabObject - - - - - -

- - - - -
-
-
-
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-
-
# File 'software_spec.rb', line 392
-
-def fetch_tab
-  return if github_packages_manifest_resource.blank?
-
-  # a checksum is used later identifying the correct tab but we do not have the checksum for the manifest/tab
-  github_packages_manifest_resource.fetch(verify_download_integrity: false)
-
-  begin
-    github_packages_manifest_resource_tab(github_packages_manifest_resource)
-  rescue RuntimeError => e
-    raise DownloadError.new(github_packages_manifest_resource, e)
-  end
-rescue DownloadError
-  raise unless fallback_on_error
-
-  retry
-rescue ArgumentError
-  raise if @fetch_tab_retried
-
-  @fetch_tab_retried = true
-  github_packages_manifest_resource.clear_cache
-  retry
-end
-
-
- -
-

- - #filenameFilename - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-422
-423
-424
-
-
# File 'software_spec.rb', line 422
-
-def filename
-  Filename.create(resource.owner, @tag, @spec.rebuild)
-end
-
-
- -
-

- - #skip_relocation?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Does the bottle need to be relocated?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-384
-385
-386
-
-
# File 'software_spec.rb', line 384
-
-def skip_relocation?
-  @spec.skip_relocation?(tag: @tag)
-end
-
-
- -
-

- - #stageObject - - - - - -

- - - - -
-
-
-
-388
-389
-390
-
-
# File 'software_spec.rb', line 388
-
-def stage
-  resource.downloader.stage
-end
-
-
- -
-

- - #tab_attributesObject - - - - - -

- - - - -
-
-
-
-415
-416
-417
-418
-419
-
-
# File 'software_spec.rb', line 415
-
-def tab_attributes
-  return {} unless github_packages_manifest_resource&.downloaded?
-
-  github_packages_manifest_resource_tab(github_packages_manifest_resource)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Bottle/Filename.html b/docs/Bottle/Filename.html deleted file mode 100644 index a1a2028e4..000000000 --- a/docs/Bottle/Filename.html +++ /dev/null @@ -1,1056 +0,0 @@ - - - - - - - Class: Bottle::Filename - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Bottle::Filename - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
software_spec.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #name ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute name.

    -
    - -
  • - - - -
  • - - - #rebuild ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute rebuild.

    -
    - -
  • - - - -
  • - - - #tag ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute tag.

    -
    - -
  • - - - -
  • - - - #version ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute version.

    -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(name, version, tag, rebuild) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-
-
# File 'software_spec.rb', line 298
-
-def initialize(name, version, tag, rebuild)
-  @name = File.basename name
-
-  raise ArgumentError, "Invalid bottle name" unless Utils.safe_filename?(@name)
-  raise ArgumentError, "Invalid bottle version" unless Utils.safe_filename?(version.to_s)
-
-  @version = version
-  @tag = tag.to_s
-  @rebuild = rebuild
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute name.

- - -
-
-
- - -
- - - - -
-
-
-
-290
-291
-292
-
-
# File 'software_spec.rb', line 290
-
-def name
-  @name
-end
-
-
- - - -
-

- - #rebuildObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute rebuild.

- - -
-
-
- - -
- - - - -
-
-
-
-290
-291
-292
-
-
# File 'software_spec.rb', line 290
-
-def rebuild
-  @rebuild
-end
-
-
- - - -
-

- - #tagObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute tag.

- - -
-
-
- - -
- - - - -
-
-
-
-290
-291
-292
-
-
# File 'software_spec.rb', line 290
-
-def tag
-  @tag
-end
-
-
- - - -
-

- - #versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute version.

- - -
-
-
- - -
- - - - -
-
-
-
-290
-291
-292
-
-
# File 'software_spec.rb', line 290
-
-def version
-  @version
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .create(formula, tag, rebuild) ⇒ T.attached_class - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - tag - - - (Utils::Bottles::Tag) - - - -
  • - -
  • - - rebuild - - - (Integer) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class) - - - -
  • - -
- -
- - - - -
-
-
-
-293
-294
-295
-
-
# File 'software_spec.rb', line 293
-
-def self.create(formula, tag, rebuild)
-  new(formula.name, formula.pkg_version, tag, rebuild)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #extnameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-331
-332
-333
-334
-
-
# File 'software_spec.rb', line 331
-
-def extname
-  s = rebuild.positive? ? ".#{rebuild}" : ""
-  ".#{tag}.bottle#{s}.tar.gz"
-end
-
-
- -
-

- - #github_packagesObject - - - - - -

- - - - -
-
-
-
-326
-327
-328
-
-
# File 'software_spec.rb', line 326
-
-def github_packages
-  "#{name}--#{version}#{extname}"
-end
-
-
- -
-

- - #jsonString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-318
-319
-320
-
-
# File 'software_spec.rb', line 318
-
-def json
-  "#{name}--#{version}.#{tag}.bottle.json"
-end
-
-
- -
-

- - #to_strString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-310
-311
-312
-
-
# File 'software_spec.rb', line 310
-
-def to_str
-  "#{name}--#{version}#{extname}"
-end
-
-
- -
-

- - #url_encodeObject - - - - - -

- - - - -
-
-
-
-322
-323
-324
-
-
# File 'software_spec.rb', line 322
-
-def url_encode
-  ERB::Util.url_encode("#{name}-#{version}#{extname}")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/BottleFormulaUnavailableError.html b/docs/BottleFormulaUnavailableError.html deleted file mode 100644 index 37e135413..000000000 --- a/docs/BottleFormulaUnavailableError.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - Exception: BottleFormulaUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: BottleFormulaUnavailableError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a bottle does not contain a formula file.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(bottle_path, formula_path) ⇒ BottleFormulaUnavailableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of BottleFormulaUnavailableError.

- - -
-
-
- - -
- - - - -
-
-
-
-746
-747
-748
-749
-750
-751
-752
-
-
# File 'exceptions.rb', line 746
-
-def initialize(bottle_path, formula_path)
-  super <<~EOS
-    This bottle does not contain the formula file:
-      #{bottle_path}
-      #{formula_path}
-  EOS
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/BottleSpecification.html b/docs/BottleSpecification.html deleted file mode 100644 index 22f0e0819..000000000 --- a/docs/BottleSpecification.html +++ /dev/null @@ -1,1482 +0,0 @@ - - - - - - - Class: BottleSpecification - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: BottleSpecification - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Attrable
-
- - - - - - - - -
-
Defined in:
-
extend/os/linux/software_spec.rb,
- software_spec.rb,
sorbet/rbi/parlour.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
RELOCATABLE_CELLARS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:any, :any_skip_relocation].freeze
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

-
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-525
-526
-527
-528
-529
-530
-
-
# File 'software_spec.rb', line 525
-
-def initialize
-  @rebuild = 0
-  @repository = Homebrew::DEFAULT_REPOSITORY
-  @collector = Utils::Bottles::Collector.new
-  @root_url_specs = {}
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #collectorObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-522
-523
-524
-
-
# File 'software_spec.rb', line 522
-
-def collector
-  @collector
-end
-
-
- - - -
-

- - #repositoryObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-522
-523
-524
-
-
# File 'software_spec.rb', line 522
-
-def repository
-  @repository
-end
-
-
- - - -
-

- - #root_url_specsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-522
-523
-524
-
-
# File 'software_spec.rb', line 522
-
-def root_url_specs
-  @root_url_specs
-end
-
-
- - - -
-

- - #tapObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-521
-522
-523
-
-
# File 'software_spec.rb', line 521
-
-def tap
-  @tap
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #checksumsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-626
-627
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-638
-639
-640
-641
-642
-643
-644
-
-
# File 'software_spec.rb', line 626
-
-def checksums
-  tags = collector.tags.sort_by do |tag|
-    version = tag.to_macos_version
-    # Give `arm64` bottles a higher priority so they are first.
-    priority = (tag.arch == :arm64) ? 2 : 1
-    "#{priority}.#{version}_#{tag}"
-  rescue MacOSVersion::Error
-    # Sort non-macOS tags below macOS tags.
-    "0.#{tag}"
-  end
-  tags.reverse.map do |tag|
-    spec = collector.specification_for(tag)
-    {
-      "tag"    => spec.tag.to_sym,
-      "digest" => spec.checksum,
-      "cellar" => spec.cellar,
-    }
-  end
-end
-
-
- -
-

- - #compatible_locations?(tag: Utils::Bottles.tag) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-566
-567
-568
-569
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-
-
# File 'software_spec.rb', line 566
-
-def compatible_locations?(tag: Utils::Bottles.tag)
-  cellar = tag_to_cellar(tag)
-
-  return true if RELOCATABLE_CELLARS.include?(cellar)
-
-  prefix = Pathname(cellar.to_s).parent.to_s
-
-  cellar_relocatable = cellar.size >= HOMEBREW_CELLAR.to_s.size && ENV["HOMEBREW_RELOCATE_BUILD_PREFIX"].present?
-  prefix_relocatable = prefix.size >= HOMEBREW_PREFIX.to_s.size && ENV["HOMEBREW_RELOCATE_BUILD_PREFIX"].present?
-
-  compatible_cellar = cellar == HOMEBREW_CELLAR.to_s || cellar_relocatable
-  compatible_prefix = prefix == HOMEBREW_PREFIX.to_s || prefix_relocatable
-
-  compatible_cellar && compatible_prefix
-end
-
-
- -
-

- - #rebuild(arg = T.unsafe(nil)) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg - - - (T.untyped) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-270
-
-
# File 'sorbet/rbi/parlour.rbi', line 270
-
-def rebuild(arg = T.unsafe(nil)); end
-
-
- -
-

- - #root_url(var = nil, specs = {}) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-
-
# File 'software_spec.rb', line 532
-
-def root_url(var = nil, specs = {})
-  if var.nil?
-    @root_url ||= if (github_packages_url = GitHubPackages.root_url_if_match(Homebrew::EnvConfig.bottle_domain))
-      github_packages_url
-    else
-      Homebrew::EnvConfig.bottle_domain
-    end
-  else
-    @root_url = if (github_packages_url = GitHubPackages.root_url_if_match(var))
-      github_packages_url
-    else
-      var
-    end
-    @root_url_specs.merge!(specs)
-  end
-end
-
-
- -
-

- - #sha256(hash) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checksum methods in the DSL's bottle block take -a Hash, which indicates the platform the checksum applies on. -Example bottle block syntax: -bottle do - sha256 cellar: :any_skip_relocation, big_sur: "69489ae397e4645..." - sha256 cellar: :any, catalina: "449de5ea35d0e94..." -end

- - -
-
-
- - -
- - - - -
-
-
-
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-616
-
-
# File 'software_spec.rb', line 601
-
-def sha256(hash)
-  sha256_regex = /^[a-f0-9]{64}$/i
-
-  # find new `sha256 big_sur: "69489ae397e4645..."` format
-  tag, digest = hash.find do |key, value|
-    key.is_a?(Symbol) && value.is_a?(String) && value.match?(sha256_regex)
-  end
-
-  cellar = hash[:cellar] if digest && tag
-
-  tag = Utils::Bottles::Tag.from_symbol(tag)
-
-  cellar ||= tag.default_cellar
-
-  collector.add(tag, checksum: Checksum.new(digest), cellar:)
-end
-
-
- -
-

- - #skip_relocation?(tag: Utils::Bottles.tag) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Does the Bottle this BottleSpecification belongs to need to be relocated?

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'extend/os/linux/software_spec.rb', line 6
-
-def skip_relocation?(tag: Utils::Bottles.tag)
-  false
-end
-
-
- -
-

- - #tag?(tag, no_older_versions: false) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tag - - - (Symbol, Utils::Bottles::Tag) - - - -
  • - -
  • - - no_older_versions - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-590
-591
-592
-
-
# File 'software_spec.rb', line 590
-
-def tag?(tag, no_older_versions: false)
-  collector.tag?(tag, no_older_versions:)
-end
-
-
- -
-

- - #tag_specification_for(tag, no_older_versions: false) ⇒ Utils::Bottles::TagSpecification? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tag - - - (Utils::Bottles::Tag) - - - -
  • - -
  • - - no_older_versions - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-622
-623
-624
-
-
# File 'software_spec.rb', line 622
-
-def tag_specification_for(tag, no_older_versions: false)
-  collector.specification_for(tag, no_older_versions:)
-end
-
-
- -
-

- - #tag_to_cellar(tag = Utils::Bottles.tag) ⇒ Symbol, String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-556
-557
-558
-559
-560
-561
-562
-563
-
-
# File 'software_spec.rb', line 556
-
-def tag_to_cellar(tag = Utils::Bottles.tag)
-  spec = collector.specification_for(tag)
-  if spec.present?
-    spec.cellar
-  else
-    tag.default_cellar
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Build.html b/docs/Build.html deleted file mode 100644 index 3e1fc084d..000000000 --- a/docs/Build.html +++ /dev/null @@ -1,1242 +0,0 @@ - - - - - - - Class: Build - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Build - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
build.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A formula build.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(formula, options, args:) ⇒ Build - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Build.

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'build.rb', line 23
-
-def initialize(formula, options, args:)
-  @formula = formula
-  @formula.build = BuildOptions.new(options, formula.options)
-  @args = args
-
-  if args.ignore_dependencies?
-    @deps = []
-    @reqs = []
-  else
-    @deps = expand_deps
-    @reqs = expand_reqs
-  end
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #argsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'build.rb', line 21
-
-def args
-  @args
-end
-
-
- - - -
-

- - #depsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'build.rb', line 21
-
-def deps
-  @deps
-end
-
-
- - - -
-

- - #formulaObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'build.rb', line 21
-
-def formula
-  @formula
-end
-
-
- - - -
-

- - #reqsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'build.rb', line 21
-
-def reqs
-  @reqs
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #detect_stdlibsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-192
-193
-194
-195
-196
-197
-198
-199
-
-
# File 'build.rb', line 192
-
-def detect_stdlibs
-  keg = Keg.new(formula.prefix)
-
-  # The stdlib recorded in the install receipt is used during dependency
-  # compatibility checks, so we only care about the stdlib that libraries
-  # link against.
-  keg.detect_cxx_stdlibs(skip_executables: true)
-end
-
-
- -
-

- - #effective_build_options_for(dependent) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-
-
# File 'build.rb', line 37
-
-def effective_build_options_for(dependent)
-  args  = dependent.build.used_options
-  args |= Tab.for_formula(dependent).used_options
-  BuildOptions.new(args, dependent.options)
-end
-
-
- -
-

- - #expand_depsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-
-
# File 'build.rb', line 52
-
-def expand_deps
-  formula.recursive_dependencies do |dependent, dep|
-    build = effective_build_options_for(dependent)
-    if dep.prune_from_option?(build) ||
-       dep.prune_if_build_and_not_dependent?(dependent, formula) ||
-       (dep.test? && !dep.build?) || dep.implicit?
-      Dependency.prune
-    elsif dep.build?
-      Dependency.keep_but_prune_recursive_deps
-    end
-  end
-end
-
-
- -
-

- - #expand_reqsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'build.rb', line 43
-
-def expand_reqs
-  formula.recursive_requirements do |dependent, req|
-    build = effective_build_options_for(dependent)
-    if req.prune_from_option?(build) || req.prune_if_build_and_not_dependent?(dependent, formula) || req.test?
-      Requirement.prune
-    end
-  end
-end
-
-
- -
-

- - #fixopt(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-
-
# File 'build.rb', line 201
-
-def fixopt(formula)
-  path = if formula.linked_keg.directory? && formula.linked_keg.symlink?
-    formula.linked_keg.resolved_path
-  elsif formula.prefix.directory?
-    formula.prefix
-  elsif (kids = formula.rack.children).size == 1 && kids.first.directory?
-    kids.first
-  else
-    raise
-  end
-  Keg.new(path).optlink(verbose: args.verbose?)
-rescue
-  raise "#{formula.opt_prefix} not present or broken\nPlease reinstall #{formula.full_name}. Sorry :("
-end
-
-
- -
-

- - #installObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-
-
# File 'build.rb', line 65
-
-def install
-  formula_deps = deps.map(&:to_formula)
-  keg_only_deps = formula_deps.select(&:keg_only?)
-  run_time_deps = deps.reject(&:build?).map(&:to_formula)
-
-  formula_deps.each do |dep|
-    fixopt(dep) unless dep.opt_prefix.directory?
-  end
-
-  ENV.activate_extensions!(env: args.env)
-
-  if superenv?(args.env)
-    ENV.keg_only_deps = keg_only_deps
-    ENV.deps = formula_deps
-    ENV.run_time_deps = run_time_deps
-    ENV.setup_build_environment(
-      formula:,
-      cc:            args.cc,
-      build_bottle:  args.build_bottle?,
-      bottle_arch:   args.bottle_arch,
-      debug_symbols: args.debug_symbols?,
-    )
-    reqs.each do |req|
-      req.modify_build_environment(
-        env: args.env, cc: args.cc, build_bottle: args.build_bottle?, bottle_arch: args.bottle_arch,
-      )
-    end
-  else
-    ENV.setup_build_environment(
-      formula:,
-      cc:            args.cc,
-      build_bottle:  args.build_bottle?,
-      bottle_arch:   args.bottle_arch,
-      debug_symbols: args.debug_symbols?,
-    )
-    reqs.each do |req|
-      req.modify_build_environment(
-        env: args.env, cc: args.cc, build_bottle: args.build_bottle?, bottle_arch: args.bottle_arch,
-      )
-    end
-
-    keg_only_deps.each do |dep|
-      ENV.prepend_path "PATH", dep.opt_bin.to_s
-      ENV.prepend_path "PKG_CONFIG_PATH", "#{dep.opt_lib}/pkgconfig"
-      ENV.prepend_path "PKG_CONFIG_PATH", "#{dep.opt_share}/pkgconfig"
-      ENV.prepend_path "ACLOCAL_PATH", "#{dep.opt_share}/aclocal"
-      ENV.prepend_path "CMAKE_PREFIX_PATH", dep.opt_prefix.to_s
-      ENV.prepend "LDFLAGS", "-L#{dep.opt_lib}" if dep.opt_lib.directory?
-      ENV.prepend "CPPFLAGS", "-I#{dep.opt_include}" if dep.opt_include.directory?
-    end
-  end
-
-  new_env = {
-    "TMPDIR" => HOMEBREW_TEMP,
-    "TEMP"   => HOMEBREW_TEMP,
-    "TMP"    => HOMEBREW_TEMP,
-  }
-
-  with_env(new_env) do
-    if args.debug?
-      require "debrew"
-      formula.extend(Debrew::Formula)
-    end
-
-    formula.update_head_version
-
-    formula.brew(
-      fetch:         false,
-      keep_tmp:      args.keep_tmp?,
-      debug_symbols: args.debug_symbols?,
-      interactive:   args.interactive?,
-    ) do
-      with_env(
-        # For head builds, HOMEBREW_FORMULA_PREFIX should include the commit,
-        # which is not known until after the formula has been staged.
-        HOMEBREW_FORMULA_PREFIX:    formula.prefix,
-        # https://reproducible-builds.org/docs/build-path/
-        HOMEBREW_FORMULA_BUILDPATH: formula.buildpath,
-        # https://reproducible-builds.org/docs/source-date-epoch/
-        SOURCE_DATE_EPOCH:          formula.source_modified_time.to_i.to_s,
-        # Avoid make getting confused about timestamps.
-        # https://github.com/Homebrew/homebrew-core/pull/87470
-        TZ:                         "UTC0",
-      ) do
-        formula.patch
-
-        if args.git?
-          system "git", "init"
-          system "git", "add", "-A"
-        end
-        if args.interactive?
-          ohai "Entering interactive mode..."
-          puts <<~EOS
-            Type `exit` to return and finalize the installation.
-            Install to this prefix: #{formula.prefix}
-          EOS
-
-          if args.git?
-            puts <<~EOS
-              This directory is now a Git repository. Make your changes and then use:
-                git diff | pbcopy
-              to copy the diff to the clipboard.
-            EOS
-          end
-
-          interactive_shell(formula)
-        else
-          formula.prefix.mkpath
-          formula.logs.mkpath
-
-          (formula.logs/"00.options.out").write \
-            "#{formula.full_name} #{formula.build.used_options.sort.join(" ")}".strip
-          formula.install
-
-          stdlibs = detect_stdlibs
-          tab = Tab.create(formula, ENV.compiler, stdlibs.first)
-          tab.write
-
-          # Find and link metafiles
-          formula.prefix.install_metafiles formula.buildpath
-          formula.prefix.install_metafiles formula.libexec if formula.libexec.exist?
-        end
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/BuildEnvironment.html b/docs/BuildEnvironment.html deleted file mode 100644 index 020454cd0..000000000 --- a/docs/BuildEnvironment.html +++ /dev/null @@ -1,742 +0,0 @@ - - - - - - - Class: BuildEnvironment - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: BuildEnvironment - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
build_environment.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Settings for the build environment.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: DSL - - - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(*settings) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - settings - - - (Symbol) - - - -
  • - -
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'build_environment.rb', line 7
-
-def initialize(*settings)
-  @settings = Set.new(settings)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .dump(env, out = $stdout) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-
-
# File 'build_environment.rb', line 66
-
-def self.dump(env, out = $stdout)
-  keys = self.keys(env)
-  keys -= %w[CC CXX OBJC OBJCXX] if env["CC"] == env["HOMEBREW_CC"]
-
-  keys.each do |key|
-    value = env.fetch(key)
-
-    string = +"#{key}: #{value}"
-    case key
-    when "CC", "CXX", "LD"
-      string << " => #{Pathname.new(value).realpath}" if value.present? && File.symlink?(value)
-    end
-    string.freeze
-    out.puts string
-  end
-end
-
-
- -
-

- - .keys(env) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-61
-62
-63
-
-
# File 'build_environment.rb', line 61
-
-def self.keys(env)
-  KEYS & env.keys
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #<<(option) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - option - - - (Symbol) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-21
-
-
# File 'build_environment.rb', line 18
-
-def <<(option)
-  @settings << option
-  self
-end
-
-
- -
-

- - #merge(*args) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-15
-
-
# File 'build_environment.rb', line 12
-
-def merge(*args)
-  @settings.merge(*args)
-  self
-end
-
-
- -
-

- - #std?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'build_environment.rb', line 24
-
-def std?
-  @settings.include? :std
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/BuildEnvironment/DSL.html b/docs/BuildEnvironment/DSL.html deleted file mode 100644 index b48f38809..000000000 --- a/docs/BuildEnvironment/DSL.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - Module: BuildEnvironment::DSL - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: BuildEnvironment::DSL - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Formula, Requirement
-
- - - -
-
Defined in:
-
build_environment.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

DSL for specifying build environment settings.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #env(*settings) ⇒ BuildEnvironment - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - settings - - - (Symbol) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-40
-41
-42
-
-
# File 'build_environment.rb', line 40
-
-def env(*settings)
-  @env.merge(settings)
-end
-
-
- -
-

- - #inherited(child) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Initialise @env for each class which may use this DSL (e.g. each formula subclass). -env may never be called and it needs to be initialised before the class is frozen.

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-
-
# File 'build_environment.rb', line 32
-
-def inherited(child)
-  super
-  child.instance_eval do
-    @env = BuildEnvironment.new
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/BuildError.html b/docs/BuildError.html deleted file mode 100644 index 4c1e88772..000000000 --- a/docs/BuildError.html +++ /dev/null @@ -1,1005 +0,0 @@ - - - - - - - Exception: BuildError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: BuildError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when an error occurs during a formula build.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula, cmd, args, env) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-469
-470
-471
-472
-473
-474
-475
-476
-
-
# File 'exceptions.rb', line 469
-
-def initialize(formula, cmd, args, env)
-  @formula = formula
-  @cmd = cmd
-  @args = args
-  @env = env
-  pretty_args = Array(args).map { |arg| arg.to_s.gsub(/[\\ ]/, "\\\\\\0") }.join(" ")
-  super "Failed executing: #{cmd} #{pretty_args}".strip
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #argsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-458
-459
-460
-
-
# File 'exceptions.rb', line 458
-
-def args
-  @args
-end
-
-
- - - -
-

- - #cmdObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-458
-459
-460
-
-
# File 'exceptions.rb', line 458
-
-def cmd
-  @cmd
-end
-
-
- - - -
-

- - #envObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-458
-459
-460
-
-
# File 'exceptions.rb', line 458
-
-def env
-  @env
-end
-
-
- - - -
-

- - #formulaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-459
-460
-461
-
-
# File 'exceptions.rb', line 459
-
-def formula
-  @formula
-end
-
-
- - - -
-

- - #optionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-459
-460
-461
-
-
# File 'exceptions.rb', line 459
-
-def options
-  @options
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #dump(verbose: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-515
-516
-517
-518
-519
-520
-521
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-548
-549
-550
-
-
# File 'exceptions.rb', line 492
-
-def dump(verbose: false)
-  puts
-
-  if verbose
-    require "system_config"
-    require "build_environment"
-
-    ohai "Formula"
-    puts "Tap: #{formula.tap}" if formula.tap?
-    puts "Path: #{formula.path}"
-    ohai "Configuration"
-    SystemConfig.dump_verbose_config
-    ohai "ENV"
-    BuildEnvironment.dump env
-    puts
-    onoe "#{formula.full_name} #{formula.version} did not build"
-    unless (logs = Dir["#{formula.logs}/*"]).empty?
-      puts "Logs:"
-      puts logs.map { |fn| "     #{fn}" }.join("\n")
-    end
-  end
-
-  if formula.tap && !OS.unsupported_configuration?
-    if formula.tap.official?
-      puts Formatter.error(Formatter.url(OS::ISSUES_URL), label: "READ THIS")
-    elsif (issues_url = formula.tap.issues_url)
-      puts <<~EOS
-        If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
-          #{Formatter.url(issues_url)}
-      EOS
-    else
-      puts <<~EOS
-        If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core):
-          #{formula.tap}
-      EOS
-    end
-  else
-    puts <<~EOS
-      Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!
-    EOS
-  end
-
-  puts
-
-  if issues.present?
-    puts "These open issues may also help:"
-    puts issues.map { |i| "#{i["title"]} #{i["html_url"]}" }.join("\n")
-  end
-
-  require "diagnostic"
-  checks = Homebrew::Diagnostic::Checks.new
-  checks.build_error_checks.each do |check|
-    out = checks.send(check)
-    next if out.nil?
-
-    puts
-    ofail out
-  end
-end
-
-
- -
-

- - #fetch_issuesArray<T.untyped> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<T.untyped>) - - - -
  • - -
- -
- - - - -
-
-
-
-484
-485
-486
-487
-488
-489
-
-
# File 'exceptions.rb', line 484
-
-def fetch_issues
-  GitHub.issues_for_formula(formula.name, tap: formula.tap, state: "open", type: "issue")
-rescue GitHub::API::Error => e
-  opoo "Unable to query GitHub for recent issues on the tap\n#{e.message}"
-  []
-end
-
-
- -
-

- - #issuesArray<T.untyped> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<T.untyped>) - - - -
  • - -
- -
- - - - -
-
-
-
-479
-480
-481
-
-
# File 'exceptions.rb', line 479
-
-def issues
-  @issues ||= fetch_issues
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/BuildFlagsError.html b/docs/BuildFlagsError.html deleted file mode 100644 index c8bbb19c5..000000000 --- a/docs/BuildFlagsError.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - Exception: BuildFlagsError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: BuildFlagsError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised by Homebrew.install, Homebrew.reinstall and Homebrew.upgrade -if the user passes any flags/environment that would case a bottle-only -installation on a system without build tools to fail.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(flags, bottled: true) ⇒ BuildFlagsError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of BuildFlagsError.

- - -
-
-
- - -
- - - - -
-
-
-
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-592
-593
-594
-595
-
-
# File 'exceptions.rb', line 572
-
-def initialize(flags, bottled: true)
-  if flags.length > 1
-    flag_text = "flags"
-    require_text = "require"
-  else
-    flag_text = "flag"
-    require_text = "requires"
-  end
-
-  bottle_text = if bottled
-    <<~EOS
-      Alternatively, remove the #{flag_text} to attempt bottle installation.
-    EOS
-  end
-
-  message = <<~EOS
-    The following #{flag_text}:
-      #{flags.join(", ")}
-    #{require_text} building tools, but none are installed.
-    #{DevelopmentTools.installation_instructions} #{bottle_text}
-  EOS
-
-  super message
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/BuildOptions.html b/docs/BuildOptions.html deleted file mode 100644 index a16c277d1..000000000 --- a/docs/BuildOptions.html +++ /dev/null @@ -1,897 +0,0 @@ - - - - - - - Class: BuildOptions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: BuildOptions - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
build_options.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Options for a formula build.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(args, options) ⇒ BuildOptions - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of BuildOptions.

- - -
-
-
- - -
- - - - -
-
-
-
-6
-7
-8
-9
-
-
# File 'build_options.rb', line 6
-
-def initialize(args, options)
-  @args = args
-  @options = options
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #any_args_or_options?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if the build has any arguments or options specified.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-95
-96
-97
-
-
# File 'build_options.rb', line 95
-
-def any_args_or_options?
-  !@args.empty? || !@options.empty?
-end
-
-
- -
-

- - #bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if a Formula is being built as a bottle (i.e. binary package).

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'build_options.rb', line 58
-
-def bottle?
-  include? "build-bottle"
-end
-
-
- -
-

- - #head?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if a Formula is being built with Formula.head instead of Formula.stable.

- -

Examples

- -
args << "--some-new-stuff" if build.head?
-
- -

If there are multiple conditional arguments use a block instead of lines.

- -
if build.head?
-  args << "--i-want-pizza"
-  args << "--and-a-cold-beer" if build.with? "cold-beer"
-end
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-79
-80
-
-
# File 'build_options.rb', line 78
-
-def head?
-  include? "HEAD"
-end
-
-
- -
-

- - #stable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if a Formula is being built with Formula.stable instead of Formula.head. -This is the default.

- -

Example

- -
args << "--some-beta" if build.head?
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'build_options.rb', line 90
-
-def stable?
-  !head?
-end
-
-
- -
-

- - #unused_optionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-103
-104
-105
-
-
# File 'build_options.rb', line 103
-
-def unused_options
-  @options - @args
-end
-
-
- -
-

- - #used_optionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'build_options.rb', line 99
-
-def used_options
-  @options & @args
-end
-
-
- -
-

- - #with?(val) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if a Formula is being built with a specific option.

- -

Examples

- -
args << "--i-want-spam" if build.with? "spam"
-
- -
args << "--qt-gui" if build.with? "qt" # "--with-qt" ==> build.with? "qt"
-
- -

If a formula presents a user with a choice, but the choice must be fulfilled:

- -
if build.with? "example2"
-  args << "--with-example2"
-else
-  args << "--with-example1"
-end
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'build_options.rb', line 32
-
-def with?(val)
-  option_names = val.respond_to?(:option_names) ? val.option_names : [val]
-
-  option_names.any? do |name|
-    if option_defined? "with-#{name}"
-      include? "with-#{name}"
-    elsif option_defined? "without-#{name}"
-      !include? "without-#{name}"
-    else
-      false
-    end
-  end
-end
-
-
- -
-

- - #without?(val) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if a Formula is being built without a specific option.

- -

Example

- -
args << "--no-spam-plz" if build.without? "spam"
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'build_options.rb', line 53
-
-def without?(val)
-  !with?(val)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CVSDownloadStrategy.html b/docs/CVSDownloadStrategy.html deleted file mode 100644 index 0452390ea..000000000 --- a/docs/CVSDownloadStrategy.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - Class: CVSDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CVSDownloadStrategy - - - -

-
- -
-
Inherits:
-
- VCSDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a CVS repository.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from VCSDownloadStrategy

-

VCSDownloadStrategy::REF_TYPES

- - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from VCSDownloadStrategy

-

#commit_outdated?, #fetch, #fetch_last_commit, #head?, #last_commit

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #quiet!, #quiet?, #shutup!, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ CVSDownloadStrategy - - - - - -

-
-

Returns a new instance of CVSDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-1155
-1156
-1157
-1158
-1159
-1160
-1161
-1162
-1163
-1164
-1165
-1166
-
-
# File 'download_strategy.rb', line 1155
-
-def initialize(url, name, version, **meta)
-  super
-  @url = @url.sub(%r{^cvs://}, "")
-
-  if meta.key?(:module)
-    @module = meta.fetch(:module)
-  elsif !@url.match?(%r{:[^/]+$})
-    @module = name
-  else
-    @module, @url = split_url(@url)
-  end
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #source_modified_timeTime - - - - - -

-
-

Returns the most recent modified time for all files in the current working directory after stage.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-1172
-1173
-1174
-1175
-1176
-1177
-1178
-1179
-1180
-1181
-1182
-1183
-1184
-
-
# File 'download_strategy.rb', line 1172
-
-def source_modified_time
-  # Filter CVS's files because the timestamp for each of them is the moment
-  # of clone.
-  max_mtime = Time.at(0)
-  cached_location.find do |f|
-    Find.prune if f.directory? && f.basename.to_s == "CVS"
-    next unless f.file?
-
-    mtime = f.mtime
-    max_mtime = mtime if mtime > max_mtime
-  end
-  max_mtime
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cachable.html b/docs/Cachable.html deleted file mode 100644 index b50ee1ca7..000000000 --- a/docs/Cachable.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - Module: Cachable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cachable - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Dependency, DependencyCollector, Formula, Formulary, Homebrew::API, Homebrew::API::Cask, Homebrew::API::Formula, Keg, Readall, Requirement, Tab, Tap, Utils::Analytics
-
- - - -
-
Defined in:
-
extend/cachable.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #cacheHash{T.untyped => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{T.untyped => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'extend/cachable.rb', line 6
-
-def cache
-  @cache ||= T.let({}, T.nilable(T::Hash[T.untyped, T.untyped]))
-end
-
-
- -
-

- - #clear_cachevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- Note: -

We overwrite here instead of using Hash#clear to handle frozen hashes.

-
-
- -

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'extend/cachable.rb', line 12
-
-def clear_cache
-  overwrite_cache!({})
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CacheStore.html b/docs/CacheStore.html deleted file mode 100644 index 0e6d83445..000000000 --- a/docs/CacheStore.html +++ /dev/null @@ -1,495 +0,0 @@ - - - - - - - Class: CacheStore - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CacheStore - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cache_store.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

CacheStore provides methods to mutate and fetch data from a persistent -storage mechanism.

- - -
-
-
- - -
-

Direct Known Subclasses

-

DescriptionCacheStore, LinkageCacheStore

-
- - - - - - - - -

- Instance Method Summary - collapse -

- -
    - - -
  • - - - #delete! ⇒ Object - - - - - - - - abstract - - private - -

    Deletes data from the cache based on a condition defined in a concrete class.

    -
    - -
  • - - - -
  • - - - #fetch ⇒ Object - - - - - - - - abstract - - private - -

    Fetches cached values in persistent storage according to the type of data stored.

    -
    - -
  • - - - -
  • - - - #initialize(database) ⇒ nil - - - - - - constructor - - - - - - private - -
    - -
  • - - - -
  • - - - #update! ⇒ Object - - - - - - - - abstract - - private - -

    Inserts new values or updates existing cached values to persistent storage.

    -
    - -
  • - - -
- - -
-

Constructor Details

- -
-

- - #initialize(database) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-160
-161
-162
-
-
# File 'cache_store.rb', line 160
-
-def initialize(database)
-  @database = database
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #delete!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
-

Deletes data from the cache based on a condition defined in a concrete class.

- - -
-
-
- -

Raises:

-
    - -
  • - - - (NotImplementedError) - - - -
  • - -
- -
- - - - -
-
-
-
-182
-183
-184
-
-
# File 'cache_store.rb', line 182
-
-def delete!(*)
-  raise NotImplementedError
-end
-
-
- -
-

- - #fetchObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
-

Fetches cached values in persistent storage according to the type of data -stored.

- - -
-
-
- -

Raises:

-
    - -
  • - - - (NotImplementedError) - - - -
  • - -
- -
- - - - -
-
-
-
-175
-176
-177
-
-
# File 'cache_store.rb', line 175
-
-def fetch(*)
-  raise NotImplementedError
-end
-
-
- -
-

- - #update!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
-

Inserts new values or updates existing cached values to persistent storage.

- - -
-
-
- -

Raises:

-
    - -
  • - - - (NotImplementedError) - - - -
  • - -
- -
- - - - -
-
-
-
-167
-168
-169
-
-
# File 'cache_store.rb', line 167
-
-def update!(*)
-  raise NotImplementedError
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CacheStoreDatabase.html b/docs/CacheStoreDatabase.html deleted file mode 100644 index bdbfcf508..000000000 --- a/docs/CacheStoreDatabase.html +++ /dev/null @@ -1,1089 +0,0 @@ - - - - - - - Class: CacheStoreDatabase - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CacheStoreDatabase - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cache_store.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

CacheStoreDatabase acts as an interface to a persistent storage mechanism -residing in the HOMEBREW_CACHE.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- -
    - - -
  • - - - #created? ⇒ Boolean - - - - - - - - - - private - -

    Returns true if the cache file has been created for the given @type.

    -
    - -
  • - - - -
  • - - - #delete(key) ⇒ Object - - - - - - - - - - private - -

    Deletes a value from the underlying database (if it already exists).

    -
    - -
  • - - - -
  • - - - #each_key(&block) ⇒ Array - - - - - - - - - - private - -

    Performs a each_key on the underlying database.

    -
    - -
  • - - - -
  • - - - #empty? ⇒ Boolean - - - - - - - - - - private - -

    Returns true if the cache is empty.

    -
    - -
  • - - - -
  • - - - #get(key) ⇒ Object - - - - - - - - - - private - -

    Gets a value from the underlying database (if it already exists).

    -
    - -
  • - - - -
  • - - - #initialize(type) ⇒ nil - - - - - - constructor - - - - - - private - -

    Creates a CacheStoreDatabase.

    -
    - -
  • - - - -
  • - - - #mtime ⇒ Time - - - - - - - - - - private - -

    Returns the modification time of the cache file (if it already exists).

    -
    - -
  • - - - -
  • - - - #select(&block) ⇒ Array - - - - - - - - - - private - -

    Performs a select on the underlying database.

    -
    - -
  • - - - -
  • - - - #set(key, value) ⇒ Object - - - - - - - - - - private - -

    Sets a value in the underlying database (and creates it if necessary).

    -
    - -
  • - - - -
  • - - - #write_if_dirty! ⇒ Object - - - - - - - - - - private - -

    Closes the underlying database (if it is created and open).

    -
    - -
  • - - -
- - -
-

Constructor Details

- -
-

- - #initialize(type) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Creates a CacheStoreDatabase.

- - -
-
-
-

Parameters:

-
    - -
  • - - type - - - (Symbol) - - - -
  • - -
- - -
- - - - -
-
-
-
-45
-46
-47
-48
-
-
# File 'cache_store.rb', line 45
-
-def initialize(type)
-  @type = type
-  @dirty = false
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .use(type) {|CacheStoreDatabase| ... } ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Yields the cache store database. -Closes the database after use if it has been loaded.

- - -
-
-
-

Parameters:

-
    - -
  • - - type - - - (Symbol) - - - -
  • - -
- -

Yields:

- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
# File 'cache_store.rb', line 16
-
-def self.use(type)
-  @db_type_reference_hash ||= {}
-  @db_type_reference_hash[type] ||= {}
-  type_ref = @db_type_reference_hash[type]
-
-  type_ref[:count] ||= 0
-  type_ref[:count]  += 1
-
-  type_ref[:db] ||= CacheStoreDatabase.new(type)
-
-  return_value = yield(type_ref[:db])
-  if type_ref[:count].positive?
-    type_ref[:count] -= 1
-  else
-    type_ref[:count] = 0
-  end
-
-  if type_ref[:count].zero?
-    type_ref[:db].write_if_dirty!
-    type_ref.delete(:db)
-  end
-
-  return_value
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #created?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns true if the cache file has been created for the given @type.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-82
-83
-84
-
-
# File 'cache_store.rb', line 82
-
-def created?
-  cache_path.exist?
-end
-
-
- -
-

- - #delete(key) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Deletes a value from the underlying database (if it already exists).

- - -
-
-
- - -
- - - - -
-
-
-
-64
-65
-66
-67
-68
-69
-
-
# File 'cache_store.rb', line 64
-
-def delete(key)
-  return unless created?
-
-  dirty!
-  db.delete(key)
-end
-
-
- -
-

- - #each_key(&block) ⇒ Array - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Performs a each_key on the underlying database.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array) - - - -
  • - -
- -
- - - - -
-
-
-
-112
-113
-114
-
-
# File 'cache_store.rb', line 112
-
-def each_key(&block)
-  db.each_key(&block)
-end
-
-
- -
-

- - #empty?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns true if the cache is empty.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-106
-107
-
-
# File 'cache_store.rb', line 105
-
-def empty?
-  db.empty?
-end
-
-
- -
-

- - #get(key) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets a value from the underlying database (if it already exists).

- - -
-
-
- - -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-
-
# File 'cache_store.rb', line 57
-
-def get(key)
-  return unless created?
-
-  db[key]
-end
-
-
- -
-

- - #mtimeTime - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the modification time of the cache file (if it already exists).

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-90
-91
-92
-93
-
-
# File 'cache_store.rb', line 89
-
-def mtime
-  return unless created?
-
-  cache_path.mtime
-end
-
-
- -
-

- - #select(&block) ⇒ Array - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Performs a select on the underlying database.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array) - - - -
  • - -
- -
- - - - -
-
-
-
-98
-99
-100
-
-
# File 'cache_store.rb', line 98
-
-def select(&block)
-  db.select(&block)
-end
-
-
- -
-

- - #set(key, value) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sets a value in the underlying database (and creates it if necessary).

- - -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-54
-
-
# File 'cache_store.rb', line 51
-
-def set(key, value)
-  dirty!
-  db[key] = value
-end
-
-
- -
-

- - #write_if_dirty!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Closes the underlying database (if it is created and open).

- - -
-
-
- - -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-77
-
-
# File 'cache_store.rb', line 72
-
-def write_if_dirty!
-  return unless dirty?
-
-  cache_path.dirname.mkpath
-  cache_path.atomic_write(JSON.dump(@db))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CannotInstallFormulaError.html b/docs/CannotInstallFormulaError.html deleted file mode 100644 index 8e7014902..000000000 --- a/docs/CannotInstallFormulaError.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - Exception: CannotInstallFormulaError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: CannotInstallFormulaError - - - -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- - - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask.html b/docs/Cask.html deleted file mode 100644 index a91e7a543..000000000 --- a/docs/Cask.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - Module: Cask - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
cask/cache.rb,
- cask/dsl.rb,
cask/pkg.rb,
cask/url.rb,
cask/cask.rb,
cask/info.rb,
cask/list.rb,
cask/audit.rb,
cask/utils.rb,
cask/config.rb,
cask/staged.rb,
cask/auditor.rb,
cask/upgrade.rb,
cask/artifact.rb,
cask/caskroom.rb,
cask/denylist.rb,
cask/download.rb,
cask/dsl/base.rb,
cask/metadata.rb,
cask/migrator.rb,
cask/installer.rb,
cask/reinstall.rb,
cask/uninstall.rb,
cask/exceptions.rb,
cask/quarantine.rb,
cask/cask_loader.rb,
cask/dsl/caveats.rb,
cask/dsl/version.rb,
cask/artifact/app.rb,
cask/artifact/pkg.rb,
cask/artifact/zap.rb,
cask/artifact_set.rb,
cask/artifact/font.rb,
cask/dsl/container.rb,
cask/dsl/preflight.rb,
cask/artifact/moved.rb,
cask/artifact/suite.rb,
cask/dsl/depends_on.rb,
cask/dsl/postflight.rb,
cask/artifact/binary.rb,
cask/artifact/manpage.rb,
cask/artifact/service.rb,
cask/artifact/artifact.rb,
cask/artifact/prefpane.rb,
cask/artifact/qlplugin.rb,
cask/artifact/installer.rb,
cask/artifact/relocated.rb,
cask/artifact/symlinked.rb,
cask/artifact/uninstall.rb,
cask/dsl/conflicts_with.rb,
cask/artifact/dictionary.rb,
cask/artifact/mdimporter.rb,
cask/artifact/stage_only.rb,
cask/artifact/vst_plugin.rb,
cask/artifact/colorpicker.rb,
cask/artifact/vst3_plugin.rb,
cask/artifact/input_method.rb,
cask/artifact/screen_saver.rb,
cask/dsl/uninstall_preflight.rb,
cask/artifact/internet_plugin.rb,
cask/artifact/keyboard_layout.rb,
cask/artifact/preflight_block.rb,
cask/dsl/uninstall_postflight.rb,
cask/artifact/postflight_block.rb,
cask/artifact/abstract_artifact.rb,
cask/artifact/audio_unit_plugin.rb,
cask/artifact/abstract_uninstall.rb,
cask/artifact/abstract_flight_block.rb,
cask/url.rbi,
cask/cask.rbi,
cask/staged.rbi,
cask/metadata.rbi,
sorbet/rbi/parlour.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Artifact, Cache, CaskLoader, Caskroom, Denylist, Metadata, Quarantine, Staged, Utils - - - - Classes: AbstractCaskErrorWithToken, ArtifactSet, Audit, Auditor, Cask, CaskAlreadyCreatedError, CaskCannotBeInstalledError, CaskConflictError, CaskCyclicDependencyError, CaskError, CaskInvalidError, CaskNotInstalledError, CaskQuarantineError, CaskQuarantinePropagationError, CaskQuarantineReleaseError, CaskSelfReferencingDependencyError, CaskTokenMismatchError, CaskUnavailableError, CaskUnreadableError, CaskUnspecifiedError, Config, DSL, Download, Info, Installer, List, Migrator, MultipleCaskErrors, Pkg, Reinstall, TapCaskAmbiguityError, TapCaskUnavailableError, URL, Uninstall, Upgrade - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/AbstractCaskErrorWithToken.html b/docs/Cask/AbstractCaskErrorWithToken.html deleted file mode 100644 index c82a216ee..000000000 --- a/docs/Cask/AbstractCaskErrorWithToken.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - - Exception: Cask::AbstractCaskErrorWithToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::AbstractCaskErrorWithToken - - - Private -

-
- -
-
Inherits:
-
- CaskError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Abstract cask error containing a cask token.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(token, reason = nil) ⇒ AbstractCaskErrorWithToken - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of AbstractCaskErrorWithToken.

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-
-
# File 'cask/exceptions.rb', line 33
-
-def initialize(token, reason = nil)
-  super()
-
-  @token = token.to_s
-  @reason = reason.to_s
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #reasonString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'cask/exceptions.rb', line 31
-
-def reason
-  @reason
-end
-
-
- - - -
-

- - #tokenString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-
-
# File 'cask/exceptions.rb', line 28
-
-def token
-  @token
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact.html b/docs/Cask/Artifact.html deleted file mode 100644 index 6ac344543..000000000 --- a/docs/Cask/Artifact.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - Module: Cask::Artifact - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Artifact - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact.rb,
- cask/artifact/app.rb,
cask/artifact/pkg.rb,
cask/artifact/zap.rb,
cask/artifact/font.rb,
cask/artifact/moved.rb,
cask/artifact/suite.rb,
cask/artifact/binary.rb,
cask/artifact/manpage.rb,
cask/artifact/service.rb,
cask/artifact/artifact.rb,
cask/artifact/prefpane.rb,
cask/artifact/qlplugin.rb,
cask/artifact/installer.rb,
cask/artifact/relocated.rb,
cask/artifact/symlinked.rb,
cask/artifact/uninstall.rb,
cask/artifact/dictionary.rb,
cask/artifact/mdimporter.rb,
cask/artifact/stage_only.rb,
cask/artifact/vst_plugin.rb,
cask/artifact/colorpicker.rb,
cask/artifact/vst3_plugin.rb,
cask/artifact/input_method.rb,
cask/artifact/screen_saver.rb,
cask/artifact/internet_plugin.rb,
cask/artifact/keyboard_layout.rb,
cask/artifact/preflight_block.rb,
cask/artifact/postflight_block.rb,
cask/artifact/abstract_artifact.rb,
cask/artifact/audio_unit_plugin.rb,
cask/artifact/abstract_uninstall.rb,
cask/artifact/abstract_flight_block.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Module containing all cask artifact classes.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: AbstractArtifact, AbstractFlightBlock, AbstractUninstall, App, Artifact, AudioUnitPlugin, Binary, Colorpicker, Dictionary, Font, InputMethod, Installer, InternetPlugin, KeyboardLayout, Manpage, Mdimporter, Moved, Pkg, PostflightBlock, PreflightBlock, Prefpane, Qlplugin, Relocated, ScreenSaver, Service, StageOnly, Suite, Symlinked, Uninstall, Vst3Plugin, VstPlugin, Zap - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/AbstractArtifact.html b/docs/Cask/Artifact/AbstractArtifact.html deleted file mode 100644 index 65622bb86..000000000 --- a/docs/Cask/Artifact/AbstractArtifact.html +++ /dev/null @@ -1,1061 +0,0 @@ - - - - - - - Class: Cask::Artifact::AbstractArtifact - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::AbstractArtifact - Abstract - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Attrable, T::Helpers
-
- - - -
-
Includes:
-
Comparable
-
- - - - - - -
-
Defined in:
-
cask/artifact/abstract_artifact.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

It cannot be directly instantiated. Subclasses must implement the abstract methods below.

-
-
-

Abstract superclass for all artifacts.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #cask ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- -
-

Constructor Details

- -
-

- - #initialize(cask, *dsl_args) ⇒ AbstractArtifact - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of AbstractArtifact.

- - -
-
-
- - -
- - - - -
-
-
-
-141
-142
-143
-144
-
-
# File 'cask/artifact/abstract_artifact.rb', line 141
-
-def initialize(cask, *dsl_args)
-  @cask = cask
-  @dsl_args = dsl_args.deep_dup
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-139
-140
-141
-
-
# File 'cask/artifact/abstract_artifact.rb', line 139
-
-def cask
-  @cask
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .dirmethodObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'cask/artifact/abstract_artifact.rb', line 29
-
-def self.dirmethod
-  @dirmethod ||= :"#{dsl_key}dir"
-end
-
-
- -
-

- - .dsl_keyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'cask/artifact/abstract_artifact.rb', line 25
-
-def self.dsl_key
-  @dsl_key ||= T.must(name).sub(/^.*:/, "").gsub(/(.)([A-Z])/, '\1_\2').downcase.to_sym
-end
-
-
- -
-

- - .english_articleObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'cask/artifact/abstract_artifact.rb', line 21
-
-def self.english_article
-  @english_article ||= /^[aeiou]/i.match?(english_name) ? "an" : "a"
-end
-
-
- -
-

- - .english_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'cask/artifact/abstract_artifact.rb', line 17
-
-def self.english_name
-  @english_name ||= T.must(name).sub(/^.*:/, "").gsub(/(.)([A-Z])/, '\1 \2')
-end
-
-
- -
-

- - .read_script_arguments(arguments, stanza, default_arguments = {}, override_arguments = {}, key = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- TODO: -

this sort of logic would make more sense in dsl.rb, or a -constructor called from dsl.rb, so long as that isn't slow.

-
-
- - - -
-
-
- - -
- - - - -
-
-
-
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-
-
# File 'cask/artifact/abstract_artifact.rb', line 100
-
-def self.read_script_arguments(arguments, stanza, default_arguments = {}, override_arguments = {}, key = nil)
-  # TODO: when stanza names are harmonized with class names,
-  #       stanza may not be needed as an explicit argument
-  description = key ? "#{stanza} #{key.inspect}" : stanza.to_s
-
-  # backward-compatible string value
-  arguments = if arguments.is_a?(String)
-    { executable: arguments }
-  else
-    # Avoid mutating the original argument
-    arguments.dup
-  end
-
-  # key sanity
-  permitted_keys = [:args, :input, :executable, :must_succeed, :sudo, :print_stdout, :print_stderr]
-  unknown_keys = arguments.keys - permitted_keys
-  unless unknown_keys.empty?
-    opoo "Unknown arguments to #{description} -- " \
-         "#{unknown_keys.inspect} (ignored). Running " \
-         "`brew update; brew cleanup` will likely fix it."
-  end
-  arguments.select! { |k| permitted_keys.include?(k) }
-
-  # key warnings
-  override_keys = override_arguments.keys
-  ignored_keys = arguments.keys & override_keys
-  unless ignored_keys.empty?
-    onoe "Some arguments to #{description} will be ignored -- :#{unknown_keys.inspect} (overridden)."
-  end
-
-  # extract executable
-  executable = arguments.key?(:executable) ? arguments.delete(:executable) : nil
-
-  arguments = default_arguments.merge arguments
-  arguments.merge! override_arguments
-
-  [executable, arguments]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #configObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-146
-147
-148
-
-
# File 'cask/artifact/abstract_artifact.rb', line 146
-
-def config
-  cask.config
-end
-
-
- -
-

- - #staged_path_join_executable(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'cask/artifact/abstract_artifact.rb', line 36
-
-def staged_path_join_executable(path)
-  path = Pathname(path)
-  path = path.expand_path if path.to_s.start_with?("~")
-
-  absolute_path = if path.absolute?
-    path
-  else
-    cask.staged_path.join(path)
-  end
-
-  FileUtils.chmod "+x", absolute_path if absolute_path.exist? && !absolute_path.executable?
-
-  if absolute_path.exist?
-    absolute_path
-  else
-    path
-  end
-end
-
-
- -
-

- - #summarizeString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-34
-
-
# File 'cask/artifact/abstract_artifact.rb', line 34
-
-def summarize; end
-
-
- -
-

- - #to_argsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-155
-156
-157
-
-
# File 'cask/artifact/abstract_artifact.rb', line 155
-
-def to_args
-  @dsl_args.compact_blank
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/AbstractFlightBlock.html b/docs/Cask/Artifact/AbstractFlightBlock.html deleted file mode 100644 index a6448b039..000000000 --- a/docs/Cask/Artifact/AbstractFlightBlock.html +++ /dev/null @@ -1,683 +0,0 @@ - - - - - - - Class: Cask::Artifact::AbstractFlightBlock - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::AbstractFlightBlock - - - Private -

-
- -
-
Inherits:
-
- AbstractArtifact - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/abstract_flight_block.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Abstract superclass for block artifacts.

- - -
-
-
- - -
-

Direct Known Subclasses

-

PostflightBlock, PreflightBlock

-
- - - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, english_article, english_name, read_script_arguments, #staged_path_join_executable, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -
-

- - #initialize(cask, **directives) ⇒ AbstractFlightBlock - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of AbstractFlightBlock.

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-
-
# File 'cask/artifact/abstract_flight_block.rb', line 20
-
-def initialize(cask, **directives)
-  super(cask)
-  @directives = directives
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #directivesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'cask/artifact/abstract_flight_block.rb', line 18
-
-def directives
-  @directives
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .dsl_keyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'cask/artifact/abstract_flight_block.rb', line 10
-
-def self.dsl_key
-  super.to_s.sub(/_block$/, "").to_sym
-end
-
-
- -
-

- - .uninstall_dsl_keyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'cask/artifact/abstract_flight_block.rb', line 14
-
-def self.uninstall_dsl_key
-  dsl_key.to_s.prepend("uninstall_").to_sym
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #install_phaseObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'cask/artifact/abstract_flight_block.rb', line 25
-
-def install_phase(**)
-  abstract_phase(self.class.dsl_key)
-end
-
-
- -
-

- - #summarizeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'cask/artifact/abstract_flight_block.rb', line 33
-
-def summarize
-  directives.keys.map(&:to_s).join(", ")
-end
-
-
- -
-

- - #uninstall_phaseObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'cask/artifact/abstract_flight_block.rb', line 29
-
-def uninstall_phase(**)
-  abstract_phase(self.class.uninstall_dsl_key)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/AbstractUninstall.html b/docs/Cask/Artifact/AbstractUninstall.html deleted file mode 100644 index 9c242734f..000000000 --- a/docs/Cask/Artifact/AbstractUninstall.html +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - - Class: Cask::Artifact::AbstractUninstall - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::AbstractUninstall - - - Private -

-
- -
-
Inherits:
-
- AbstractArtifact - - - show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
cask/artifact/abstract_uninstall.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Abstract superclass for uninstall artifacts.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Uninstall, Zap

-
- - -

- Constant Summary - collapse -

- -
- -
ORDERED_DIRECTIVES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  :early_script,
-  :launchctl,
-  :quit,
-  :signal,
-  :login_item,
-  :kext,
-  :script,
-  :pkgutil,
-  :delete,
-  :trash,
-  :rmdir,
-].freeze
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, read_script_arguments, #staged_path_join_executable, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -
-

- - #initialize(cask, **directives) ⇒ AbstractUninstall - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of AbstractUninstall.

- - -
-
-
- - -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'cask/artifact/abstract_uninstall.rb', line 38
-
-def initialize(cask, **directives)
-  directives.assert_valid_keys(*ORDERED_DIRECTIVES)
-
-  super
-  directives[:signal] = Array(directives[:signal]).flatten.each_slice(2).to_a
-  @directives = directives
-
-  # This is already included when loading from the API.
-  return if cask.loaded_from_api?
-  return unless directives.key?(:kext)
-
-  cask.caveats do
-    T.bind(self, ::Cask::DSL::Caveats)
-    kext
-  end
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #directivesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-
-
# File 'cask/artifact/abstract_uninstall.rb', line 36
-
-def directives
-  @directives
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_args(cask, **directives) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'cask/artifact/abstract_uninstall.rb', line 32
-
-def self.from_args(cask, **directives)
-  new(cask, **directives)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #summarizeString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-
-
# File 'cask/artifact/abstract_uninstall.rb', line 60
-
-def summarize
-  to_h.flat_map { |key, val| Array(val).map { |v| "#{key.inspect} => #{v.inspect}" } }.join(", ")
-end
-
-
- -
-

- - #to_hObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-55
-56
-57
-
-
# File 'cask/artifact/abstract_uninstall.rb', line 55
-
-def to_h
-  directives.to_h
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/App.html b/docs/Cask/Artifact/App.html deleted file mode 100644 index 970bc67fe..000000000 --- a/docs/Cask/Artifact/App.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::Artifact::App - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::App - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/app.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the app stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Artifact.html b/docs/Cask/Artifact/Artifact.html deleted file mode 100644 index 9b0679b5d..000000000 --- a/docs/Cask/Artifact/Artifact.html +++ /dev/null @@ -1,533 +0,0 @@ - - - - - - - Class: Cask::Artifact::Artifact - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Artifact - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/artifact.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Generic artifact corresponding to the artifact stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

#initialize, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Class Method Details

- - -
-

- - .english_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/artifact/artifact.rb', line 11
-
-def self.english_name
-  "Generic Artifact"
-end
-
-
- -
-

- - .from_args(cask, *args) ⇒ T.attached_class - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cask - - - (Cask) - - - -
  • - -
  • - - args - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class) - - - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'cask/artifact/artifact.rb', line 16
-
-def self.from_args(cask, *args)
-  source, options = args
-
-  raise CaskInvalidError.new(cask.token, "No source provided for #{english_name}.") if source.blank?
-
-  unless options&.key?(:target)
-    raise CaskInvalidError.new(cask.token, "#{english_name} '#{source}' requires a target.")
-  end
-
-  new(cask, source, **options)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #resolve_target(target) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'cask/artifact/artifact.rb', line 29
-
-def resolve_target(target)
-  super(target, base_dir: nil)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/AudioUnitPlugin.html b/docs/Cask/Artifact/AudioUnitPlugin.html deleted file mode 100644 index dd0d11342..000000000 --- a/docs/Cask/Artifact/AudioUnitPlugin.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::Artifact::AudioUnitPlugin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::AudioUnitPlugin - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/audio_unit_plugin.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the audio_unit_plugin stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Binary.html b/docs/Cask/Artifact/Binary.html deleted file mode 100644 index 91e948302..000000000 --- a/docs/Cask/Artifact/Binary.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - Class: Cask::Artifact::Binary - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Binary - - - Private -

-
- -
-
Inherits:
-
- Symlinked - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/binary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the binary stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Symlinked

-

english_description, #install_phase, link_type_english_name, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Instance Method Details

- - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-
-
# File 'cask/artifact/binary.rb', line 10
-
-def link(command: nil, **options)
-  super
-  return if source.executable?
-
-  if source.writable?
-    FileUtils.chmod "+x", source
-  else
-    command.run!("/bin/chmod", args: ["+x", source], sudo: true)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Colorpicker.html b/docs/Cask/Artifact/Colorpicker.html deleted file mode 100644 index 31639e026..000000000 --- a/docs/Cask/Artifact/Colorpicker.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::Artifact::Colorpicker - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Colorpicker - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/colorpicker.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the colorpicker stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Dictionary.html b/docs/Cask/Artifact/Dictionary.html deleted file mode 100644 index cad1f1faa..000000000 --- a/docs/Cask/Artifact/Dictionary.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::Artifact::Dictionary - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Dictionary - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/dictionary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the dictionary stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Font.html b/docs/Cask/Artifact/Font.html deleted file mode 100644 index 1eafae87e..000000000 --- a/docs/Cask/Artifact/Font.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::Artifact::Font - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Font - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/font.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the font stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/InputMethod.html b/docs/Cask/Artifact/InputMethod.html deleted file mode 100644 index 14bc4a142..000000000 --- a/docs/Cask/Artifact/InputMethod.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::Artifact::InputMethod - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::InputMethod - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/input_method.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the input_method stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Installer.html b/docs/Cask/Artifact/Installer.html deleted file mode 100644 index b73e54f0d..000000000 --- a/docs/Cask/Artifact/Installer.html +++ /dev/null @@ -1,762 +0,0 @@ - - - - - - - Class: Cask::Artifact::Installer - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Installer - - - Private -

-
- -
-
Inherits:
-
- AbstractArtifact - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/installer.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the installer stanza.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: ManualInstaller, ScriptInstaller - - - - -

- - -

- Constant Summary - collapse -

- -
- -
VALID_KEYS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Set.new([
-  :manual,
-  :script,
-]).freeze
- -
- - - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #args ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #path ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, read_script_arguments, #staged_path_join_executable, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -
-

- - #initialize(cask, **args) ⇒ Installer - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Installer.

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-
-
# File 'cask/artifact/installer.rb', line 71
-
-def initialize(cask, **args)
-  super
-
-  if args.key?(:manual)
-    @path = Pathname(args[:manual])
-    @args = []
-    extend(ManualInstaller)
-    return
-  end
-
-  path, @args = self.class.read_script_arguments(
-    args[:script], self.class.dsl_key.to_s, { must_succeed: true, sudo: false }, print_stdout: true
-  )
-  raise CaskInvalidError.new(cask, "#{self.class.dsl_key} missing executable") if path.nil?
-
-  @path = Pathname(path)
-  extend(ScriptInstaller)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #argsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'cask/artifact/installer.rb', line 69
-
-def args
-  @args
-end
-
-
- - - -
-

- - #pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'cask/artifact/installer.rb', line 69
-
-def path
-  @path
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_args(cask, **args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-
-
# File 'cask/artifact/installer.rb', line 45
-
-def self.from_args(cask, **args)
-  raise CaskInvalidError.new(cask, "'installer' stanza requires an argument.") if args.empty?
-
-  if args.key?(:script) && !args[:script].respond_to?(:key?)
-    if args.key?(:executable)
-      raise CaskInvalidError.new(cask, "'installer' stanza gave arguments for both :script and :executable.")
-    end
-
-    args[:executable] = args[:script]
-    args.delete(:script)
-    args = { script: args }
-  end
-
-  if args.keys.count != 1
-    raise CaskInvalidError.new(
-      cask,
-      "invalid 'installer' stanza: Only one of #{VALID_KEYS.inspect} is permitted.",
-    )
-  end
-
-  args.assert_valid_keys(*VALID_KEYS)
-  new(cask, **args)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #summarizeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'cask/artifact/installer.rb', line 90
-
-def summarize
-  path.to_s
-end
-
-
- -
-

- - #to_hObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-94
-95
-96
-97
-98
-
-
# File 'cask/artifact/installer.rb', line 94
-
-def to_h
-  { path: }.tap do |h|
-    h[:args] = args unless is_a?(ManualInstaller)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Installer/ManualInstaller.html b/docs/Cask/Artifact/Installer/ManualInstaller.html deleted file mode 100644 index 1501f7838..000000000 --- a/docs/Cask/Artifact/Installer/ManualInstaller.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - Module: Cask::Artifact::Installer::ManualInstaller - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Artifact::Installer::ManualInstaller - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
cask/artifact/installer.rb,
- cask/artifact/installer.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Instance Method Details

- - -
-

- - #install_phaseObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-
-
# File 'cask/artifact/installer.rb', line 18
-
-def install_phase(**)
-  puts <<~EOS
-    Cask #{cask} only provides a manual installer. To run it and complete the installation:
-      open #{cask.staged_path.join(path).to_s.shellescape}
-  EOS
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Installer/ScriptInstaller.html b/docs/Cask/Artifact/Installer/ScriptInstaller.html deleted file mode 100644 index a16e00045..000000000 --- a/docs/Cask/Artifact/Installer/ScriptInstaller.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - Module: Cask::Artifact::Installer::ScriptInstaller - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Artifact::Installer::ScriptInstaller - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/installer.rb,
- cask/artifact/installer.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Extension module for script installers.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #install_phase(command: nil, **_) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-
-
# File 'cask/artifact/installer.rb', line 28
-
-def install_phase(command: nil, **_)
-  # TODO: The `T.unsafe` is a false positive that is unnecessary in newer releasese of Sorbet
-  # (confirmend with sorbet v0.5.10672)
-  ohai "Running #{T.unsafe(self.class).dsl_key} script '#{path}'"
-
-  executable_path = staged_path_join_executable(path)
-
-  command.run!(
-    executable_path,
-    **args,
-    env: { "PATH" => PATH.new(
-      HOMEBREW_PREFIX/"bin", HOMEBREW_PREFIX/"sbin", ENV.fetch("PATH")
-    ) },
-  )
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/InternetPlugin.html b/docs/Cask/Artifact/InternetPlugin.html deleted file mode 100644 index b0b79adee..000000000 --- a/docs/Cask/Artifact/InternetPlugin.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::Artifact::InternetPlugin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::InternetPlugin - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/internet_plugin.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the internet_plugin stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/KeyboardLayout.html b/docs/Cask/Artifact/KeyboardLayout.html deleted file mode 100644 index 26ec94e85..000000000 --- a/docs/Cask/Artifact/KeyboardLayout.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - Class: Cask::Artifact::KeyboardLayout - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::KeyboardLayout - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/keyboard_layout.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the keyboard_layout stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Moved

-

english_description, #summarize_installed

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Instance Method Details

- - -
-

- - #install_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-
-
# File 'cask/artifact/keyboard_layout.rb', line 10
-
-def install_phase(**options)
-  super
-  delete_keyboard_layout_cache(**options)
-end
-
-
- -
-

- - #uninstall_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-
-
# File 'cask/artifact/keyboard_layout.rb', line 15
-
-def uninstall_phase(**options)
-  super
-  delete_keyboard_layout_cache(**options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Manpage.html b/docs/Cask/Artifact/Manpage.html deleted file mode 100644 index 43f901069..000000000 --- a/docs/Cask/Artifact/Manpage.html +++ /dev/null @@ -1,533 +0,0 @@ - - - - - - - Class: Cask::Artifact::Manpage - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Manpage - - - Private -

-
- -
-
Inherits:
-
- Symlinked - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/manpage.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the manpage stanza.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Symlinked

-

english_description, #install_phase, link_type_english_name, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

#source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -
-

- - #initialize(cask, source, section) ⇒ Manpage - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Manpage.

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-
-
# File 'cask/artifact/manpage.rb', line 20
-
-def initialize(cask, source, section)
-  @section = section
-
-  super(cask, source)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #sectionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'cask/artifact/manpage.rb', line 10
-
-def section
-  @section
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_args(cask, source) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-
-
# File 'cask/artifact/manpage.rb', line 12
-
-def self.from_args(cask, source)
-  section = source.to_s[/\.([1-8]|n|l)(?:\.gz)?$/, 1]
-
-  raise CaskInvalidError, "'#{source}' is not a valid man page name" unless section
-
-  new(cask, source, section)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #resolve_target(target) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'cask/artifact/manpage.rb', line 26
-
-def resolve_target(target)
-  config.manpagedir.join("man#{section}", target)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Mdimporter.html b/docs/Cask/Artifact/Mdimporter.html deleted file mode 100644 index ae0ad295a..000000000 --- a/docs/Cask/Artifact/Mdimporter.html +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - Class: Cask::Artifact::Mdimporter - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Mdimporter - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/mdimporter.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the mdimporter stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Moved

-

english_description, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Class Method Details

- - -
-

- - .english_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/artifact/mdimporter.rb', line 11
-
-def self.english_name
-  "Spotlight metadata importer"
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #install_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-
-
# File 'cask/artifact/mdimporter.rb', line 15
-
-def install_phase(**options)
-  super
-  reload_spotlight(**options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Moved.html b/docs/Cask/Artifact/Moved.html deleted file mode 100644 index 539d64bc8..000000000 --- a/docs/Cask/Artifact/Moved.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - - Class: Cask::Artifact::Moved - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Moved - - - Private -

-
- -
-
Inherits:
-
- Relocated - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/moved.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Superclass for all artifacts that are installed by moving them to the target location.

- - -
-
-
- - -
- - - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Class Method Details

- - -
-

- - .english_descriptionString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'cask/artifact/moved.rb', line 12
-
-def self.english_description
-  "#{english_name}s"
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #install_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'cask/artifact/moved.rb', line 16
-
-def install_phase(**options)
-  move(**options)
-end
-
-
- -
-

- - #summarize_installedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'cask/artifact/moved.rb', line 24
-
-def summarize_installed
-  if target.exist?
-    "#{printable_target} (#{target.abv})"
-  else
-    Formatter.error(printable_target, label: "Missing #{self.class.english_name}")
-  end
-end
-
-
- -
-

- - #uninstall_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'cask/artifact/moved.rb', line 20
-
-def uninstall_phase(**options)
-  move_back(**options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Pkg.html b/docs/Cask/Artifact/Pkg.html deleted file mode 100644 index 95516ce28..000000000 --- a/docs/Cask/Artifact/Pkg.html +++ /dev/null @@ -1,625 +0,0 @@ - - - - - - - Class: Cask::Artifact::Pkg - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Pkg - - - Private -

-
- -
-
Inherits:
-
- AbstractArtifact - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/pkg.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the pkg stanza.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, read_script_arguments, #staged_path_join_executable, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -
-

- - #initialize(cask, path, **stanza_options) ⇒ Pkg - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Pkg.

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-
-
# File 'cask/artifact/pkg.rb', line 21
-
-def initialize(cask, path, **stanza_options)
-  super
-  @path = cask.staged_path.join(path)
-  @stanza_options = stanza_options
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'cask/artifact/pkg.rb', line 14
-
-def path
-  @path
-end
-
-
- - - -
-

- - #stanza_optionsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'cask/artifact/pkg.rb', line 14
-
-def stanza_options
-  @stanza_options
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_args(cask, path, **stanza_options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-
-
# File 'cask/artifact/pkg.rb', line 16
-
-def self.from_args(cask, path, **stanza_options)
-  stanza_options.assert_valid_keys(:allow_untrusted, :choices)
-  new(cask, path, **stanza_options)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #install_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'cask/artifact/pkg.rb', line 31
-
-def install_phase(**options)
-  run_installer(**options)
-end
-
-
- -
-

- - #summarizeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'cask/artifact/pkg.rb', line 27
-
-def summarize
-  path.relative_path_from(cask.staged_path).to_s
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/PostflightBlock.html b/docs/Cask/Artifact/PostflightBlock.html deleted file mode 100644 index ff05e0685..000000000 --- a/docs/Cask/Artifact/PostflightBlock.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - Class: Cask::Artifact::PostflightBlock - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::PostflightBlock - - - Private -

-
- -
-
Inherits:
-
- AbstractFlightBlock - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/postflight_block.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the postflight stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractFlightBlock

-

#directives

- - - -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from AbstractFlightBlock

-

dsl_key, #initialize, #install_phase, #summarize, uninstall_dsl_key, #uninstall_phase

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::AbstractFlightBlock

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/PreflightBlock.html b/docs/Cask/Artifact/PreflightBlock.html deleted file mode 100644 index ba0d9a45d..000000000 --- a/docs/Cask/Artifact/PreflightBlock.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - Class: Cask::Artifact::PreflightBlock - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::PreflightBlock - - - Private -

-
- -
-
Inherits:
-
- AbstractFlightBlock - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/preflight_block.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the preflight stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractFlightBlock

-

#directives

- - - -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from AbstractFlightBlock

-

dsl_key, #initialize, #install_phase, #summarize, uninstall_dsl_key, #uninstall_phase

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::AbstractFlightBlock

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Prefpane.html b/docs/Cask/Artifact/Prefpane.html deleted file mode 100644 index 41a0eb678..000000000 --- a/docs/Cask/Artifact/Prefpane.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - Class: Cask::Artifact::Prefpane - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Prefpane - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/prefpane.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the prefpane stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Class Method Details

- - -
-

- - .english_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/artifact/prefpane.rb', line 11
-
-def self.english_name
-  "Preference Pane"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Qlplugin.html b/docs/Cask/Artifact/Qlplugin.html deleted file mode 100644 index dc8e5226c..000000000 --- a/docs/Cask/Artifact/Qlplugin.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - - Class: Cask::Artifact::Qlplugin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Qlplugin - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/qlplugin.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the qlplugin stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Moved

-

english_description, #summarize_installed

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Class Method Details

- - -
-

- - .english_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/artifact/qlplugin.rb', line 11
-
-def self.english_name
-  "Quick Look Plugin"
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #install_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-
-
# File 'cask/artifact/qlplugin.rb', line 15
-
-def install_phase(**options)
-  super
-  reload_quicklook(**options)
-end
-
-
- -
-

- - #uninstall_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-
-
# File 'cask/artifact/qlplugin.rb', line 20
-
-def uninstall_phase(**options)
-  super
-  reload_quicklook(**options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Relocated.html b/docs/Cask/Artifact/Relocated.html deleted file mode 100644 index d0fa025ab..000000000 --- a/docs/Cask/Artifact/Relocated.html +++ /dev/null @@ -1,768 +0,0 @@ - - - - - - - Class: Cask::Artifact::Relocated - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Relocated - - - Private -

-
- -
-
Inherits:
-
- AbstractArtifact - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/relocated.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Superclass for all artifacts which have a source and a target location.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Moved, Symlinked

-
- - - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, read_script_arguments, #staged_path_join_executable, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -
-

- - #initialize(cask, source, **target_hash) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-45
-46
-
-
# File 'cask/artifact/relocated.rb', line 40
-
-def initialize(cask, source, **target_hash)
-  super
-
-  target = target_hash[:target]
-  @source_string = source.to_s
-  @target_string = target.to_s
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_args(cask, *args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-
-
# File 'cask/artifact/relocated.rb', line 11
-
-def self.from_args(cask, *args)
-  source_string, target_hash = args
-
-  if target_hash
-    raise CaskInvalidError, cask unless target_hash.respond_to?(:keys)
-
-    target_hash.assert_valid_keys(:target)
-  end
-
-  target_hash ||= {}
-
-  new(cask, source_string, **target_hash)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #resolve_target(target, base_dir: config.public_send(self.class.dirmethod)) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'cask/artifact/relocated.rb', line 25
-
-def resolve_target(target, base_dir: config.public_send(self.class.dirmethod))
-  target = Pathname(target)
-
-  if target.relative?
-    return target.expand_path if target.descend.first.to_s == "~"
-    return base_dir/target if base_dir
-  end
-
-  target
-end
-
-
- -
-

- - #sourceObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-48
-49
-50
-51
-52
-53
-54
-
-
# File 'cask/artifact/relocated.rb', line 48
-
-def source
-  @source ||= begin
-    base_path = cask.staged_path
-    base_path = base_path.join(cask.url.only_path) if cask.url&.only_path.present?
-    base_path.join(@source_string)
-  end
-end
-
-
- -
-

- - #summarizeString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-67
-68
-69
-70
-
-
# File 'cask/artifact/relocated.rb', line 67
-
-def summarize
-  target_string = @target_string.empty? ? "" : " -> #{@target_string}"
-  "#{@source_string}#{target_string}"
-end
-
-
- -
-

- - #targetObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'cask/artifact/relocated.rb', line 56
-
-def target
-  @target ||= resolve_target(@target_string.presence || source.basename)
-end
-
-
- -
-

- - #to_aObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-
-
# File 'cask/artifact/relocated.rb', line 60
-
-def to_a
-  [@source_string].tap do |ary|
-    ary << { target: @target_string } unless @target_string.empty?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/ScreenSaver.html b/docs/Cask/Artifact/ScreenSaver.html deleted file mode 100644 index 18a9b9426..000000000 --- a/docs/Cask/Artifact/ScreenSaver.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::Artifact::ScreenSaver - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::ScreenSaver - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/screen_saver.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the screen_saver stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Service.html b/docs/Cask/Artifact/Service.html deleted file mode 100644 index 7ccb28699..000000000 --- a/docs/Cask/Artifact/Service.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::Artifact::Service - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Service - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/service.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the service stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - - - - - - - -

Method Summary

- -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/StageOnly.html b/docs/Cask/Artifact/StageOnly.html deleted file mode 100644 index ec0fc8b28..000000000 --- a/docs/Cask/Artifact/StageOnly.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - - Class: Cask::Artifact::StageOnly - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::StageOnly - - - Private -

-
- -
-
Inherits:
-
- AbstractArtifact - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/stage_only.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the stage_only stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::AbstractArtifact

- -
- - -
-

Class Method Details

- - -
-

- - .from_args(cask, *args, **kwargs) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'cask/artifact/stage_only.rb', line 10
-
-def self.from_args(cask, *args, **kwargs)
-  if (args != [true] && args != ["true"]) || kwargs.present?
-    raise CaskInvalidError.new(cask.token, "'stage_only' takes only a single argument: true")
-  end
-
-  new(cask, true)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #summarizeString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'cask/artifact/stage_only.rb', line 24
-
-def summarize
-  "true"
-end
-
-
- -
-

- - #to_aArray<Boolean> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<Boolean>) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'cask/artifact/stage_only.rb', line 19
-
-def to_a
-  [true]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Suite.html b/docs/Cask/Artifact/Suite.html deleted file mode 100644 index d9888ca84..000000000 --- a/docs/Cask/Artifact/Suite.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - - Class: Cask::Artifact::Suite - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Suite - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/suite.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the suite stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dsl_key, english_article, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Class Method Details

- - -
-

- - .dirmethodSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'cask/artifact/suite.rb', line 16
-
-def self.dirmethod
-  :appdir
-end
-
-
- -
-

- - .english_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/artifact/suite.rb', line 11
-
-def self.english_name
-  "App Suite"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Symlinked.html b/docs/Cask/Artifact/Symlinked.html deleted file mode 100644 index c8a932da8..000000000 --- a/docs/Cask/Artifact/Symlinked.html +++ /dev/null @@ -1,591 +0,0 @@ - - - - - - - Class: Cask::Artifact::Symlinked - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Symlinked - - - Private -

-
- -
-
Inherits:
-
- Relocated - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/symlinked.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Superclass for all artifacts which are installed by symlinking them to the target location.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Binary, Manpage

-
- - - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Class Method Details

- - -
-

- - .english_descriptionString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'cask/artifact/symlinked.rb', line 16
-
-def self.english_description
-  "#{english_name} #{link_type_english_name}s"
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/artifact/symlinked.rb', line 11
-
-def self.link_type_english_name
-  "Symlink"
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #install_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'cask/artifact/symlinked.rb', line 20
-
-def install_phase(**options)
-  link(**options)
-end
-
-
- -
-

- - #summarize_installedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'cask/artifact/symlinked.rb', line 28
-
-def summarize_installed
-  if target.symlink? && target.exist? && target.readlink.exist?
-    "#{printable_target} -> #{target.readlink} (#{target.readlink.abv})"
-  else
-    string = if target.symlink?
-      "#{printable_target} -> #{target.readlink}"
-    else
-      printable_target
-    end
-
-    Formatter.error(string, label: "Broken Link")
-  end
-end
-
-
- -
-

- - #uninstall_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'cask/artifact/symlinked.rb', line 24
-
-def uninstall_phase(**options)
-  unlink(**options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Uninstall.html b/docs/Cask/Artifact/Uninstall.html deleted file mode 100644 index 15da723a1..000000000 --- a/docs/Cask/Artifact/Uninstall.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - - Class: Cask::Artifact::Uninstall - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Uninstall - - - Private -

-
- -
-
Inherits:
-
- AbstractUninstall - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/uninstall.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the uninstall stanza.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from AbstractUninstall

-

AbstractUninstall::ORDERED_DIRECTIVES

- - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractUninstall

-

#directives

- - - -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractUninstall

-

from_args, #initialize, #summarize, #to_h

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::AbstractUninstall

- -
- - -
-

Instance Method Details

- - -
-

- - #post_uninstall_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'cask/artifact/uninstall.rb', line 26
-
-def post_uninstall_phase(**options)
-  dispatch_uninstall_directive(:rmdir, **options)
-end
-
-
- -
-

- - #uninstall_phase(upgrade: false, reinstall: false, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'cask/artifact/uninstall.rb', line 12
-
-def uninstall_phase(upgrade: false, reinstall: false, **options)
-  filtered_directives = ORDERED_DIRECTIVES.filter do |directive_sym|
-    next false if directive_sym == :rmdir
-
-    next false if (upgrade || reinstall) && UPGRADE_REINSTALL_SKIP_DIRECTIVES.include?(directive_sym)
-
-    true
-  end
-
-  filtered_directives.each do |directive_sym|
-    dispatch_uninstall_directive(directive_sym, **options)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Vst3Plugin.html b/docs/Cask/Artifact/Vst3Plugin.html deleted file mode 100644 index fed420b6e..000000000 --- a/docs/Cask/Artifact/Vst3Plugin.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - Class: Cask::Artifact::Vst3Plugin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Vst3Plugin - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/vst3_plugin.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the vst3_plugin stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Class Method Details

- - -
-

- - .english_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/artifact/vst3_plugin.rb', line 11
-
-def self.english_name
-  "VST3 Plugin"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/VstPlugin.html b/docs/Cask/Artifact/VstPlugin.html deleted file mode 100644 index 0397274ba..000000000 --- a/docs/Cask/Artifact/VstPlugin.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - Class: Cask::Artifact::VstPlugin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::VstPlugin - - - Private -

-
- -
-
Inherits:
-
- Moved - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/vst_plugin.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the vst_plugin stanza.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Moved

-

english_description, #install_phase, #summarize_installed, #uninstall_phase

- - - - - - - - - -

Methods inherited from Relocated

-

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::Relocated

- -
- - -
-

Class Method Details

- - -
-

- - .english_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/artifact/vst_plugin.rb', line 11
-
-def self.english_name
-  "VST Plugin"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Artifact/Zap.html b/docs/Cask/Artifact/Zap.html deleted file mode 100644 index bc8279b48..000000000 --- a/docs/Cask/Artifact/Zap.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - Class: Cask::Artifact::Zap - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Artifact::Zap - - - Private -

-
- -
-
Inherits:
-
- AbstractUninstall - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact/zap.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Artifact corresponding to the zap stanza.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from AbstractUninstall

-

AbstractUninstall::ORDERED_DIRECTIVES

- - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractUninstall

-

#directives

- - - -

Attributes inherited from AbstractArtifact

-

#cask

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractUninstall

-

from_args, #initialize, #summarize, #to_h

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractArtifact

-

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

- - - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::Artifact::AbstractUninstall

- -
- - -
-

Instance Method Details

- - -
-

- - #zap_phase(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'cask/artifact/zap.rb', line 10
-
-def zap_phase(**options)
-  dispatch_uninstall_directives(**options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/ArtifactSet.html b/docs/Cask/ArtifactSet.html deleted file mode 100644 index 35725477c..000000000 --- a/docs/Cask/ArtifactSet.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - Class: Cask::ArtifactSet - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::ArtifactSet - - - Private -

-
- -
-
Inherits:
-
- Set - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/artifact_set.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Sorted set containing all cask artifacts.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Instance Method Details

- - -
-

- - #each(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-
-
# File 'cask/artifact_set.rb', line 7
-
-def each(&block)
-  return enum_for(T.must(__method__)) { size } unless block
-
-  to_a.each(&block)
-  self
-end
-
-
- -
-

- - #to_aObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'cask/artifact_set.rb', line 14
-
-def to_a
-  super.sort
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Audit.html b/docs/Cask/Audit.html deleted file mode 100644 index f354f2be1..000000000 --- a/docs/Cask/Audit.html +++ /dev/null @@ -1,1435 +0,0 @@ - - - - - - - Class: Cask::Audit - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Audit - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Attrable
-
- - - -
-
Includes:
-
SystemCommand::Mixin, Utils::Curl
-
- - - - - - -
-
Defined in:
-
cask/audit.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Audit a cask for various problems.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

-
-

Constructor Details

- -
-

- - #initialize(cask, download: nil, quarantine: nil, token_conflicts: nil, online: nil, strict: nil, signing: nil, new_cask: nil, only: [], except: []) ⇒ Audit - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Audit.

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'cask/audit.rb', line 26
-
-def initialize(
-  cask,
-  download: nil, quarantine: nil,
-  token_conflicts: nil, online: nil, strict: nil, signing: nil,
-  new_cask: nil, only: [], except: []
-)
-  # `new_cask` implies `online`, `token_conflicts`, `strict` and `signing`
-  online = new_cask if online.nil?
-  strict = new_cask if strict.nil?
-  signing = new_cask if signing.nil?
-  token_conflicts = new_cask if token_conflicts.nil?
-
-  # `online` and `signing` imply `download`
-  download = online || signing if download.nil?
-
-  @cask = cask
-  @download = Download.new(cask, quarantine:) if download
-  @online = online
-  @strict = strict
-  @signing = signing
-  @new_cask = new_cask
-  @token_conflicts = token_conflicts
-  @only = only || []
-  @except = except || []
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'cask/audit.rb', line 22
-
-def cask
-  @cask
-end
-
-
- - - -
-

- - #downloadObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'cask/audit.rb', line 22
-
-def download
-  @download
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #add_error(message, location: nil, strict_only: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - message - - - (String, nil) - - - -
  • - -
  • - - location - - - (Homebrew::SourceLocation, nil) - - - (defaults to: nil) - - -
  • - -
  • - - strict_only - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-92
-93
-94
-95
-96
-97
-
-
# File 'cask/audit.rb', line 92
-
-def add_error(message, location: nil, strict_only: false)
-  # Only raise non-critical audits if the user specified `--strict`.
-  return if strict_only && !@strict
-
-  errors << ({ message:, location:, corrected: false })
-end
-
-
- -
-

- - #errorsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'cask/audit.rb', line 71
-
-def errors
-  @errors ||= []
-end
-
-
- -
-

- - #errors?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-76
-77
-78
-
-
# File 'cask/audit.rb', line 76
-
-def errors?
-  errors.any?
-end
-
-
- -
-

- - #new_cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-296
-
-
# File 'sorbet/rbi/parlour.rbi', line 296
-
-def new_cask?; end
-
-
- -
-

- - #online?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-305
-
-
# File 'sorbet/rbi/parlour.rbi', line 305
-
-def online?; end
-
-
- -
-

- - #resultObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'cask/audit.rb', line 99
-
-def result
-  Formatter.error("failed") if errors?
-end
-
-
- -
-

- - #run!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'cask/audit.rb', line 52
-
-def run!
-  only_audits = @only
-  except_audits = @except
-
-  private_methods.map(&:to_s).grep(/^audit_/).each do |audit_method_name|
-    name = audit_method_name.delete_prefix("audit_")
-    next if !only_audits.empty? && only_audits&.exclude?(name)
-    next if except_audits&.include?(name)
-
-    send(audit_method_name)
-  end
-
-  self
-rescue => e
-  odebug e, ::Utils::Backtrace.clean(e)
-  add_error "exception while auditing #{cask}: #{e.message}"
-  self
-end
-
-
- -
-

- - #signing?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-302
-
-
# File 'sorbet/rbi/parlour.rbi', line 302
-
-def signing?; end
-
-
- -
-

- - #strict?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-299
-
-
# File 'sorbet/rbi/parlour.rbi', line 299
-
-def strict?; end
-
-
- -
-

- - #success?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-82
-83
-
-
# File 'cask/audit.rb', line 81
-
-def success?
-  !errors?
-end
-
-
- -
-

- - #summaryString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-
-
# File 'cask/audit.rb', line 104
-
-def summary
-  return if success?
-
-  summary = ["audit for #{cask}: #{result}"]
-
-  errors.each do |error|
-    summary << " #{Formatter.error("-")} #{error[:message]}"
-  end
-
-  summary.join("\n")
-end
-
-
- -
-

- - #token_conflicts?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-308
-
-
# File 'sorbet/rbi/parlour.rbi', line 308
-
-def token_conflicts?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Auditor.html b/docs/Cask/Auditor.html deleted file mode 100644 index e54ac056c..000000000 --- a/docs/Cask/Auditor.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - - - - Class: Cask::Auditor - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Auditor - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/auditor.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for auditing all available languages of a cask.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
LANGUAGE_BLOCK_LIMIT = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
10
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(cask, audit_download: nil, audit_online: nil, audit_strict: nil, audit_signing: nil, audit_token_conflicts: nil, audit_new_cask: nil, quarantine: nil, any_named_args: nil, language: nil, only: [], except: []) ⇒ Auditor - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Auditor.

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'cask/auditor.rb', line 15
-
-def initialize(
-  cask,
-  audit_download: nil,
-  audit_online: nil,
-  audit_strict: nil,
-  audit_signing: nil,
-  audit_token_conflicts: nil,
-  audit_new_cask: nil,
-  quarantine: nil,
-  any_named_args: nil,
-  language: nil,
-  only: [],
-  except: []
-)
-  @cask = cask
-  @audit_download = audit_download
-  @audit_online = audit_online
-  @audit_new_cask = audit_new_cask
-  @audit_strict = audit_strict
-  @audit_signing = audit_signing
-  @quarantine = quarantine
-  @audit_token_conflicts = audit_token_conflicts
-  @any_named_args = any_named_args
-  @language = language
-  @only = only
-  @except = except
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'cask/auditor.rb', line 13
-
-def cask
-  @cask
-end
-
-
- - - -
-

- - #languageObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'cask/auditor.rb', line 13
-
-def language
-  @language
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .audit(cask, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'cask/auditor.rb', line 9
-
-def self.audit(cask, **options)
-  new(cask, **options).audit
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #auditObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# File 'cask/auditor.rb', line 45
-
-def audit
-  errors = Set.new
-
-  if !language && language_blocks
-    sample_languages = if language_blocks.length > LANGUAGE_BLOCK_LIMIT && !@audit_new_cask
-      sample_keys = language_blocks.keys.sample(LANGUAGE_BLOCK_LIMIT)
-      ohai "Auditing a sample of available languages for #{cask}: " \
-           "#{sample_keys.map { |lang| lang[0].to_s }.to_sentence}"
-      language_blocks.select { |k| sample_keys.include?(k) }
-    else
-      language_blocks
-    end
-
-    sample_languages.each_key do |l|
-      audit = audit_languages(l)
-      if audit.summary.present? && output_summary?(audit)
-        ohai "Auditing language: #{l.map { |lang| "'#{lang}'" }.to_sentence}" if output_summary?
-        puts audit.summary
-      end
-      errors += audit.errors
-    end
-  else
-    audit = audit_cask_instance(cask)
-    puts audit.summary if audit.summary.present? && output_summary?(audit)
-    errors += audit.errors
-  end
-
-  errors
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Cache.html b/docs/Cask/Cache.html deleted file mode 100644 index b7221231c..000000000 --- a/docs/Cask/Cache.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - Module: Cask::Cache - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Cache - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
cask/cache.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for the cask cache.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .pathPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'cask/cache.rb', line 8
-
-def self.path
-  @path ||= T.let(HOMEBREW_CACHE/"Cask", T.nilable(Pathname))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Cask.html b/docs/Cask/Cask.html deleted file mode 100644 index d19664499..000000000 --- a/docs/Cask/Cask.html +++ /dev/null @@ -1,5364 +0,0 @@ - - - - - - - Class: Cask::Cask - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Cask - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
APIHashable, Attrable, Forwardable
-
- - - -
-
Includes:
-
Metadata
-
- - - - - - -
-
Defined in:
-
cask/cask.rb,
- cask/cask.rbi,
sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

An instance of a cask.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Metadata

-

Metadata::METADATA_SUBDIR, Metadata::TIMESTAMP_FORMAT

- - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- - - - - - - - - -

Methods included from APIHashable

-

generated_hash!, generating_hash!, generating_hash?

- - - - - - - - - -

Methods included from Metadata

-

#metadata_main_container_path, #metadata_subdir, #metadata_timestamped_path, #metadata_versioned_path

-
-

Constructor Details

- -
-

- - #initialize(token, sourcefile_path: nil, source: nil, tap: nil, loaded_from_api: false, config: nil, allow_reassignment: false, loader: nil, &block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - token - - - (String) - - - -
  • - -
  • - - sourcefile_path - - - (Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - source - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - tap - - - (Tap, nil) - - - (defaults to: nil) - - -
  • - -
  • - - loaded_from_api - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - config - - - (Config, nil) - - - (defaults to: nil) - - -
  • - -
  • - - allow_reassignment - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - loader - - - (CaskLoader::ILoader, nil) - - - (defaults to: nil) - - -
  • - -
  • - - block - - - (T.proc.bind(DSL).void, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-
-
# File 'cask/cask.rb', line 72
-
-def initialize(token, sourcefile_path: nil, source: nil, tap: nil, loaded_from_api: false,
-               config: nil, allow_reassignment: false, loader: nil, &block)
-  @token = token
-  @sourcefile_path = sourcefile_path
-  @source = source
-  @tap = tap
-  @allow_reassignment = allow_reassignment
-  @loaded_from_api = loaded_from_api
-  @loader = loader
-  # Sorbet has trouble with bound procs assigned to instance variables:
-  # https://github.com/sorbet/sorbet/issues/6843
-  instance_variable_set(:@block, block)
-
-  @default_config = config || Config.new
-
-  self.config = if config_path.exist?
-    Config.from_json(File.read(config_path), ignore_invalid_keys: true)
-  else
-    @default_config
-  end
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #allow_reassignmentObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'cask/cask.rb', line 32
-
-def allow_reassignment
-  @allow_reassignment
-end
-
-
- - - -
-

- - #configObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The configuration of this Cask::Cask.

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'cask/cask.rb', line 29
-
-def config
-  @config
-end
-
-
- - - -
-

- - #default_configObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'cask/cask.rb', line 31
-
-def default_config
-  @default_config
-end
-
-
- - - -
-

- - #downloadObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'cask/cask.rb', line 32
-
-def download
-  @download
-end
-
-
- - - -
-

- - #loaderObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'cask/cask.rb', line 31
-
-def loader
-  @loader
-end
-
-
- - - -
-

- - #sourceObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'cask/cask.rb', line 31
-
-def source
-  @source
-end
-
-
- - - -
-

- - #sourcefile_pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'cask/cask.rb', line 31
-
-def sourcefile_path
-  @sourcefile_path
-end
-
-
- - - -
-

- - #tokenObject (readonly) - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The token of this Cask::Cask.

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'cask/cask.rb', line 24
-
-def token
-  @token
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .all(eval_all: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'cask/cask.rb', line 36
-
-def self.all(eval_all: false)
-  if !eval_all && !Homebrew::EnvConfig.eval_all?
-    raise ArgumentError, "Cask::Cask#all cannot be used without `--eval-all` or HOMEBREW_EVAL_ALL"
-  end
-
-  # Load core casks from tokens so they load from the API when the core cask is not tapped.
-  tokens_and_files = CoreCaskTap.instance.cask_tokens
-  tokens_and_files += Tap.reject(&:core_cask_tap?).flat_map(&:cask_files)
-  tokens_and_files.filter_map do |token_or_file|
-    CaskLoader.load(token_or_file)
-  rescue CaskUnreadableError => e
-    opoo e.message
-
-    nil
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #appdirObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-5
-
-
# File 'cask/cask.rbi', line 5
-
-def appdir; end
-
-
- -
-

- - #artifactsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-
-
# File 'cask/cask.rbi', line 7
-
-def artifacts; end
-
-
- -
-

- - #auto_updatesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-
-
# File 'cask/cask.rbi', line 9
-
-def auto_updates; end
-
-
- -
-

- - #bundle_long_versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-208
-209
-210
-
-
# File 'cask/cask.rb', line 208
-
-def bundle_long_version
-  bundle_version&.version
-end
-
-
- -
-

- - #bundle_short_versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-203
-204
-205
-
-
# File 'cask/cask.rb', line 203
-
-def bundle_short_version
-  bundle_version&.short_version
-end
-
-
- -
-

- - #caskfile_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The caskfile is needed during installation when there are -*flight blocks or the cask has multiple languages

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-157
-158
-159
-
-
# File 'cask/cask.rb', line 157
-
-def caskfile_only?
-  languages.any? || artifacts.any?(Artifact::AbstractFlightBlock)
-end
-
-
- -
-

- - #caskroom_pathPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-241
-242
-243
-
-
# File 'cask/cask.rb', line 241
-
-def caskroom_path
-  @caskroom_path ||= Caskroom.path.join(token)
-end
-
-
- -
-

- - #caveatsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-
-
# File 'cask/cask.rbi', line 11
-
-def caveats; end
-
-
- -
-

- - #checksumable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-216
-217
-218
-
-
# File 'cask/cask.rb', line 216
-
-def checksumable?
-  DownloadStrategyDetector.detect(url.to_s, url.using) <= AbstractFileDownloadStrategy
-end
-
-
- -
-

- - #config_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-212
-213
-214
-
-
# File 'cask/cask.rb', line 212
-
-def config_path
-  /"config.json"
-end
-
-
- -
-

- - #conflicts_withObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-
-
# File 'cask/cask.rbi', line 13
-
-def conflicts_with; end
-
-
- -
-

- - #containerObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-
-
# File 'cask/cask.rbi', line 15
-
-def container; end
-
-
- -
-

- - #depends_onObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-
-
# File 'cask/cask.rbi', line 17
-
-def depends_on; end
-
-
- -
-

- - #deprecated?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-
-
# File 'cask/cask.rbi', line 23
-
-def deprecated?; end
-
-
- -
-

- - #deprecation_dateObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-
-
# File 'cask/cask.rbi', line 25
-
-def deprecation_date; end
-
-
- -
-

- - #deprecation_reasonObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-27
-
-
# File 'cask/cask.rbi', line 27
-
-def deprecation_reason; end
-
-
- -
-

- - #descObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-
-
# File 'cask/cask.rbi', line 19
-
-def desc; end
-
-
- -
-

- - #disable_dateObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-
-
# File 'cask/cask.rbi', line 31
-
-def disable_date; end
-
-
- -
-

- - #disable_reasonObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-
-
# File 'cask/cask.rbi', line 33
-
-def disable_reason; end
-
-
- -
-

- - #disabled?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-
-
# File 'cask/cask.rbi', line 29
-
-def disabled?; end
-
-
- -
-

- - #discontinued?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'cask/cask.rbi', line 21
-
-def discontinued?; end
-
-
- -
-

- - #download_sha_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-220
-221
-222
-
-
# File 'cask/cask.rb', line 220
-
-def download_sha_path
-  /"LATEST_DOWNLOAD_SHA256"
-end
-
-
- -
-

- - #full_nameObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Alias for #full_token.

- - -
-
-
- - -
- - - - -
-
-
-
-148
-
-
# File 'cask/cask.rb', line 148
-
-def full_name = full_token
-
-
- -
-

- - #full_tokenObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The fully-qualified token of this Cask::Cask.

- - -
-
-
- - -
- - - - -
-
-
-
-138
-139
-140
-141
-142
-143
-
-
# File 'cask/cask.rb', line 138
-
-def full_token
-  return token if tap.nil?
-  return token if tap.core_cask_tap?
-
-  "#{tap.name}/#{token}"
-end
-
-
- -
-

- - #homepageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-
-
# File 'cask/cask.rbi', line 35
-
-def homepage; end
-
-
- -
-

- - #install_timeTime? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-162
-163
-164
-165
-166
-
-
# File 'cask/cask.rb', line 162
-
-def install_time
-  # <caskroom_path>/.metadata/<version>/<timestamp>/Casks/<token>.{rb,json} -> <timestamp>
-  time = installed_caskfile&.dirname&.dirname&.basename&.to_s
-  Time.strptime(time, Metadata::TIMESTAMP_FORMAT) if time
-end
-
-
- -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-151
-152
-153
-
-
# File 'cask/cask.rb', line 151
-
-def installed?
-  installed_caskfile&.exist? || false
-end
-
-
- -
-

- - #installed_caskfilePathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-
-
# File 'cask/cask.rb', line 169
-
-def installed_caskfile
-  installed_caskroom_path = caskroom_path
-  installed_token = token
-
-  # Check if the cask is installed with an old name.
-  old_tokens.each do |old_token|
-    old_caskroom_path = Caskroom.path/old_token
-    next if !old_caskroom_path.directory? || old_caskroom_path.symlink?
-
-    installed_caskroom_path = old_caskroom_path
-    installed_token = old_token
-    break
-  end
-
-  installed_version = timestamped_versions(caskroom_path: installed_caskroom_path).last
-  return unless installed_version
-
-  caskfile_dir = (caskroom_path: installed_caskroom_path)
-                 .join(*installed_version, "Casks")
-
-  ["json", "rb"]
-    .map { |ext| caskfile_dir.join("#{installed_token}.#{ext}") }
-    .find(&:exist?)
-end
-
-
- -
-

- - #installed_versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-195
-196
-197
-198
-199
-200
-
-
# File 'cask/cask.rb', line 195
-
-def installed_version
-  return unless (installed_caskfile = self.installed_caskfile)
-
-  # <caskroom_path>/.metadata/<version>/<timestamp>/Casks/<token>.{rb,json} -> <version>
-  installed_caskfile.dirname.dirname.dirname.basename.to_s
-end
-
-
- -
-

- - #languageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-
-
# File 'cask/cask.rbi', line 37
-
-def language; end
-
-
- -
-

- - #languagesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-304
-305
-306
-
-
# File 'cask/cask.rb', line 304
-
-def languages
-  @languages ||= @dsl.languages
-end
-
-
- -
-

- - #livecheckObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-41
-
-
# File 'cask/cask.rbi', line 41
-
-def livecheck; end
-
-
- -
-

- - #livecheckable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-
-
# File 'cask/cask.rbi', line 43
-
-def livecheckable?; end
-
-
- -
-

- - #loaded_from_api?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-313
-
-
# File 'sorbet/rbi/parlour.rbi', line 313
-
-def loaded_from_api?; end
-
-
- -
-

- - #nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-45
-
-
# File 'cask/cask.rbi', line 45
-
-def name; end
-
-
- -
-

- - #new_download_shaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-224
-225
-226
-227
-228
-229
-230
-231
-
-
# File 'cask/cask.rb', line 224
-
-def new_download_sha
-  require "cask/installer"
-
-  # Call checksumable? before hashing
-  @new_download_sha ||= Installer.new(self, verify_download_integrity: false)
-                                 .download(quiet: true)
-                                 .instance_eval { |x| Digest::SHA256.file(x).hexdigest }
-end
-
-
- -
-

- - #old_tokensArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An old name for the cask.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-96
-97
-98
-99
-100
-101
-102
-103
-
-
# File 'cask/cask.rb', line 96
-
-def old_tokens
-  @old_tokens ||= if (tap = self.tap)
-    Tap.tap_migration_oldnames(tap, token) +
-      tap.cask_reverse_renames.fetch(token, [])
-  else
-    []
-  end
-end
-
-
- -
-

- - #on_system_blocks_exist?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-
-
# File 'cask/cask.rbi', line 47
-
-def on_system_blocks_exist?; end
-
-
- -
-

- - #outdated?(greedy: false, greedy_latest: false, greedy_auto_updates: false) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if the installed cask is outdated.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-248
-249
-250
-251
-
-
# File 'cask/cask.rb', line 248
-
-def outdated?(greedy: false, greedy_latest: false, greedy_auto_updates: false)
-  !outdated_version(greedy:, greedy_latest:,
-                    greedy_auto_updates:).nil?
-end
-
-
- -
-

- - #outdated_download_sha?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-233
-234
-235
-236
-237
-238
-
-
# File 'cask/cask.rb', line 233
-
-def outdated_download_sha?
-  return true unless checksumable?
-
-  current_download_sha = download_sha_path.read if download_sha_path.exist?
-  current_download_sha.blank? || current_download_sha != new_download_sha
-end
-
-
- -
-

- - #outdated_info(greedy, verbose, json, greedy_latest, greedy_auto_updates) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-
-
# File 'cask/cask.rb', line 271
-
-def outdated_info(greedy, verbose, json, greedy_latest, greedy_auto_updates)
-  return token if !verbose && !json
-
-  installed_version = outdated_version(greedy:, greedy_latest:,
-                                       greedy_auto_updates:).to_s
-
-  if json
-    {
-      name:               token,
-      installed_versions: [installed_version],
-      current_version:    version,
-    }
-  else
-    "#{token} (#{installed_version}) != #{version}"
-  end
-end
-
-
- -
-

- - #outdated_version(greedy: false, greedy_latest: false, greedy_auto_updates: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-
-
# File 'cask/cask.rb', line 253
-
-def outdated_version(greedy: false, greedy_latest: false, greedy_auto_updates: false)
-  # special case: tap version is not available
-  return if version.nil?
-
-  if version.latest?
-    return installed_version if (greedy || greedy_latest) && outdated_download_sha?
-
-    return
-  elsif auto_updates && !greedy && !greedy_auto_updates
-    return
-  end
-
-  # not outdated unless there is a different version on tap
-  return if installed_version == version
-
-  installed_version
-end
-
-
- -
-

- - #populate_from_api!(json_cask) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-
-
# File 'cask/cask.rb', line 312
-
-def populate_from_api!(json_cask)
-  raise ArgumentError, "Expected cask to be loaded from the API" unless loaded_from_api?
-
-  @languages = json_cask.fetch(:languages, [])
-  @tap_git_head = json_cask.fetch(:tap_git_head, "HEAD")
-
-  @ruby_source_path = json_cask[:ruby_source_path]
-
-  # TODO: Clean this up when we deprecate the current JSON API and move to the internal JSON v3.
-  ruby_source_sha256 = json_cask.dig(:ruby_source_checksum, :sha256)
-  ruby_source_sha256 ||= json_cask[:ruby_source_sha256]
-  @ruby_source_checksum = { sha256: ruby_source_sha256 }
-end
-
-
- -
-

- - #refreshObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-111
-112
-113
-114
-115
-116
-117
-
-
# File 'cask/cask.rb', line 111
-
-def refresh
-  @dsl = DSL.new(self)
-  return unless @block
-
-  @dsl.instance_eval(&@block)
-  @dsl.language_eval
-end
-
-
- -
-

- - #ruby_source_checksumHash{Symbol => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-298
-299
-300
-301
-302
-
-
# File 'cask/cask.rb', line 298
-
-def ruby_source_checksum
-  @ruby_source_checksum ||= {
-    sha256: Digest::SHA256.file(sourcefile_path).hexdigest,
-  }.freeze
-end
-
-
- -
-

- - #ruby_source_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-288
-289
-290
-291
-292
-293
-294
-295
-
-
# File 'cask/cask.rb', line 288
-
-def ruby_source_path
-  return @ruby_source_path if defined?(@ruby_source_path)
-
-  return unless sourcefile_path
-  return unless tap
-
-  @ruby_source_path = sourcefile_path.relative_path_from(tap.path)
-end
-
-
- -
-

- - #sha256Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-
-
# File 'cask/cask.rbi', line 49
-
-def sha256; end
-
-
- -
-

- - #staged_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-51
-
-
# File 'cask/cask.rbi', line 51
-
-def staged_path; end
-
-
- -
-

- - #tapObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-
-
# File 'cask/cask.rb', line 53
-
-def tap
-  return super if block_given? # Object#tap
-
-  @tap
-end
-
-
- -
-

- - #tap_git_headObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-308
-309
-310
-
-
# File 'cask/cask.rb', line 308
-
-def tap_git_head
-  @tap_git_head ||= tap&.git_head
-end
-
-
- -
-

- - #timestamped_versions(caskroom_path: self.caskroom_path) ⇒ Array<Array(String, String)> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - caskroom_path - - - (Pathname) - - - (defaults to: self.caskroom_path) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
-
# File 'cask/cask.rb', line 124
-
-def timestamped_versions(caskroom_path: self.caskroom_path)
-  relative_paths = Pathname.glob((
-                                   version: "*", timestamp: "*",
-                                   caskroom_path:
-                                 ))
-                           .map { |p| p.relative_path_from(p.parent.parent) }
-  # Sorbet is unaware that Pathname is sortable: https://github.com/sorbet/sorbet/issues/6844
-  T.unsafe(relative_paths).sort_by(&:basename) # sort by timestamp
-   .map { |p| p.split.map(&:to_s) }
-end
-
-
- -
-

- - #to_hObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-
-
# File 'cask/cask.rb', line 344
-
-def to_h
-  {
-    "token"                => token,
-    "full_token"           => full_name,
-    "old_tokens"           => old_tokens,
-    "tap"                  => tap&.name,
-    "name"                 => name,
-    "desc"                 => desc,
-    "homepage"             => homepage,
-    "url"                  => url,
-    "url_specs"            => url_specs,
-    "version"              => version,
-    "installed"            => installed_version,
-    "installed_time"       => install_time&.to_i,
-    "bundle_version"       => bundle_long_version,
-    "bundle_short_version" => bundle_short_version,
-    "outdated"             => outdated?,
-    "sha256"               => sha256,
-    "artifacts"            => artifacts_list,
-    "caveats"              => (caveats unless caveats.empty?),
-    "depends_on"           => depends_on,
-    "conflicts_with"       => conflicts_with,
-    "container"            => container&.pairs,
-    "auto_updates"         => auto_updates,
-    "deprecated"           => deprecated?,
-    "deprecation_date"     => deprecation_date,
-    "deprecation_reason"   => deprecation_reason,
-    "disabled"             => disabled?,
-    "disable_date"         => disable_date,
-    "disable_reason"       => disable_reason,
-    "tap_git_head"         => tap_git_head,
-    "languages"            => languages,
-    "ruby_source_path"     => ruby_source_path,
-    "ruby_source_checksum" => ruby_source_checksum,
-  }
-end
-
-
- -
-

- - #to_hash_with_variations(hash_method: :to_h) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-
-
# File 'cask/cask.rb', line 423
-
-def to_hash_with_variations(hash_method: :to_h)
-  case hash_method
-  when :to_h
-    if loaded_from_api? && !Homebrew::EnvConfig.no_install_from_api?
-      return api_to_local_hash(Homebrew::API::Cask.all_casks[token].dup)
-    end
-  when :to_internal_api_hash
-    raise ArgumentError, "API Hash must be generated from Ruby source files" if loaded_from_api?
-  else
-    raise ArgumentError, "Unknown hash method #{hash_method.inspect}"
-  end
-
-  hash = public_send(hash_method)
-  variations = {}
-
-  if @dsl.on_system_blocks_exist?
-    begin
-      MacOSVersion::SYMBOLS.keys.product(OnSystem::ARCH_OPTIONS).each do |os, arch|
-        bottle_tag = ::Utils::Bottles::Tag.new(system: os, arch:)
-        next unless bottle_tag.valid_combination?
-        next if depends_on.macos && !depends_on.macos.allows?(bottle_tag.to_macos_version)
-
-        Homebrew::SimulateSystem.with(os:, arch:) do
-          refresh
-
-          public_send(hash_method).each do |key, value|
-            next if HASH_KEYS_TO_SKIP.include? key
-            next if value.to_s == hash[key].to_s
-
-            variations[bottle_tag.to_sym] ||= {}
-            variations[bottle_tag.to_sym][key] = value
-          end
-        end
-      end
-    ensure
-      refresh
-    end
-  end
-
-  hash["variations"] = variations if hash_method != :to_internal_api_hash || variations.present?
-  hash
-end
-
-
- -
-

- - #to_internal_api_hashObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-
-
# File 'cask/cask.rb', line 381
-
-def to_internal_api_hash
-  api_hash = {
-    "token"              => token,
-    "name"               => name,
-    "desc"               => desc,
-    "homepage"           => homepage,
-    "url"                => url,
-    "version"            => version,
-    "sha256"             => sha256,
-    "artifacts"          => artifacts_list(compact: true),
-    "ruby_source_path"   => ruby_source_path,
-    "ruby_source_sha256" => ruby_source_checksum.fetch(:sha256),
-  }
-
-  if deprecation_date
-    api_hash["deprecation_date"] = deprecation_date
-    api_hash["deprecation_reason"] = deprecation_reason
-  end
-
-  if disable_date
-    api_hash["disable_date"] = disable_date
-    api_hash["disable_reason"] = disable_reason
-  end
-
-  if (url_specs_hash = url_specs).present?
-    api_hash["url_specs"] = url_specs_hash
-  end
-
-  api_hash["caskfile_only"] = true if caskfile_only?
-  api_hash["conflicts_with"] = conflicts_with if conflicts_with.present?
-  api_hash["depends_on"] = depends_on if depends_on.present?
-  api_hash["container"] = container.pairs if container
-  api_hash["caveats"] = caveats if caveats.present?
-  api_hash["auto_updates"] = auto_updates if auto_updates
-  api_hash["languages"] = languages if languages.present?
-
-  api_hash
-end
-
-
- -
-

- - #urlObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-53
-
-
# File 'cask/cask.rbi', line 53
-
-def url; end
-
-
- -
-

- - #versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-55
-
-
# File 'cask/cask.rbi', line 55
-
-def version; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskAlreadyCreatedError.html b/docs/Cask/CaskAlreadyCreatedError.html deleted file mode 100644 index bedc41e0f..000000000 --- a/docs/Cask/CaskAlreadyCreatedError.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - Exception: Cask::CaskAlreadyCreatedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskAlreadyCreatedError - - - Private -

-
- -
-
Inherits:
-
- AbstractCaskErrorWithToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask already exists.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - - - - - - - -

Method Summary

- -

Methods inherited from AbstractCaskErrorWithToken

-

#initialize

- - - - - - - -
-

Constructor Details

- -

This class inherits a constructor from Cask::AbstractCaskErrorWithToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskCannotBeInstalledError.html b/docs/Cask/CaskCannotBeInstalledError.html deleted file mode 100644 index 8daf23f28..000000000 --- a/docs/Cask/CaskCannotBeInstalledError.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - - Exception: Cask::CaskCannotBeInstalledError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskCannotBeInstalledError - - - Private -

-
- -
-
Inherits:
-
- AbstractCaskErrorWithToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask cannot be installed.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(token, message) ⇒ CaskCannotBeInstalledError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CaskCannotBeInstalledError.

- - -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-56
-
-
# File 'cask/exceptions.rb', line 53
-
-def initialize(token, message)
-  super(token)
-  @message = message
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #messageObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'cask/exceptions.rb', line 51
-
-def message
-  @message
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskConflictError.html b/docs/Cask/CaskConflictError.html deleted file mode 100644 index 7602cbbcc..000000000 --- a/docs/Cask/CaskConflictError.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - - Exception: Cask::CaskConflictError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskConflictError - - - Private -

-
- -
-
Inherits:
-
- AbstractCaskErrorWithToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask conflicts with another cask.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(token, conflicting_cask) ⇒ CaskConflictError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CaskConflictError.

- - -
-
-
- - -
- - - - -
-
-
-
-68
-69
-70
-71
-
-
# File 'cask/exceptions.rb', line 68
-
-def initialize(token, conflicting_cask)
-  super(token)
-  @conflicting_cask = conflicting_cask
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #conflicting_caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'cask/exceptions.rb', line 66
-
-def conflicting_cask
-  @conflicting_cask
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskCyclicDependencyError.html b/docs/Cask/CaskCyclicDependencyError.html deleted file mode 100644 index 5cb47a9fc..000000000 --- a/docs/Cask/CaskCyclicDependencyError.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - Exception: Cask::CaskCyclicDependencyError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskCyclicDependencyError - - - Private -

-
- -
-
Inherits:
-
- AbstractCaskErrorWithToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when there is a cyclic cask dependency.

- - -
-
-
- - -
-

Direct Known Subclasses

-

CaskSelfReferencingDependencyError

-
- - - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - - - - - - - -

Method Summary

- -

Methods inherited from AbstractCaskErrorWithToken

-

#initialize

- - - - - - - -
-

Constructor Details

- -

This class inherits a constructor from Cask::AbstractCaskErrorWithToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskError.html b/docs/Cask/CaskError.html deleted file mode 100644 index e22ae51e6..000000000 --- a/docs/Cask/CaskError.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - Exception: Cask::CaskError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

General cask error.

- - -
-
-
- - -
- - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskInvalidError.html b/docs/Cask/CaskInvalidError.html deleted file mode 100644 index dd816511b..000000000 --- a/docs/Cask/CaskInvalidError.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - Exception: Cask::CaskInvalidError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskInvalidError - - - Private -

-
- -
-
Inherits:
-
- AbstractCaskErrorWithToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask is invalid.

- - -
-
-
- - -
-

Direct Known Subclasses

-

CaskTokenMismatchError

-
- - - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - - - - - - - -

Method Summary

- -

Methods inherited from AbstractCaskErrorWithToken

-

#initialize

- - - - - - - -
-

Constructor Details

- -

This class inherits a constructor from Cask::AbstractCaskErrorWithToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader.html b/docs/Cask/CaskLoader.html deleted file mode 100644 index e1ce744f4..000000000 --- a/docs/Cask/CaskLoader.html +++ /dev/null @@ -1,687 +0,0 @@ - - - - - - - Module: Cask::CaskLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::CaskLoader - - - Private -

-
- - - - -
-
Extended by:
-
Context
-
- - - - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Loads a cask from various sources.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: ILoader - - - - Classes: AbstractContentLoader, FromAPILoader, FromContentLoader, FromInstalledPathLoader, FromInstanceLoader, FromNameLoader, FromPathLoader, FromTapLoader, FromURILoader, NullLoader - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, debug?, quiet?, verbose?, with_context

- - - -
-

Class Method Details

- - -
-

- - .default_path(token) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-575
-576
-577
-
-
# File 'cask/cask_loader.rb', line 575
-
-def self.default_path(token)
-  find_cask_in_tap(token.to_s.downcase, CoreCaskTap.instance)
-end
-
-
- -
-

- - .find_cask_in_tap(token, tap) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-579
-580
-581
-582
-583
-
-
# File 'cask/cask_loader.rb', line 579
-
-def self.find_cask_in_tap(token, tap)
-  filename = "#{token}.rb"
-
-  tap.cask_files_by_name.fetch(token, tap.cask_dir/filename)
-end
-
-
- -
-

- - .for(ref, need_path: false, warn: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-567
-568
-569
-570
-571
-572
-573
-
-
# File 'cask/cask_loader.rb', line 556
-
-def self.for(ref, need_path: false, warn: true)
-  [
-    FromInstanceLoader,
-    FromContentLoader,
-    FromURILoader,
-    FromAPILoader,
-    FromTapLoader,
-    FromNameLoader,
-    FromPathLoader,
-    FromInstalledPathLoader,
-    NullLoader,
-  ].each do |loader_class|
-    if (loader = loader_class.try_new(ref, warn:))
-      $stderr.puts "#{$PROGRAM_NAME} (#{loader.class}): loading #{ref}" if debug?
-      return loader
-    end
-  end
-end
-
-
- -
-

- - .load(ref, config: nil, warn: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-517
-518
-519
-
-
# File 'cask/cask_loader.rb', line 517
-
-def self.load(ref, config: nil, warn: true)
-  self.for(ref, warn:).load(config:)
-end
-
-
- -
-

- - .path(ref) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-513
-514
-515
-
-
# File 'cask/cask_loader.rb', line 513
-
-def self.path(ref)
-  self.for(ref, need_path: true).path
-end
-
-
- -
-

- - .tap_cask_token_type(tapped_token, warn:) ⇒ Array(String, Tap, [Symbol, nil])? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tapped_token - - - (String) - - - -
  • - -
  • - - warn - - - (Boolean) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-
-
# File 'cask/cask_loader.rb', line 522
-
-def self.tap_cask_token_type(tapped_token, warn:)
-  return unless (tap_with_token = Tap.with_cask_token(tapped_token))
-
-  tap, token = tap_with_token
-
-  type = nil
-
-  if (new_token = tap.cask_renames[token].presence)
-    old_token = tap.core_cask_tap? ? token : tapped_token
-    token = new_token
-    new_token = tap.core_cask_tap? ? token : "#{tap}/#{token}"
-    type = :rename
-  elsif (new_tap_name = tap.tap_migrations[token].presence)
-    new_tap, new_token = Tap.with_cask_token(new_tap_name) || [Tap.fetch(new_tap_name), token]
-    new_tap.ensure_installed!
-    new_tapped_token = "#{new_tap}/#{new_token}"
-
-    if tapped_token == new_tapped_token
-      opoo "Tap migration for #{tapped_token} points to itself, stopping recursion."
-    else
-      old_token = tap.core_cask_tap? ? token : tapped_token
-      return unless (token_tap_type = tap_cask_token_type(new_tapped_token, warn: false))
-
-      token, tap, = token_tap_type
-      new_token = new_tap.core_cask_tap? ? token : "#{tap}/#{token}"
-      type = :migration
-    end
-  end
-
-  opoo "Cask #{old_token} was renamed to #{new_token}." if warn && old_token && new_token
-
-  [token, tap, type]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/AbstractContentLoader.html b/docs/Cask/CaskLoader/AbstractContentLoader.html deleted file mode 100644 index 090066532..000000000 --- a/docs/Cask/CaskLoader/AbstractContentLoader.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::AbstractContentLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::AbstractContentLoader - Abstract - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - -
-
Includes:
-
ILoader
-
- - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

It cannot be directly instantiated. Subclasses must implement the abstract methods below.

-
-
-

Loads a cask from a string.

- - -
-
-
- - -
-

Direct Known Subclasses

-

FromContentLoader, FromPathLoader

-
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #content ⇒ String - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #tap ⇒ Tap? - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - - - - - - - - -

Method Summary

- -

Methods included from ILoader

-

#load

- - -
-

Instance Attribute Details

- - - -
-

- - #contentString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'cask/cask_loader.rb', line 30
-
-def content
-  @content
-end
-
-
- - - -
-

- - #tapTap? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Tap, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'cask/cask_loader.rb', line 33
-
-def tap
-  @tap
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/FromAPILoader.html b/docs/Cask/CaskLoader/FromAPILoader.html deleted file mode 100644 index 419788286..000000000 --- a/docs/Cask/CaskLoader/FromAPILoader.html +++ /dev/null @@ -1,1270 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::FromAPILoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::FromAPILoader - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
ILoader
-
- - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a cask from the JSON API.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(token, from_json: T.unsafe(nil), path: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - token - - - (String) - - - -
  • - -
  • - - from_json - - - (Hash) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - path - - - (Pathname, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-284
-285
-286
-287
-288
-289
-
-
# File 'cask/cask_loader.rb', line 284
-
-def initialize(token, from_json: T.unsafe(nil), path: nil)
-  @token = token.sub(%r{^homebrew/(?:homebrew-)?cask/}i, "")
-  @sourcefile_path = path
-  @path = path || CaskLoader.default_path(@token)
-  @from_json = from_json
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #from_jsonHash? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-262
-263
-264
-
-
# File 'cask/cask_loader.rb', line 262
-
-def from_json
-  @from_json
-end
-
-
- - - -
-

- - #pathPathname (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-259
-260
-261
-
-
# File 'cask/cask_loader.rb', line 259
-
-def path
-  @path
-end
-
-
- - - -
-

- - #tokenString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-256
-257
-258
-
-
# File 'cask/cask_loader.rb', line 256
-
-def token
-  @token
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, Cask, URI::Generic) - - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-
-
# File 'cask/cask_loader.rb', line 268
-
-def self.try_new(ref, warn: false)
-  return if Homebrew::EnvConfig.no_install_from_api?
-  return unless ref.is_a?(String)
-  return unless (token = ref[HOMEBREW_DEFAULT_TAP_CASK_REGEX, :token])
-  if !Homebrew::API::Cask.all_casks.key?(token) &&
-     !Homebrew::API::Cask.all_renames.key?(token)
-    return
-  end
-
-  ref = "#{CoreCaskTap.instance}/#{token}"
-
-  token, tap, = CaskLoader.tap_cask_token_type(ref, warn:)
-  new("#{tap}/#{token}")
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #from_h_array_gsubs(array, appdir) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-412
-413
-414
-415
-416
-
-
# File 'cask/cask_loader.rb', line 412
-
-def from_h_array_gsubs(array, appdir)
-  array.to_a.map do |value|
-    from_h_gsubs(value, appdir)
-  end
-end
-
-
- -
-

- - #from_h_gsubs(value, appdir) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-
-
# File 'cask/cask_loader.rb', line 424
-
-def from_h_gsubs(value, appdir)
-  return value if value.blank?
-
-  case value
-  when Hash
-    from_h_hash_gsubs(value, appdir)
-  when Array
-    from_h_array_gsubs(value, appdir)
-  when String
-    from_h_string_gsubs(value, appdir)
-  else
-    value
-  end
-end
-
-
- -
-

- - #from_h_hash_gsubs(hash, appdir) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-418
-419
-420
-421
-422
-
-
# File 'cask/cask_loader.rb', line 418
-
-def from_h_hash_gsubs(hash, appdir)
-  hash.to_h.transform_values do |value|
-    from_h_gsubs(value, appdir)
-  end
-end
-
-
- -
-

- - #from_h_string_gsubs(string, appdir) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-404
-405
-406
-407
-408
-409
-410
-
-
# File 'cask/cask_loader.rb', line 404
-
-def from_h_string_gsubs(string, appdir)
-  string.to_s
-        .gsub(HOMEBREW_HOME_PLACEHOLDER, Dir.home)
-        .gsub(HOMEBREW_PREFIX_PLACEHOLDER, HOMEBREW_PREFIX)
-        .gsub(HOMEBREW_CELLAR_PLACEHOLDER, HOMEBREW_CELLAR)
-        .gsub(HOMEBREW_CASK_APPDIR_PLACEHOLDER, appdir)
-end
-
-
- -
-

- - #load(config:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-
-
# File 'cask/cask_loader.rb', line 291
-
-def load(config:)
-  json_cask = from_json || Homebrew::API::Cask.all_casks.fetch(token)
-
-  cask_options = {
-    loaded_from_api: true,
-    sourcefile_path: @sourcefile_path,
-    source:          JSON.pretty_generate(json_cask),
-    config:,
-    loader:          self,
-  }
-
-  json_cask = Homebrew::API.merge_variations(json_cask).deep_symbolize_keys.freeze
-
-  cask_options[:tap] = Tap.fetch(json_cask[:tap]) if json_cask[:tap].to_s.include?("/")
-
-  user_agent = json_cask.dig(:url_specs, :user_agent)
-  json_cask[:url_specs][:user_agent] = user_agent[1..].to_sym if user_agent && user_agent[0] == ":"
-  if (using = json_cask.dig(:url_specs, :using))
-    json_cask[:url_specs][:using] = using.to_sym
-  end
-
-  api_cask = Cask.new(token, **cask_options) do
-    version json_cask[:version]
-
-    if json_cask[:sha256] == "no_check"
-      sha256 :no_check
-    else
-      sha256 json_cask[:sha256]
-    end
-
-    url json_cask[:url], **json_cask.fetch(:url_specs, {}) if json_cask[:url].present?
-    json_cask[:name]&.each do |cask_name|
-      name cask_name
-    end
-    desc json_cask[:desc]
-    homepage json_cask[:homepage]
-
-    if (deprecation_date = json_cask[:deprecation_date].presence)
-      reason = DeprecateDisable.to_reason_string_or_symbol json_cask[:deprecation_reason], type: :cask
-      deprecate! date: deprecation_date, because: reason
-    end
-
-    if (disable_date = json_cask[:disable_date].presence)
-      reason = DeprecateDisable.to_reason_string_or_symbol json_cask[:disable_reason], type: :cask
-      disable! date: disable_date, because: reason
-    end
-
-    auto_updates json_cask[:auto_updates] unless json_cask[:auto_updates].nil?
-    conflicts_with(**json_cask[:conflicts_with]) if json_cask[:conflicts_with].present?
-
-    if json_cask[:depends_on].present?
-      dep_hash = json_cask[:depends_on].to_h do |dep_key, dep_value|
-        # Arch dependencies are encoded like `{ type: :intel, bits: 64 }`
-        # but `depends_on arch:` only accepts `:intel` or `:arm64`
-        if dep_key == :arch
-          next [:arch, :intel] if dep_value.first[:type] == "intel"
-
-          next [:arch, :arm64]
-        end
-
-        next [dep_key, dep_value] if dep_key != :macos
-
-        dep_type = dep_value.keys.first
-        if dep_type == :==
-          version_symbols = dep_value[dep_type].map do |version|
-            MacOSVersion::SYMBOLS.key(version) || version
-          end
-          next [dep_key, version_symbols]
-        end
-
-        version_symbol = dep_value[dep_type].first
-        version_symbol = MacOSVersion::SYMBOLS.key(version_symbol) || version_symbol
-        [dep_key, "#{dep_type} :#{version_symbol}"]
-      end.compact
-      depends_on(**dep_hash)
-    end
-
-    if json_cask[:container].present?
-      container_hash = json_cask[:container].to_h do |container_key, container_value|
-        next [container_key, container_value] if container_key != :type
-
-        [container_key, container_value.to_sym]
-      end
-      container(**container_hash)
-    end
-
-    json_cask[:artifacts].each do |artifact|
-      # convert generic string replacements into actual ones
-      artifact = cask.loader.from_h_gsubs(artifact, appdir)
-      key = artifact.keys.first
-      if artifact[key].nil?
-        # for artifacts with blocks that can't be loaded from the API
-        send(key) {} # empty on purpose
-      else
-        args = artifact[key]
-        kwargs = if args.last.is_a?(Hash)
-          args.pop
-        else
-          {}
-        end
-        send(key, *args, **kwargs)
-      end
-    end
-
-    if json_cask[:caveats].present?
-      # convert generic string replacements into actual ones
-      caveats cask.loader.from_h_string_gsubs(json_cask[:caveats], appdir)
-    end
-  end
-  api_cask.populate_from_api!(json_cask)
-  api_cask
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/FromContentLoader.html b/docs/Cask/CaskLoader/FromContentLoader.html deleted file mode 100644 index 814487f3c..000000000 --- a/docs/Cask/CaskLoader/FromContentLoader.html +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::FromContentLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::FromContentLoader - - - Private -

-
- -
-
Inherits:
-
- AbstractContentLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a cask from a string.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractContentLoader

-

#content, #tap

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(content, tap: T.unsafe(nil)) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - -
  • - -
  • - - tap - - - (Tap) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- - -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-
-
# File 'cask/cask_loader.rb', line 70
-
-def initialize(content, tap: T.unsafe(nil))
-  super()
-
-  @content = content.dup.force_encoding("UTF-8")
-  @tap = tap
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, warn: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-
-
# File 'cask/cask_loader.rb', line 51
-
-def self.try_new(ref, warn: false)
-  return false unless ref.respond_to?(:to_str)
-
-  content = T.unsafe(ref).to_str
-
-  # Cache compiled regex
-  @regex ||= begin
-    token  = /(?:"[^"]*"|'[^']*')/
-    curly  = /\(\s*#{token.source}\s*\)\s*\{.*\}/
-    do_end = /\s+#{token.source}\s+do(?:\s*;\s*|\s+).*end/
-    /\A\s*cask(?:#{curly.source}|#{do_end.source})\s*\Z/m
-  end
-
-  return unless content.match?(@regex)
-
-  new(content)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #load(config:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-
-
# File 'cask/cask_loader.rb', line 77
-
-def load(config:)
-  @config = config
-
-  instance_eval(content, __FILE__, __LINE__)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/FromInstalledPathLoader.html b/docs/Cask/CaskLoader/FromInstalledPathLoader.html deleted file mode 100644 index b92d902bb..000000000 --- a/docs/Cask/CaskLoader/FromInstalledPathLoader.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::FromInstalledPathLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::FromInstalledPathLoader - - - Private -

-
- -
-
Inherits:
-
- FromPathLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loader which loads a cask from the installed cask file.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FromPathLoader

-

#path, #token

- - - -

Attributes inherited from AbstractContentLoader

-

#content, #tap

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FromPathLoader

-

#initialize, #load

- - - - - - - - - - - - - - - - -

Methods included from ILoader

-

#load

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::CaskLoader::FromPathLoader

- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, Cask, URI::Generic) - - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-479
-480
-481
-482
-483
-484
-485
-486
-
-
# File 'cask/cask_loader.rb', line 479
-
-def self.try_new(ref, warn: false)
-  return unless ref.is_a?(String)
-
-  possible_installed_cask = Cask.new(ref)
-  return unless (installed_caskfile = possible_installed_cask.installed_caskfile)
-
-  new(installed_caskfile)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/FromInstanceLoader.html b/docs/Cask/CaskLoader/FromInstanceLoader.html deleted file mode 100644 index f8c64221f..000000000 --- a/docs/Cask/CaskLoader/FromInstanceLoader.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::FromInstanceLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::FromInstanceLoader - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
ILoader
-
- - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a cask from an existing Cask::Cask instance.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(cask) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cask - - - (Cask) - - - -
  • - -
- - -
- - - - -
-
-
-
-242
-243
-244
-
-
# File 'cask/cask_loader.rb', line 242
-
-def initialize(cask)
-  @cask = cask
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, Cask, URI::Generic) - - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-237
-238
-239
-
-
# File 'cask/cask_loader.rb', line 237
-
-def self.try_new(ref, warn: false)
-  new(ref) if ref.is_a?(Cask)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #load(config:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-246
-247
-248
-
-
# File 'cask/cask_loader.rb', line 246
-
-def load(config:)
-  @cask
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/FromNameLoader.html b/docs/Cask/CaskLoader/FromNameLoader.html deleted file mode 100644 index 5ed51aad5..000000000 --- a/docs/Cask/CaskLoader/FromNameLoader.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::FromNameLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::FromNameLoader - - - Private -

-
- -
-
Inherits:
-
- FromTapLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loader which tries loading casks from tap paths, failing -if the same token exists in multiple taps.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FromTapLoader

-

#tap

- - - -

Attributes inherited from FromPathLoader

-

#path, #token

- - - -

Attributes inherited from AbstractContentLoader

-

#content, #tap

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FromTapLoader

-

#initialize, #load

- - - - - - - - - -

Methods inherited from FromPathLoader

-

#initialize, #load

- - - - - - - - - - - - - - - - -

Methods included from ILoader

-

#load

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::CaskLoader::FromTapLoader

- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, Cask, URI::Generic) - - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-
-
# File 'cask/cask_loader.rb', line 447
-
-def self.try_new(ref, warn: false)
-  return unless ref.is_a?(String)
-  return unless ref.match?(/\A#{HOMEBREW_TAP_CASK_TOKEN_REGEX}\Z/o)
-
-  token = ref
-
-  # If it exists in the default tap, never treat it as ambiguous with another tap.
-  if (core_cask_tap = CoreCaskTap.instance).installed? &&
-     (loader= super("#{core_cask_tap}/#{token}", warn:))&.path&.exist?
-    return loader
-  end
-
-  loaders = Tap.select { |tap| tap.installed? && !tap.core_cask_tap? }
-               .filter_map { |tap| super("#{tap}/#{token}", warn:) }
-               .uniq(&:path)
-               .select { |tap| tap.path.exist? }
-
-  case loaders.count
-  when 1
-    loaders.first
-  when 2..Float::INFINITY
-    raise TapCaskAmbiguityError.new(token, loaders)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/FromPathLoader.html b/docs/Cask/CaskLoader/FromPathLoader.html deleted file mode 100644 index 9fbc1c668..000000000 --- a/docs/Cask/CaskLoader/FromPathLoader.html +++ /dev/null @@ -1,730 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::FromPathLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::FromPathLoader - - - Private -

-
- -
-
Inherits:
-
- AbstractContentLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a cask from a path.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #path ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #token ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from AbstractContentLoader

-

#content, #tap

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(path, token: T.unsafe(nil)) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Pathname, String) - - - -
  • - -
  • - - token - - - (String) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- - -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
-
# File 'cask/cask_loader.rb', line 109
-
-def initialize(path, token: T.unsafe(nil))
-  super()
-
-  path = Pathname(path).expand_path
-
-  @token = path.basename(path.extname).to_s
-  @path = path
-  @tap = Tap.from_path(path) || Homebrew::API.tap_from_source_download(path)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'cask/cask_loader.rb', line 106
-
-def path
-  @path
-end
-
-
- - - -
-

- - #tokenObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'cask/cask_loader.rb', line 106
-
-def token
-  @token
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, Cask, URI::Generic) - - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'cask/cask_loader.rb', line 90
-
-def self.try_new(ref, warn: false)
-  path = case ref
-  when String
-    Pathname(ref)
-  when Pathname
-    ref
-  else
-    return
-  end
-
-  return if %w[.rb .json].exclude?(path.extname)
-  return unless path.expand_path.exist?
-
-  new(path)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #load(config:) ⇒ Cask - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - config - - - (Config, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Cask) - - - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-
-
# File 'cask/cask_loader.rb', line 120
-
-def load(config:)
-  raise CaskUnavailableError.new(token, "'#{path}' does not exist.")  unless path.exist?
-  raise CaskUnavailableError.new(token, "'#{path}' is not readable.") unless path.readable?
-  raise CaskUnavailableError.new(token, "'#{path}' is not a file.")   unless path.file?
-
-  @content = path.read(encoding: "UTF-8")
-  @config = config
-
-  if path.extname == ".json"
-    return FromAPILoader.new(token, from_json: JSON.parse(@content), path:).load(config:)
-  end
-
-  begin
-    instance_eval(content, path).tap do |cask|
-      raise CaskUnreadableError.new(token, "'#{path}' does not contain a cask.") unless cask.is_a?(Cask)
-    end
-  rescue NameError, ArgumentError, ScriptError => e
-    error = CaskUnreadableError.new(token, e.message)
-    error.set_backtrace e.backtrace
-    raise error
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/FromTapLoader.html b/docs/Cask/CaskLoader/FromTapLoader.html deleted file mode 100644 index 51d3b8719..000000000 --- a/docs/Cask/CaskLoader/FromTapLoader.html +++ /dev/null @@ -1,615 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::FromTapLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::FromTapLoader - - - Private -

-
- -
-
Inherits:
-
- FromPathLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a cask from a specific tap.

- - -
-
-
- - -
-

Direct Known Subclasses

-

FromNameLoader

-
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #tap ⇒ Tap - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from FromPathLoader

-

#path, #token

- - - -

Attributes inherited from AbstractContentLoader

-

#content

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(tapped_token) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tapped_token - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-215
-216
-217
-218
-219
-
-
# File 'cask/cask_loader.rb', line 215
-
-def initialize(tapped_token)
-  tap, token = Tap.with_cask_token(tapped_token)
-  cask = CaskLoader.find_cask_in_tap(token, tap)
-  super cask
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #tapTap (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Tap) - - - -
  • - -
- -
- - - - -
-
-
-
-199
-200
-201
-
-
# File 'cask/cask_loader.rb', line 199
-
-def tap
-  @tap
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, Cask, URI::Generic) - - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-205
-206
-207
-208
-209
-210
-211
-212
-
-
# File 'cask/cask_loader.rb', line 205
-
-def self.try_new(ref, warn: false)
-  ref = ref.to_s
-
-  return unless (token_tap_type = CaskLoader.tap_cask_token_type(ref, warn:))
-
-  token, tap, = token_tap_type
-  new("#{tap}/#{token}")
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #load(config:) ⇒ Cask - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - config - - - (Config, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Cask) - - - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-222
-223
-224
-225
-226
-
-
# File 'cask/cask_loader.rb', line 222
-
-def load(config:)
-  raise TapCaskUnavailableError.new(tap, token) unless T.must(tap).installed?
-
-  super
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/FromURILoader.html b/docs/Cask/CaskLoader/FromURILoader.html deleted file mode 100644 index dd8c1130e..000000000 --- a/docs/Cask/CaskLoader/FromURILoader.html +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::FromURILoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::FromURILoader - - - Private -

-
- -
-
Inherits:
-
- FromPathLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a cask from a URI.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #url ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from FromPathLoader

-

#path, #token

- - - -

Attributes inherited from AbstractContentLoader

-

#content, #tap

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(url) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (URI::Generic, String) - - - -
  • - -
- - -
- - - - -
-
-
-
-177
-178
-179
-180
-
-
# File 'cask/cask_loader.rb', line 177
-
-def initialize(url)
-  @url = URI(url)
-  super Cache.path/File.basename(T.must(@url.path))
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #urlObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-174
-175
-176
-
-
# File 'cask/cask_loader.rb', line 174
-
-def url
-  @url
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, Cask, URI::Generic) - - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-
-
# File 'cask/cask_loader.rb', line 158
-
-def self.try_new(ref, warn: false)
-  # Cache compiled regex
-  @uri_regex ||= begin
-    uri_regex = ::URI::DEFAULT_PARSER.make_regexp
-    Regexp.new("\\A#{uri_regex.source}\\Z", uri_regex.options)
-  end
-
-  uri = ref.to_s
-  return unless uri.match?(@uri_regex)
-
-  uri = URI(uri)
-  return unless uri.path
-
-  new(uri)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #load(config:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-
-
# File 'cask/cask_loader.rb', line 182
-
-def load(config:)
-  path.dirname.mkpath
-
-  begin
-    ohai "Downloading #{url}"
-    ::Utils::Curl.curl_download url, to: path
-  rescue ErrorDuringExecution
-    raise CaskUnavailableError.new(token, "Failed to download #{Formatter.url(url)}.")
-  end
-
-  super
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/ILoader.html b/docs/Cask/CaskLoader/ILoader.html deleted file mode 100644 index b20861189..000000000 --- a/docs/Cask/CaskLoader/ILoader.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - Module: Cask::CaskLoader::ILoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::CaskLoader::ILoader - Abstract - - Private -

-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - - - - -
-
Included in:
-
AbstractContentLoader, FromAPILoader, FromInstanceLoader
-
- - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-
- This module is abstract. -

Subclasses must implement the abstract methods below.

-
-
- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Instance Method Details

- - -
-

- - #load(config:) ⇒ Cask - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
- - -
-
-
-

Parameters:

-
    - -
  • - - config - - - (Config, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Cask) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-
-
# File 'cask/cask_loader.rb', line 20
-
-def load(config:); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskLoader/NullLoader.html b/docs/Cask/CaskLoader/NullLoader.html deleted file mode 100644 index 5b09c5f74..000000000 --- a/docs/Cask/CaskLoader/NullLoader.html +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - Class: Cask::CaskLoader::NullLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::CaskLoader::NullLoader - - - Private -

-
- -
-
Inherits:
-
- FromPathLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/cask_loader.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Pseudo-loader which raises an error when trying to load the corresponding cask.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FromPathLoader

-

#path, #token

- - - -

Attributes inherited from AbstractContentLoader

-

#content, #tap

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(ref) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-503
-504
-505
-506
-
-
# File 'cask/cask_loader.rb', line 503
-
-def initialize(ref)
-  token = File.basename(ref, ".rb")
-  super CaskLoader.default_path(token)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, Cask, URI::Generic) - - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-495
-496
-497
-498
-499
-500
-
-
# File 'cask/cask_loader.rb', line 495
-
-def self.try_new(ref, warn: false)
-  return if ref.is_a?(Cask)
-  return if ref.is_a?(URI::Generic)
-
-  new(ref)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #load(config:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-508
-509
-510
-
-
# File 'cask/cask_loader.rb', line 508
-
-def load(config:)
-  raise CaskUnavailableError.new(token, "No Cask with this name exists.")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskNotInstalledError.html b/docs/Cask/CaskNotInstalledError.html deleted file mode 100644 index 9e996bdfe..000000000 --- a/docs/Cask/CaskNotInstalledError.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - Exception: Cask::CaskNotInstalledError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskNotInstalledError - - - Private -

-
- -
-
Inherits:
-
- AbstractCaskErrorWithToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask is not installed.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - - - - - - - -

Method Summary

- -

Methods inherited from AbstractCaskErrorWithToken

-

#initialize

- - - - - - - -
-

Constructor Details

- -

This class inherits a constructor from Cask::AbstractCaskErrorWithToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskQuarantineError.html b/docs/Cask/CaskQuarantineError.html deleted file mode 100644 index 6c80ccd87..000000000 --- a/docs/Cask/CaskQuarantineError.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - - Exception: Cask::CaskQuarantineError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskQuarantineError - - - Private -

-
- -
-
Inherits:
-
- CaskError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error during quarantining of a file.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(path, reason) ⇒ CaskQuarantineError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CaskQuarantineError.

- - -
-
-
- - -
- - - - -
-
-
-
-187
-188
-189
-190
-191
-192
-
-
# File 'cask/exceptions.rb', line 187
-
-def initialize(path, reason)
-  super()
-
-  @path = path
-  @reason = reason
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-185
-186
-187
-
-
# File 'cask/exceptions.rb', line 185
-
-def path
-  @path
-end
-
-
- - - -
-

- - #reasonObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-185
-186
-187
-
-
# File 'cask/exceptions.rb', line 185
-
-def reason
-  @reason
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskQuarantinePropagationError.html b/docs/Cask/CaskQuarantinePropagationError.html deleted file mode 100644 index e749f98fd..000000000 --- a/docs/Cask/CaskQuarantinePropagationError.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - Exception: Cask::CaskQuarantinePropagationError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskQuarantinePropagationError - - - Private -

-
- -
-
Inherits:
-
- CaskQuarantineError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error while propagating quarantine information to subdirectories.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CaskQuarantineError

-

#path, #reason

- - - - - - - - - -

Method Summary

- -

Methods inherited from CaskQuarantineError

-

#initialize

- - - - - - - -
-

Constructor Details

- -

This class inherits a constructor from Cask::CaskQuarantineError

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskQuarantineReleaseError.html b/docs/Cask/CaskQuarantineReleaseError.html deleted file mode 100644 index 9c21c68a7..000000000 --- a/docs/Cask/CaskQuarantineReleaseError.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - Exception: Cask::CaskQuarantineReleaseError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskQuarantineReleaseError - - - Private -

-
- -
-
Inherits:
-
- CaskQuarantineError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error while removing quarantine information.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CaskQuarantineError

-

#path, #reason

- - - - - - - - - -

Method Summary

- -

Methods inherited from CaskQuarantineError

-

#initialize

- - - - - - - -
-

Constructor Details

- -

This class inherits a constructor from Cask::CaskQuarantineError

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskSelfReferencingDependencyError.html b/docs/Cask/CaskSelfReferencingDependencyError.html deleted file mode 100644 index 3e5a0bedc..000000000 --- a/docs/Cask/CaskSelfReferencingDependencyError.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - Exception: Cask::CaskSelfReferencingDependencyError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskSelfReferencingDependencyError - - - Private -

-
- -
-
Inherits:
-
- CaskCyclicDependencyError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask depends on itself.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - - - - - - - - - - - - - -

Method Summary

- -

Methods inherited from AbstractCaskErrorWithToken

-

#initialize

- - - - - - - -
-

Constructor Details

- -

This class inherits a constructor from Cask::AbstractCaskErrorWithToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskTokenMismatchError.html b/docs/Cask/CaskTokenMismatchError.html deleted file mode 100644 index 8e7d1222b..000000000 --- a/docs/Cask/CaskTokenMismatchError.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - Exception: Cask::CaskTokenMismatchError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskTokenMismatchError - - - Private -

-
- -
-
Inherits:
-
- CaskInvalidError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask token does not match the file name.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(token, header_token) ⇒ CaskTokenMismatchError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CaskTokenMismatchError.

- - -
-
-
- - -
- - - - -
-
-
-
-178
-179
-180
-
-
# File 'cask/exceptions.rb', line 178
-
-def initialize(token, header_token)
-  super(token, "Token '#{header_token}' in header line does not match the file name.")
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskUnavailableError.html b/docs/Cask/CaskUnavailableError.html deleted file mode 100644 index c7928ebd5..000000000 --- a/docs/Cask/CaskUnavailableError.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - Exception: Cask::CaskUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskUnavailableError - - - Private -

-
- -
-
Inherits:
-
- AbstractCaskErrorWithToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask is not available.

- - -
-
-
- - -
-

Direct Known Subclasses

-

CaskUnreadableError, TapCaskUnavailableError

-
- - - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - - - - - - - -

Method Summary

- -

Methods inherited from AbstractCaskErrorWithToken

-

#initialize

- - - - - - - -
-

Constructor Details

- -

This class inherits a constructor from Cask::AbstractCaskErrorWithToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskUnreadableError.html b/docs/Cask/CaskUnreadableError.html deleted file mode 100644 index 07749a14d..000000000 --- a/docs/Cask/CaskUnreadableError.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - Exception: Cask::CaskUnreadableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskUnreadableError - - - Private -

-
- -
-
Inherits:
-
- CaskUnavailableError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask is unreadable.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - - - - - - - - - - - - - -

Method Summary

- -

Methods inherited from AbstractCaskErrorWithToken

-

#initialize

- - - - - - - -
-

Constructor Details

- -

This class inherits a constructor from Cask::AbstractCaskErrorWithToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/CaskUnspecifiedError.html b/docs/Cask/CaskUnspecifiedError.html deleted file mode 100644 index e951fe47f..000000000 --- a/docs/Cask/CaskUnspecifiedError.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - Exception: Cask::CaskUnspecifiedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::CaskUnspecifiedError - - - Private -

-
- -
-
Inherits:
-
- CaskError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when no cask is specified.

- - -
-
-
- - -
- - - - - - - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Caskroom.html b/docs/Cask/Caskroom.html deleted file mode 100644 index e3c171fa6..000000000 --- a/docs/Cask/Caskroom.html +++ /dev/null @@ -1,571 +0,0 @@ - - - - - - - Module: Cask::Caskroom - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Caskroom - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
cask/caskroom.rb
-
- -
- -

Overview

-
-

- This module is part of an internal API. - This module may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for interacting with the Caskroom directory.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .any_casks_installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'cask/caskroom.rb', line 32
-
-def self.any_casks_installed?
-  paths.any?
-end
-
-
- -
-

- - .casks(config: nil) ⇒ Array<Cask> - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get all installed casks.

- - -
-
-
-

Parameters:

-
    - -
  • - - config - - - (Config, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'cask/caskroom.rb', line 57
-
-def self.casks(config: nil)
-  tokens.sort.filter_map do |token|
-    CaskLoader.load(token, config:, warn: false)
-  rescue TapCaskAmbiguityError => e
-    T.must(e.loaders.first).load(config:)
-  rescue
-    # Don't blow up because of a single unavailable cask.
-    nil
-  end
-end
-
-
- -
-

- - .ensure_caskroom_existsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'cask/caskroom.rb', line 37
-
-def self.ensure_caskroom_exists
-  return if path.exist?
-
-  sudo = !path.parent.writable?
-
-  if sudo && !ENV.key?("SUDO_ASKPASS") && $stdout.tty?
-    ohai "Creating Caskroom directory: #{path}",
-         "We'll set permissions properly so we won't need sudo in the future."
-  end
-
-  SystemCommand.run("/bin/mkdir", args: ["-p", path], sudo:)
-  SystemCommand.run("/bin/chmod", args: ["g+rwx", path], sudo:)
-  SystemCommand.run("/usr/sbin/chown", args: [User.current, path], sudo:)
-  SystemCommand.run("/usr/bin/chgrp", args: ["admin", path], sudo:)
-end
-
-
- -
-

- - .pathPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'cask/caskroom.rb', line 12
-
-def self.path
-  @path ||= HOMEBREW_PREFIX/"Caskroom"
-end
-
-
- -
-

- - .tokensArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return all tokens for installed casks.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'cask/caskroom.rb', line 27
-
-def self.tokens
-  paths.map { |path| path.basename.to_s }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Config.html b/docs/Cask/Config.html deleted file mode 100644 index 91b7c0548..000000000 --- a/docs/Cask/Config.html +++ /dev/null @@ -1,1685 +0,0 @@ - - - - - - - Class: Cask::Config - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Config - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/config.rb
-
- -
- -

Overview

-
-

- This class is part of an internal API. - This class may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Configuration for installing casks.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
DEFAULT_DIRS = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  appdir:               "/Applications",
-  keyboard_layoutdir:   "/Library/Keyboard Layouts",
-  colorpickerdir:       "~/Library/ColorPickers",
-  prefpanedir:          "~/Library/PreferencePanes",
-  qlplugindir:          "~/Library/QuickLook",
-  mdimporterdir:        "~/Library/Spotlight",
-  dictionarydir:        "~/Library/Dictionaries",
-  fontdir:              "~/Library/Fonts",
-  servicedir:           "~/Library/Services",
-  input_methoddir:      "~/Library/Input Methods",
-  internet_plugindir:   "~/Library/Internet Plug-Ins",
-  audio_unit_plugindir: "~/Library/Audio/Plug-Ins/Components",
-  vst_plugindir:        "~/Library/Audio/Plug-Ins/VST",
-  vst3_plugindir:       "~/Library/Audio/Plug-Ins/VST3",
-  screen_saverdir:      "~/Library/Screen Savers",
-}.freeze
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(default: nil, env: nil, explicit: {}, ignore_invalid_keys: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'cask/config.rb', line 106
-
-def initialize(default: nil, env: nil, explicit: {}, ignore_invalid_keys: false)
-  @default = self.class.canonicalize(self.class.defaults.merge(default)) if default
-  @env = self.class.canonicalize(env) if env
-  @explicit = self.class.canonicalize(explicit)
-
-  if ignore_invalid_keys
-    @env&.delete_if { |key, _| self.class.defaults.keys.exclude?(key) }
-    @explicit.delete_if { |key, _| self.class.defaults.keys.exclude?(key) }
-    return
-  end
-
-  @env&.assert_valid_keys(*self.class.defaults.keys)
-  @explicit.assert_valid_keys(*self.class.defaults.keys)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #explicitHash{Symbol => String, Pathname, Array<String>} - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get the explicit configuration.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-96
-97
-98
-
-
# File 'cask/config.rb', line 96
-
-def explicit
-  @explicit
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .canonicalize(config) ⇒ Hash{Symbol => String, Pathname, Array<String>} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-
-
# File 'cask/config.rb', line 78
-
-def self.canonicalize(config)
-  config.to_h do |k, v|
-    key = k.to_sym
-
-    if DEFAULT_DIRS.key?(key)
-      raise TypeError, "Invalid path for default dir #{k}: #{v.inspect}" if v.is_a?(Array)
-
-      [key, Pathname(v).expand_path]
-    else
-      [key, v]
-    end
-  end
-end
-
-
- -
-

- - .defaultsObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-
-
# File 'cask/config.rb', line 33
-
-def self.defaults
-  {
-    languages: LazyObject.new { MacOS.languages },
-  }.merge(DEFAULT_DIRS).freeze
-end
-
-
- -
-

- - .from_args(args) ⇒ T.attached_class - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (T.attached_class) - - - -
  • - -
- -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'cask/config.rb', line 40
-
-def self.from_args(args)
-  args = T.unsafe(args)
-  new(explicit: {
-    appdir:               args.appdir,
-    keyboard_layoutdir:   args.keyboard_layoutdir,
-    colorpickerdir:       args.colorpickerdir,
-    prefpanedir:          args.prefpanedir,
-    qlplugindir:          args.qlplugindir,
-    mdimporterdir:        args.mdimporterdir,
-    dictionarydir:        args.dictionarydir,
-    fontdir:              args.fontdir,
-    servicedir:           args.servicedir,
-    input_methoddir:      args.input_methoddir,
-    internet_plugindir:   args.internet_plugindir,
-    audio_unit_plugindir: args.audio_unit_plugindir,
-    vst_plugindir:        args.vst_plugindir,
-    vst3_plugindir:       args.vst3_plugindir,
-    screen_saverdir:      args.screen_saverdir,
-    languages:            args.language,
-  }.compact)
-end
-
-
- -
-

- - .from_json(json, ignore_invalid_keys: false) ⇒ T.attached_class - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - json - - - (String) - - - -
  • - -
  • - - ignore_invalid_keys - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'cask/config.rb', line 63
-
-def self.from_json(json, ignore_invalid_keys: false)
-  config = JSON.parse(json)
-
-  new(
-    default:             config.fetch("default",  {}),
-    env:                 config.fetch("env",      {}),
-    explicit:            config.fetch("explicit", {}),
-    ignore_invalid_keys:,
-  )
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #binarydirPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-146
-147
-148
-
-
# File 'cask/config.rb', line 146
-
-def binarydir
-  @binarydir ||= HOMEBREW_PREFIX/"bin"
-end
-
-
- -
-

- - #defaultHash{Symbol => String, Pathname, Array<String>} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-122
-123
-124
-
-
# File 'cask/config.rb', line 122
-
-def default
-  @default ||= self.class.canonicalize(self.class.defaults)
-end
-
-
- -
-

- - #envHash{Symbol => String, Pathname, Array<String>} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-
-
# File 'cask/config.rb', line 127
-
-def env
-  @env ||= self.class.canonicalize(
-    Homebrew::EnvConfig.cask_opts
-      .select { |arg| arg.include?("=") }
-      .map { |arg| T.cast(arg.split("=", 2), [String, String]) }
-      .map do |(flag, value)|
-        key = flag.sub(/^--/, "")
-        # converts --language flag to :languages config key
-        if key == "language"
-          key = "languages"
-          value = value.split(",")
-        end
-
-        [key, value]
-      end,
-  )
-end
-
-
- -
-

- - #explicit_sString - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- TODO: -

This is only used by homebrew/bundle, so move it there.

-
-
- -

Get explicit configuration as a string.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-
-
# File 'cask/config.rb', line 197
-
-def explicit_s
-  explicit.map do |key, value|
-    # inverse of #env - converts :languages config key back to --language flag
-    if key == :languages
-      key = "language"
-      value = T.cast(explicit.fetch(:languages, []), T::Array[String]).join(",")
-    end
-    "#{key}: \"#{value.to_s.sub(/^#{Dir.home}/, "~")}\""
-  end.join(", ")
-end
-
-
- -
-

- - #languagesArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-
-
# File 'cask/config.rb', line 156
-
-def languages
-  [
-    *explicit.fetch(:languages, []),
-    *env.fetch(:languages, []),
-    *default.fetch(:languages, []),
-  ].uniq.select do |lang|
-    # Ensure all languages are valid.
-    Locale.parse(lang)
-    true
-  rescue Locale::ParserError
-    false
-  end
-end
-
-
- -
-

- - #languages=(languages) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-170
-171
-172
-
-
# File 'cask/config.rb', line 170
-
-def languages=(languages)
-  explicit[:languages] = languages
-end
-
-
- -
-

- - #manpagedirPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-151
-152
-153
-
-
# File 'cask/config.rb', line 151
-
-def manpagedir
-  @manpagedir ||= HOMEBREW_PREFIX/"share/man"
-end
-
-
- -
-

- - #merge(other) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - other - - - (Config) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-187
-188
-189
-
-
# File 'cask/config.rb', line 187
-
-def merge(other)
-  self.class.new(explicit: other.explicit.merge(explicit))
-end
-
-
- -
-

- - #to_json(*options) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-209
-210
-211
-212
-213
-214
-215
-
-
# File 'cask/config.rb', line 209
-
-def to_json(*options)
-  {
-    default:,
-    env:,
-    explicit:,
-  }.to_json(*options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL.html b/docs/Cask/DSL.html deleted file mode 100644 index e36e5717c..000000000 --- a/docs/Cask/DSL.html +++ /dev/null @@ -1,3222 +0,0 @@ - - - - - - - Class: Cask::DSL - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Attrable
-
- - - -
-
Includes:
-
OnSystem::MacOSOnly
-
- - - - - - -
-
Defined in:
-
cask/dsl.rb,
- cask/dsl/base.rb,
cask/dsl/caveats.rb,
cask/dsl/version.rb,
cask/dsl/container.rb,
cask/dsl/preflight.rb,
cask/dsl/depends_on.rb,
cask/dsl/postflight.rb,
cask/dsl/conflicts_with.rb,
cask/dsl/uninstall_preflight.rb,
cask/dsl/uninstall_postflight.rb,
sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class representing the domain-specific language used for casks.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Base, Caveats, ConflictsWith, Container, DependsOn, Postflight, Preflight, UninstallPostflight, UninstallPreflight, Version - - -

- - -

- Constant Summary - collapse -

- -
- -
ORDINARY_ARTIFACT_CLASSES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  Artifact::Installer,
-  Artifact::App,
-  Artifact::Artifact,
-  Artifact::AudioUnitPlugin,
-  Artifact::Binary,
-  Artifact::Colorpicker,
-  Artifact::Dictionary,
-  Artifact::Font,
-  Artifact::InputMethod,
-  Artifact::InternetPlugin,
-  Artifact::KeyboardLayout,
-  Artifact::Manpage,
-  Artifact::Pkg,
-  Artifact::Prefpane,
-  Artifact::Qlplugin,
-  Artifact::Mdimporter,
-  Artifact::ScreenSaver,
-  Artifact::Service,
-  Artifact::StageOnly,
-  Artifact::Suite,
-  Artifact::VstPlugin,
-  Artifact::Vst3Plugin,
-  Artifact::Uninstall,
-  Artifact::Zap,
-].freeze
- -
ACTIVATABLE_ARTIFACT_CLASSES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(ORDINARY_ARTIFACT_CLASSES - [Artifact::StageOnly]).freeze
- -
ARTIFACT_BLOCK_CLASSES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  Artifact::PreflightBlock,
-  Artifact::PostflightBlock,
-].freeze
- -
DSL_METHODS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Set.new([
-  :appcast,
-  :arch,
-  :artifacts,
-  :auto_updates,
-  :caveats,
-  :conflicts_with,
-  :container,
-  :desc,
-  :depends_on,
-  :homepage,
-  :language,
-  :name,
-  :sha256,
-  :staged_path,
-  :url,
-  :version,
-  :appdir,
-  :deprecate!,
-  :deprecated?,
-  :deprecation_date,
-  :deprecation_reason,
-  :disable!,
-  :disabled?,
-  :disable_date,
-  :disable_reason,
-  :discontinued?, # TODO: remove once discontinued? is removed (4.5.0)
-  :livecheck,
-  :livecheckable?,
-  :on_system_blocks_exist?,
-  *ORDINARY_ARTIFACT_CLASSES.map(&:dsl_key),
-  *ACTIVATABLE_ARTIFACT_CLASSES.map(&:dsl_key),
-  *ARTIFACT_BLOCK_CLASSES.flat_map { |klass| [klass.dsl_key, klass.uninstall_dsl_key] },
-]).freeze
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- - - - - - - - - -

Methods included from OnSystem::MacOSOnly

-

included, #on_arch_conditional

-
-

Constructor Details

- -
-

- - #initialize(cask) ⇒ DSL - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of DSL.

- - -
-
-
- - -
- - - - -
-
-
-
-110
-111
-112
-113
-
-
# File 'cask/dsl.rb', line 110
-
-def initialize(cask)
-  @cask = cask
-  @token = cask.token
-end
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - -

- -
-

- - #method_missing(method) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-492
-493
-494
-495
-496
-497
-498
-499
-
-
# File 'cask/dsl.rb', line 492
-
-def method_missing(method, *)
-  if method
-    Utils.method_missing_message(method, token)
-    nil
-  else
-    super
-  end
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'cask/dsl.rb', line 106
-
-def cask
-  @cask
-end
-
-
- - - -
-

- - #deprecation_dateObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'cask/dsl.rb', line 106
-
-def deprecation_date
-  @deprecation_date
-end
-
-
- - - -
-

- - #deprecation_reasonObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'cask/dsl.rb', line 106
-
-def deprecation_reason
-  @deprecation_reason
-end
-
-
- - - -
-

- - #disable_dateObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'cask/dsl.rb', line 106
-
-def disable_date
-  @disable_date
-end
-
-
- - - -
-

- - #disable_reasonObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'cask/dsl.rb', line 106
-
-def disable_reason
-  @disable_reason
-end
-
-
- - - -
-

- - #tokenObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'cask/dsl.rb', line 106
-
-def token
-  @token
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #appdirObject - - - - - -

-
-

The directory apps are installed into.

- - -
-
-
- - -
- - - - -
-
-
-
-508
-509
-510
-511
-512
-
-
# File 'cask/dsl.rb', line 508
-
-def appdir
-  return HOMEBREW_CASK_APPDIR_PLACEHOLDER if Cask.generating_hash?
-
-  cask.config.appdir
-end
-
-
- -
-

- - #arch(arm: nil, intel: nil) ⇒ Object - - - - - -

-
-

Sets the cask's architecture strings.

- -

Example

- -
arch arm: "darwin-arm64", intel: "darwin"
-
- - -
-
-
- - -
- - - - -
-
-
-
-339
-340
-341
-342
-343
-344
-345
-346
-347
-
-
# File 'cask/dsl.rb', line 339
-
-def arch(arm: nil, intel: nil)
-  should_return = arm.nil? && intel.nil?
-
-  set_unique_stanza(:arch, should_return) do
-    @on_system_blocks_exist = true
-
-    on_arch_conditional(arm:, intel:)
-  end
-end
-
-
- -
-

- - #artifactsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-374
-375
-376
-
-
# File 'cask/dsl.rb', line 374
-
-def artifacts
-  @artifacts ||= ArtifactSet.new
-end
-
-
- -
-

- - #auto_updates(auto_updates = nil) ⇒ Object - - - - - -

-
-

Asserts that the cask artifacts auto-update.

- - -
-
-
- - -
- - - - -
-
-
-
-417
-418
-419
-
-
# File 'cask/dsl.rb', line 417
-
-def auto_updates(auto_updates = nil)
-  set_unique_stanza(:auto_updates, auto_updates.nil?) { auto_updates }
-end
-
-
- -
-

- - #caskroom_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-378
-379
-380
-
-
# File 'cask/dsl.rb', line 378
-
-def caskroom_path
-  cask.caskroom_path
-end
-
-
- -
-

- - #caveats(*strings, &block) ⇒ Object - - - - - -

-
-

Provide the user with cask-specific information at install time.

- - -
-
-
- - -
- - - - -
-
-
-
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-
-
# File 'cask/dsl.rb', line 395
-
-def caveats(*strings, &block)
-  @caveats ||= DSL::Caveats.new(cask)
-  if block
-    @caveats.eval_caveats(&block)
-  elsif strings.any?
-    strings.each do |string|
-      @caveats.eval_caveats { string }
-    end
-  else
-    return @caveats.to_s
-  end
-  @caveats
-end
-
-
- -
-

- - #conflicts_with(**kwargs) ⇒ Object - - - - - -

-
-

Declare conflicts that keep a cask from installing or working correctly.

- - -
-
-
- - -
- - - - -
-
-
-
-369
-370
-371
-372
-
-
# File 'cask/dsl.rb', line 369
-
-def conflicts_with(**kwargs)
-  # TODO: Remove this constraint and instead merge multiple `conflicts_with` stanzas
-  set_unique_stanza(:conflicts_with, kwargs.empty?) { DSL::ConflictsWith.new(**kwargs) }
-end
-
-
- -
-

- - #container(**kwargs) ⇒ Object - - - - - -

-
-

Sets the cask's container type or nested container path.

- -

Examples

- -

The container is a nested disk image:

- -
container nested: "orca-#{version}.dmg"
-
- -

The container should not be unarchived:

- -
container type: :naked
-
- - -
-
-
- - -
- - - - -
-
-
-
-268
-269
-270
-271
-272
-
-
# File 'cask/dsl.rb', line 268
-
-def container(**kwargs)
-  set_unique_stanza(:container, kwargs.empty?) do
-    DSL::Container.new(**kwargs)
-  end
-end
-
-
- -
-

- - #depends_on(**kwargs) ⇒ Object - - - - - -

-
- -
- Note: -

Multiple dependencies can be specified.

-
-
- -

Declare dependencies and requirements for a cask.

- - -
-
-
- - -
- - - - -
-
-
-
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-
-
# File 'cask/dsl.rb', line 354
-
-def depends_on(**kwargs)
-  @depends_on ||= DSL::DependsOn.new
-  return @depends_on if kwargs.empty?
-
-  begin
-    @depends_on.load(**kwargs)
-  rescue RuntimeError => e
-    raise CaskInvalidError.new(cask, e)
-  end
-  @depends_on
-end
-
-
- -
-

- - #deprecate!(date:, because:) ⇒ Object - - - - - -

-
- -
- Note: -

A warning will be shown when trying to install this cask.

-
-
- -

Declare that a cask is no longer functional or supported.

- - -
-
-
- - -
- - - - -
-
-
-
-441
-442
-443
-444
-445
-446
-447
-
-
# File 'cask/dsl.rb', line 441
-
-def deprecate!(date:, because:)
-  @deprecation_date = Date.parse(date)
-  return if @deprecation_date > Date.today
-
-  @deprecation_reason = because
-  @deprecated = true
-end
-
-
- -
-

- - #deprecated?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-364
-
-
# File 'sorbet/rbi/parlour.rbi', line 364
-
-def deprecated?; end
-
-
- -
-

- - #desc(description = nil) ⇒ Object - - - - - -

-
-

Describes the cask.

- -

Example

- -
desc "Open-source code editor"
-
- - -
-
-
- - -
- - - - -
-
-
-
-142
-143
-144
-
-
# File 'cask/dsl.rb', line 142
-
-def desc(description = nil)
-  set_unique_stanza(:desc, description.nil?) { description }
-end
-
-
- -
-

- - #disable!(date:, because:) ⇒ Object - - - - - -

-
- -
- Note: -

An error will be thrown when trying to install this cask.

-
-
- -

Declare that a cask is no longer functional or supported.

- - -
-
-
- - -
- - - - -
-
-
-
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-
-
# File 'cask/dsl.rb', line 454
-
-def disable!(date:, because:)
-  @disable_date = Date.parse(date)
-
-  if @disable_date > Date.today
-    @deprecation_reason = because
-    @deprecated = true
-    return
-  end
-
-  @disable_reason = because
-  @disabled = true
-end
-
-
- -
-

- - #disabled?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-367
-
-
# File 'sorbet/rbi/parlour.rbi', line 367
-
-def disabled?; end
-
-
- -
-

- - #discontinued?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-409
-410
-411
-412
-
-
# File 'cask/dsl.rb', line 409
-
-def discontinued?
-  odeprecated "`discontinued?`", "`deprecated?` or `disabled?`"
-  @caveats&.discontinued? == true
-end
-
-
- -
-

- - #homepage(homepage = nil) ⇒ Object - - - - - -

-
-

Sets the cask's homepage.

- -

Example

- -
homepage "https://code.visualstudio.com/"
-
- - -
-
-
- - -
- - - - -
-
-
-
-176
-177
-178
-
-
# File 'cask/dsl.rb', line 176
-
-def homepage(homepage = nil)
-  set_unique_stanza(:homepage, homepage.nil?) { homepage }
-end
-
-
- -
-

- - #language(*args, default: false, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-
-
# File 'cask/dsl.rb', line 180
-
-def language(*args, default: false, &block)
-  if args.empty?
-    language_eval
-  elsif block
-    @language_blocks ||= {}
-    @language_blocks[args] = block
-
-    return unless default
-
-    if !@cask.allow_reassignment && @language_blocks.default.present?
-      raise CaskInvalidError.new(cask, "Only one default language may be defined.")
-    end
-
-    @language_blocks.default = block
-  else
-    raise CaskInvalidError.new(cask, "No block given to language stanza.")
-  end
-end
-
-
- -
-

- - #language_evalObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-
-
# File 'cask/dsl.rb', line 199
-
-def language_eval
-  return @language_eval if defined?(@language_eval)
-
-  return @language_eval = nil if @language_blocks.blank?
-
-  raise CaskInvalidError.new(cask, "No default language specified.") if @language_blocks.default.nil?
-
-  locales = cask.config.languages
-                .filter_map do |language|
-                  Locale.parse(language)
-                rescue Locale::ParserError
-                  nil
-                end
-
-  locales.each do |locale|
-    key = locale.detect(@language_blocks.keys)
-
-    next if key.nil?
-
-    return @language_eval = @language_blocks[key].call
-  end
-
-  @language_eval = @language_blocks.default.call
-end
-
-
- -
-

- - #languagesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-224
-225
-226
-227
-228
-
-
# File 'cask/dsl.rb', line 224
-
-def languages
-  return [] if @language_blocks.nil?
-
-  @language_blocks.keys.flatten
-end
-
-
- -
-

- - #livecheck(&block) ⇒ Object - - - - - -

-
-

Automatically fetch the latest version of a cask from changelogs.

- - -
-
-
- - -
- - - - -
-
-
-
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-
-
# File 'cask/dsl.rb', line 424
-
-def livecheck(&block)
-  @livecheck ||= Livecheck.new(cask)
-  return @livecheck unless block
-
-  if !@cask.allow_reassignment && @livecheckable
-    raise CaskInvalidError.new(cask, "'livecheck' stanza may only appear once.")
-  end
-
-  @livecheckable = true
-  @livecheck.instance_eval(&block)
-end
-
-
- -
-

- - #livecheckable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-370
-
-
# File 'sorbet/rbi/parlour.rbi', line 370
-
-def livecheckable?; end
-
-
- -
-

- - #name(*args) ⇒ Object - - - - - -

-
- -
- Note: -

Multiple names can be specified.

-
-
- -

Specifies the cask's name.

- -

Example

- -
name "Visual Studio Code"
-
- - -
-
-
- - -
- - - - -
-
-
-
-126
-127
-128
-129
-130
-131
-
-
# File 'cask/dsl.rb', line 126
-
-def name(*args)
-  @name ||= []
-  return @name if args.empty?
-
-  @name.concat(args.flatten)
-end
-
-
- -
-

- - #on_system_blocks_exist?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-361
-
-
# File 'sorbet/rbi/parlour.rbi', line 361
-
-def on_system_blocks_exist?; end
-
-
- -
-

- - #respond_to_missing?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-501
-502
-503
-
-
# File 'cask/dsl.rb', line 501
-
-def respond_to_missing?(*)
-  true
-end
-
-
- -
-

- - #set_unique_stanza(stanza, should_return) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-
-
# File 'cask/dsl.rb', line 146
-
-def set_unique_stanza(stanza, should_return)
-  return instance_variable_get(:"@#{stanza}") if should_return
-
-  unless @cask.allow_reassignment
-    if instance_variable_defined?(:"@#{stanza}") && !@called_in_on_system_block
-      raise CaskInvalidError.new(cask, "'#{stanza}' stanza may only appear once.")
-    end
-
-    if instance_variable_defined?(:"@#{stanza}_set_in_block") && @called_in_on_system_block
-      raise CaskInvalidError.new(cask, "'#{stanza}' stanza may only be overridden once.")
-    end
-  end
-
-  instance_variable_set(:"@#{stanza}_set_in_block", true) if @called_in_on_system_block
-  instance_variable_set(:"@#{stanza}", yield)
-rescue CaskInvalidError
-  raise
-rescue => e
-  raise CaskInvalidError.new(cask, "'#{stanza}' stanza failed with: #{e}")
-end
-
-
- -
-

- - #sha256(arg = nil, arm: nil, intel: nil) ⇒ Object - - - - - -

-
-

Sets the cask's download checksum.

- -

Example

- -

For universal or single-architecture downloads:

- -
sha256 "7bdb497080ffafdfd8cc94d8c62b004af1be9599e865e5555e456e2681e150ca"
-
- -

For architecture-dependent downloads:

- -
sha256 arm:   "7bdb497080ffafdfd8cc94d8c62b004af1be9599e865e5555e456e2681e150ca",
-        intel: "b3c1c2442480a0219b9e05cf91d03385858c20f04b764ec08a3fa83d1b27e7b2"
-
- - -
-
-
- - -
- - - - -
-
-
-
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-
-
# File 'cask/dsl.rb', line 312
-
-def sha256(arg = nil, arm: nil, intel: nil)
-  should_return = arg.nil? && arm.nil? && intel.nil?
-
-  set_unique_stanza(:sha256, should_return) do
-    @on_system_blocks_exist = true if arm.present? || intel.present?
-
-    val = arg || on_arch_conditional(arm:, intel:)
-    case val
-    when :no_check
-      val
-    when String
-      Checksum.new(val)
-    else
-      raise CaskInvalidError.new(cask, "invalid 'sha256' value: #{val.inspect}")
-    end
-  end
-end
-
-
- -
-

- - #staged_pathObject - - - - - -

-
-

The staged location for this cask, including version number.

- - -
-
-
- - -
- - - - -
-
-
-
-385
-386
-387
-388
-389
-390
-
-
# File 'cask/dsl.rb', line 385
-
-def staged_path
-  return @staged_path if @staged_path
-
-  cask_version = version || :unknown
-  @staged_path = caskroom_path.join(cask_version.to_s)
-end
-
-
- -
-

- - #url(*args, **options, &block) ⇒ Object - - - - - -

-
-

Sets the cask's download URL.

- -

Example

- -
url "https://update.code.visualstudio.com/#{version}/#{arch}/stable"
-
- - -
-
-
- - -
- - - - -
-
-
-
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-
-
# File 'cask/dsl.rb', line 239
-
-def url(*args, **options, &block)
-  caller_location = T.must(caller_locations).fetch(0)
-
-  set_unique_stanza(:url, args.empty? && options.empty? && !block) do
-    if block
-      URL.new(*args, **options, caller_location:, dsl: self, &block)
-    else
-      URL.new(*args, **options, caller_location:)
-    end
-  end
-end
-
-
- -
-

- - #version(arg = nil) ⇒ Object - - - - - -

-
-

Sets the cask's version.

- -

Example

- -
version "1.88.1"
-
- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-284
-285
-286
-287
-288
-289
-290
-291
-292
-
-
# File 'cask/dsl.rb', line 284
-
-def version(arg = nil)
-  set_unique_stanza(:version, arg.nil?) do
-    if !arg.is_a?(String) && arg != :latest
-      raise CaskInvalidError.new(cask, "invalid 'version' value: #{arg.inspect}")
-    end
-
-    DSL::Version.new(arg)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/Base.html b/docs/Cask/DSL/Base.html deleted file mode 100644 index 1e17779af..000000000 --- a/docs/Cask/DSL/Base.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - Class: Cask::DSL::Base - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::Base - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
cask/dsl/base.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Superclass for all stanzas which take a block.

- - -
-
-
- - -
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(cask, command = SystemCommand) ⇒ Base - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Base.

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-
-
# File 'cask/dsl/base.rb', line 13
-
-def initialize(cask, command = SystemCommand)
-  @cask = cask
-  @command = command
-end
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - -

- -
-

- - #method_missing(method) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'cask/dsl/base.rb', line 26
-
-def method_missing(method, *)
-  if method
-    underscored_class = T.must(self.class.name).gsub(/([[:lower:]])([[:upper:]][[:lower:]])/, '\1_\2').downcase
-    section = underscored_class.split("::").last
-    Utils.method_missing_message(method, @cask.to_s, section)
-    nil
-  else
-    super
-  end
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #system_command(executable, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'cask/dsl/base.rb', line 20
-
-def system_command(executable, **options)
-  @command.run!(executable, **options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/Caveats.html b/docs/Cask/DSL/Caveats.html deleted file mode 100644 index a37bf52e0..000000000 --- a/docs/Cask/DSL/Caveats.html +++ /dev/null @@ -1,561 +0,0 @@ - - - - - - - Class: Cask::DSL::Caveats - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::Caveats - - - Private -

-
- -
-
Inherits:
-
- Base - - - show all - -
-
- - - - -
-
Extended by:
-
Attrable
-
- - - - - - - - -
-
Defined in:
-
cask/dsl/caveats.rb,
- cask/dsl/caveats.rbi,
sorbet/rbi/parlour.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- - - - - - - - - -

Methods inherited from Base

-

#method_missing, #system_command

- -
-

Constructor Details

- -
-

- - #initialize(*args) ⇒ Caveats - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Caveats.

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-
-
# File 'cask/dsl/caveats.rb', line 22
-
-def initialize(*args)
-  super
-  @built_in_caveats = {}
-  @custom_caveats = []
-  @discontinued = false
-end
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Cask::DSL::Base - -

- -
- - -
-

Instance Method Details

- - -
-

- - #discontinued?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-357
-
-
# File 'sorbet/rbi/parlour.rbi', line 357
-
-def discontinued?; end
-
-
- -
-

- - #eval_caveats(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'cask/dsl/caveats.rb', line 51
-
-def eval_caveats(&block)
-  result = instance_eval(&block)
-  return unless result
-  return if result == :built_in_caveat
-
-  @custom_caveats << result.to_s.sub(/\s*\Z/, "\n")
-end
-
-
- -
-

- - #kextSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-5
-
-
# File 'cask/dsl/caveats.rbi', line 5
-
-def kext; end
-
-
- -
-

- - #puts(*args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Override puts to collect caveats.

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-49
-
-
# File 'cask/dsl/caveats.rb', line 46
-
-def puts(*args)
-  @custom_caveats += args
-  :built_in_caveat
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/ConflictsWith.html b/docs/Cask/DSL/ConflictsWith.html deleted file mode 100644 index cfd255971..000000000 --- a/docs/Cask/DSL/ConflictsWith.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - Class: Cask::DSL::ConflictsWith - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::ConflictsWith - - - Private -

-
- -
-
Inherits:
-
- SimpleDelegator - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/dsl/conflicts_with.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class corresponding to the conflicts_with stanza.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
VALID_KEYS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  :formula,
-  :cask,
-  :macos,
-  :arch,
-  :x11,
-  :java,
-].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(**options) ⇒ ConflictsWith - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ConflictsWith.

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'cask/dsl/conflicts_with.rb', line 20
-
-def initialize(**options)
-  options.assert_valid_keys(*VALID_KEYS)
-
-  conflicts = options.transform_values { |v| Set.new(Kernel.Array(v)) }
-  conflicts.default = Set.new
-
-  super(conflicts)
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #to_json(generator) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'cask/dsl/conflicts_with.rb', line 29
-
-def to_json(generator)
-  __getobj__.transform_values(&:to_a).to_json(generator)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/Container.html b/docs/Cask/DSL/Container.html deleted file mode 100644 index 9595ce040..000000000 --- a/docs/Cask/DSL/Container.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - - - - Class: Cask::DSL::Container - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::Container - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/dsl/container.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class corresponding to the container stanza.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(nested: nil, type: nil) ⇒ Container - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Container.

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-19
-20
-
-
# File 'cask/dsl/container.rb', line 12
-
-def initialize(nested: nil, type: nil)
-  @nested = nested
-  @type = type
-
-  return if type.nil?
-  return unless UnpackStrategy.from_type(type).nil?
-
-  raise "invalid container type: #{type.inspect}"
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #nestedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'cask/dsl/container.rb', line 10
-
-def nested
-  @nested
-end
-
-
- - - -
-

- - #typeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'cask/dsl/container.rb', line 10
-
-def type
-  @type
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #pairsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'cask/dsl/container.rb', line 22
-
-def pairs
-  instance_variables.to_h { |ivar| [ivar[1..].to_sym, instance_variable_get(ivar)] }.compact
-end
-
-
- -
-

- - #to_yamlObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'cask/dsl/container.rb', line 26
-
-def to_yaml
-  pairs.to_yaml
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/DependsOn.html b/docs/Cask/DSL/DependsOn.html deleted file mode 100644 index 60a4aa443..000000000 --- a/docs/Cask/DSL/DependsOn.html +++ /dev/null @@ -1,670 +0,0 @@ - - - - - - - Class: Cask::DSL::DependsOn - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::DependsOn - - - Private -

-
- -
-
Inherits:
-
- SimpleDelegator - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
cask/dsl/depends_on.rb,
- cask/dsl/depends_on.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
VALID_KEYS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Set.new([
-  :formula,
-  :cask,
-  :macos,
-  :arch,
-]).freeze
- -
VALID_ARCHES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  intel:  { type: :intel, bits: 64 },
-  # specific
-  x86_64: { type: :intel, bits: 64 },
-  arm64:  { type: :arm, bits: 64 },
-}.freeze
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- -
-

Constructor Details

- -
-

- - #initializeDependsOn - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of DependsOn.

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-
-
# File 'cask/dsl/depends_on.rb', line 28
-
-def initialize
-  super({})
-  @cask ||= []
-  @formula ||= []
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #archObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'cask/dsl/depends_on.rb', line 26
-
-def arch
-  @arch
-end
-
-
- - - -
-

- - #caskObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'cask/dsl/depends_on.rb', line 26
-
-def cask
-  @cask
-end
-
-
- - - -
-

- - #formulaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'cask/dsl/depends_on.rb', line 26
-
-def formula
-  @formula
-end
-
-
- - - -
-

- - #macosObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'cask/dsl/depends_on.rb', line 26
-
-def macos
-  @macos
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #load(**pairs) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'cask/dsl/depends_on.rb', line 34
-
-def load(**pairs)
-  pairs.each do |key, value|
-    raise "invalid depends_on key: '#{key.inspect}'" unless VALID_KEYS.include?(key)
-
-    __getobj__[key] = send(:"#{key}=", *value)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/Postflight.html b/docs/Cask/DSL/Postflight.html deleted file mode 100644 index 0e3fdba6f..000000000 --- a/docs/Cask/DSL/Postflight.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::DSL::Postflight - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::Postflight - - - Private -

-
- -
-
Inherits:
-
- Base - - - show all - -
-
- - - - - - -
-
Includes:
-
Staged
-
- - - - - - -
-
Defined in:
-
cask/dsl/postflight.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class corresponding to the postflight stanza.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Staged

-

Staged::Paths

- - - - - - - - - - - - -

Method Summary

- -

Methods included from Staged

-

#set_ownership, #set_permissions

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from Base

-

#initialize, #method_missing, #system_command

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::DSL::Base

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Cask::DSL::Base - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/Preflight.html b/docs/Cask/DSL/Preflight.html deleted file mode 100644 index 176c4298c..000000000 --- a/docs/Cask/DSL/Preflight.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::DSL::Preflight - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::Preflight - - - Private -

-
- -
-
Inherits:
-
- Base - - - show all - -
-
- - - - - - -
-
Includes:
-
Staged
-
- - - - - - -
-
Defined in:
-
cask/dsl/preflight.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class corresponding to the preflight stanza.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Staged

-

Staged::Paths

- - - - - - - - - - - - -

Method Summary

- -

Methods included from Staged

-

#set_ownership, #set_permissions

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from Base

-

#initialize, #method_missing, #system_command

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::DSL::Base

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Cask::DSL::Base - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/UninstallPostflight.html b/docs/Cask/DSL/UninstallPostflight.html deleted file mode 100644 index 52eb657ab..000000000 --- a/docs/Cask/DSL/UninstallPostflight.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - Class: Cask::DSL::UninstallPostflight - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::UninstallPostflight - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/dsl/uninstall_postflight.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class corresponding to the uninstall_postflight stanza.

- - -
-
-
- - -
- - - - - - - - - - - - - -

Method Summary

- -

Methods inherited from Base

-

#initialize, #method_missing, #system_command

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::DSL::Base

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Cask::DSL::Base - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/UninstallPreflight.html b/docs/Cask/DSL/UninstallPreflight.html deleted file mode 100644 index e5d20ff16..000000000 --- a/docs/Cask/DSL/UninstallPreflight.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - Class: Cask::DSL::UninstallPreflight - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::UninstallPreflight - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Staged
-
- - - - - - -
-
Defined in:
-
cask/dsl/uninstall_preflight.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class corresponding to the uninstall_preflight stanza.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Staged

-

Staged::Paths

- - - - - - - - - - - - -

Method Summary

- -

Methods included from Staged

-

#set_ownership, #set_permissions

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from Base

-

#initialize, #method_missing, #system_command

- -
-

Constructor Details

- -

This class inherits a constructor from Cask::DSL::Base

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Cask::DSL::Base - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/DSL/Version.html b/docs/Cask/DSL/Version.html deleted file mode 100644 index adcd22ddf..000000000 --- a/docs/Cask/DSL/Version.html +++ /dev/null @@ -1,1545 +0,0 @@ - - - - - - - Class: Cask::DSL::Version - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::DSL::Version - - - Private -

-
- -
-
Inherits:
-
- String - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/dsl/version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class corresponding to the version stanza.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
DIVIDERS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  "." => :dots,
-  "-" => :hyphens,
-  "_" => :underscores,
-}.freeze
- -
DIVIDER_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/(#{DIVIDERS.keys.map { |v| Regexp.quote(v) }.join("|")})/
- -
MAJOR_MINOR_PATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/^([^.,:]+)(?:.([^.,:]+)(?:.([^.,:]+))?)?/
- -
INVALID_CHARACTERS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/[^0-9a-zA-Z.,:\-_+ ]/
- -
- - - - - - -

Constants inherited - from String

-

String::BLANK_RE, String::ENCODED_BLANKS_

- - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from String

-

#blank?, #exclude?, #present?

-
-

Constructor Details

- -
-

- - #initialize(raw_version) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - raw_version - - - (String, Symbol, nil) - - - -
  • - -
- -

Raises:

-
    - -
  • - - - (TypeError) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'cask/dsl/version.rb', line 66
-
-def initialize(raw_version)
-  @raw_version = raw_version
-  super(raw_version.to_s)
-
-  invalid = invalid_characters
-  raise TypeError, "#{raw_version} contains invalid characters: #{invalid.uniq.join}!" if invalid.present?
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #raw_versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-63
-64
-65
-
-
# File 'cask/dsl/version.rb', line 63
-
-def raw_version
-  @raw_version
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #after_commaT.self_type - - - - - -

-
-

The version part after the first comma.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-165
-166
-167
-
-
# File 'cask/dsl/version.rb', line 165
-
-def after_comma
-  version { split(",", 2).second }
-end
-
-
- -
-

- - #before_commaT.self_type - - - - - -

-
-

The version part before the first comma.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-157
-158
-159
-
-
# File 'cask/dsl/version.rb', line 157
-
-def before_comma
-  version { split(",", 2).first }
-end
-
-
- -
-

- - #chomp(separator = T.unsafe(nil)) ⇒ T.self_type - - - - - -

-
-

The version with the given record separator removed from the end.

- - -
-
-
-

Parameters:

-
    - -
  • - - separator - - - (String) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -

See Also:

-
    - -
  • String#chomp
  • - -
- -
- - - - -
-
-
-
-183
-184
-185
-
-
# File 'cask/dsl/version.rb', line 183
-
-def chomp(separator = T.unsafe(nil))
-  version { to_s.chomp(separator) }
-end
-
-
- -
-

- - #csvArray<Version> - - - - - -

-
-

The comma separated values of the version as array.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-149
-150
-151
-
-
# File 'cask/dsl/version.rb', line 149
-
-def csv
-  split(",").map { self.class.new(_1) }
-end
-
-
- -
-

- - #invalid_charactersObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-74
-75
-76
-77
-78
-
-
# File 'cask/dsl/version.rb', line 74
-
-def invalid_characters
-  return [] if raw_version.blank? || latest?
-
-  raw_version.scan(INVALID_CHARACTERS)
-end
-
-
- -
-

- - #latest?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-93
-94
-95
-
-
# File 'cask/dsl/version.rb', line 93
-
-def latest?
-  to_s == "latest"
-end
-
-
- -
-

- - #majorT.self_type - - - - - -

-
-

The major version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'cask/dsl/version.rb', line 101
-
-def major
-  version { slice(MAJOR_MINOR_PATCH_REGEX, 1) }
-end
-
-
- -
-

- - #major_minorT.self_type - - - - - -

-
-

The major and minor version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-126
-127
-
-
# File 'cask/dsl/version.rb', line 125
-
-def major_minor
-  version { [major, minor].reject(&:empty?).join(".") }
-end
-
-
- -
-

- - #major_minor_patchT.self_type - - - - - -

-
-

The major, minor and patch version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-133
-134
-135
-
-
# File 'cask/dsl/version.rb', line 133
-
-def major_minor_patch
-  version { [major, minor, patch].reject(&:empty?).join(".") }
-end
-
-
- -
-

- - #minorT.self_type - - - - - -

-
-

The minor version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-109
-110
-111
-
-
# File 'cask/dsl/version.rb', line 109
-
-def minor
-  version { slice(MAJOR_MINOR_PATCH_REGEX, 2) }
-end
-
-
- -
-

- - #minor_patchT.self_type - - - - - -

-
-

The minor and patch version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-141
-142
-143
-
-
# File 'cask/dsl/version.rb', line 141
-
-def minor_patch
-  version { [minor, patch].reject(&:empty?).join(".") }
-end
-
-
- -
-

- - #no_dividersT.self_type - - - - - -

-
-

The version without any dividers.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-174
-175
-176
-
-
# File 'cask/dsl/version.rb', line 174
-
-def no_dividers
-  version { gsub(DIVIDER_REGEX, "") }
-end
-
-
- -
-

- - #patchT.self_type - - - - - -

-
-

The patch version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-117
-118
-119
-
-
# File 'cask/dsl/version.rb', line 117
-
-def patch
-  version { slice(MAJOR_MINOR_PATCH_REGEX, 3) }
-end
-
-
- -
-

- - #unstable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-
-
# File 'cask/dsl/version.rb', line 81
-
-def unstable?
-  return false if latest?
-
-  s = downcase.delete(".").gsub(/[^a-z\d]+/, "-")
-
-  return true if s.match?(/(\d+|\b)(alpha|beta|preview|rc|dev|canary|snapshot)(\d+|\b)/i)
-  return true if s.match?(/\A[a-z\d]+(-\d+)*-?(a|b|pre)(\d+|\b)/i)
-
-  false
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Denylist.html b/docs/Cask/Denylist.html deleted file mode 100644 index c62c48505..000000000 --- a/docs/Cask/Denylist.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - Module: Cask::Denylist - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Denylist - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
cask/denylist.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

List of casks which are not allowed in official taps.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .reason(name) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-
-
# File 'cask/denylist.rb', line 8
-
-def self.reason(name)
-  case name
-  when /^adobe-(after|illustrator|indesign|photoshop|premiere)/
-    "Adobe casks were removed because they are too difficult to maintain."
-  when /^pharo$/
-    "Pharo developers maintain their own tap."
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Download.html b/docs/Cask/Download.html deleted file mode 100644 index 43376d647..000000000 --- a/docs/Cask/Download.html +++ /dev/null @@ -1,1052 +0,0 @@ - - - - - - - Class: Cask::Download - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Download - - - Private -

-
- -
-
Inherits:
-
- Downloadable - - - show all - -
-
- - - - - - -
-
Includes:
-
Context
-
- - - - - - -
-
Defined in:
-
cask/download.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A download corresponding to a Cask.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #cask ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from Downloadable

-

#mirrors

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - - - - - - - - - -

Methods inherited from Downloadable

-

#cached_download, #clear_cache, #download_strategy, #downloaded?, #downloader, #freeze, #initialize_dup

- -
-

Constructor Details

- -
-

- - #initialize(cask, quarantine: nil) ⇒ Download - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Download.

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-
-
# File 'cask/download.rb', line 16
-
-def initialize(cask, quarantine: nil)
-  super()
-
-  @cask = cask
-  @quarantine = quarantine
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'cask/download.rb', line 14
-
-def cask
-  @cask
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #basenameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-72
-73
-74
-
-
# File 'cask/download.rb', line 72
-
-def basename
-  downloader.basename
-end
-
-
- -
-

- - #checksum::Checksum? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'cask/download.rb', line 31
-
-def checksum
-  @checksum ||= cask.sha256 if cask.sha256 != :no_check
-end
-
-
- -
-

- - #download_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-87
-88
-89
-
-
# File 'cask/download.rb', line 87
-
-def download_name
-  cask.token
-end
-
-
- -
-

- - #fetch(quiet: nil, verify_download_integrity: true, timeout: nil) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - quiet - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - verify_download_integrity - - - (Boolean) - - - (defaults to: true) - - -
  • - -
  • - - timeout - - - (Integer, Float, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'cask/download.rb', line 49
-
-def fetch(quiet: nil, verify_download_integrity: true, timeout: nil)
-  downloader.quiet! if quiet
-
-  begin
-    super(verify_download_integrity: false, timeout:)
-  rescue DownloadError => e
-    error = CaskError.new("Download failed on Cask '#{cask}' with message: #{e.cause}")
-    error.set_backtrace e.backtrace
-    raise error
-  end
-
-  downloaded_path = cached_download
-  quarantine(downloaded_path)
-  self.verify_download_integrity(downloaded_path) if verify_download_integrity
-  downloaded_path
-end
-
-
- -
-

- - #time_file_size(timeout: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-
-
# File 'cask/download.rb', line 66
-
-def time_file_size(timeout: nil)
-  raise ArgumentError, "not supported for this download strategy" unless downloader.is_a?(CurlDownloadStrategy)
-
-  T.cast(downloader, CurlDownloadStrategy).resolved_time_file_size(timeout:)
-end
-
-
- -
-

- - #url::URL? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (::URL, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-
-
# File 'cask/download.rb', line 24
-
-def url
-  return if cask.url.nil?
-
-  @url ||= ::URL.new(cask.url.to_s, cask.url.specs)
-end
-
-
- -
-

- - #verify_download_integrity(filename) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - filename - - - (Pathname) - - - -
  • - -
- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-
-
# File 'cask/download.rb', line 77
-
-def verify_download_integrity(filename)
-  if @cask.sha256 == :no_check
-    opoo "No checksum defined for cask '#{@cask}', skipping verification."
-    return
-  end
-
-  super
-end
-
-
- -
-

- - #versionVersion? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Version, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-
-
# File 'cask/download.rb', line 36
-
-def version
-  return if cask.version.nil?
-
-  @version ||= Version.new(cask.version)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Info.html b/docs/Cask/Info.html deleted file mode 100644 index ad7bf3882..000000000 --- a/docs/Cask/Info.html +++ /dev/null @@ -1,703 +0,0 @@ - - - - - - - Class: Cask::Info - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Info - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/info.rb
-
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .artifact_info(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-
-
# File 'cask/info.rb', line 87
-
-def self.artifact_info(cask)
-  artifact_output = ohai_title("Artifacts").dup
-  cask.artifacts.each do |artifact|
-    next unless artifact.respond_to?(:install_phase)
-    next unless DSL::ORDINARY_ARTIFACT_CLASSES.include?(artifact.class)
-
-    artifact_output << "\n" << artifact.to_s
-  end
-  artifact_output.freeze
-end
-
-
- -
-

- - .desc_info(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-
-
# File 'cask/info.rb', line 59
-
-def self.desc_info(cask)
-  <<~EOS
-    #{ohai_title("Description")}
-    #{cask.desc.nil? ? Formatter.error("None") : cask.desc}
-  EOS
-end
-
-
- -
-

- - .get_info(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'cask/info.rb', line 8
-
-def self.get_info(cask)
-  require "cask/installer"
-
-  output = +"#{title_info(cask)}\n"
-  output << "#{Formatter.url(cask.homepage)}\n" if cask.homepage
-  deprecate_disable = DeprecateDisable.message(cask)
-  output << "#{deprecate_disable.capitalize}\n" if deprecate_disable
-  output << installation_info(cask)
-  repo = repo_info(cask)
-  output << "#{repo}\n" if repo
-  output << name_info(cask)
-  output << desc_info(cask)
-  language = language_info(cask)
-  output << language if language
-  output << "#{artifact_info(cask)}\n"
-  caveats = Installer.caveats(cask)
-  output << caveats if caveats
-  output
-end
-
-
- -
-

- - .info(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-28
-29
-30
-31
-
-
# File 'cask/info.rb', line 28
-
-def self.info(cask)
-  puts get_info(cask)
-  ::Utils::Analytics.cask_output(cask, args: Homebrew::CLI::Args.new)
-end
-
-
- -
-

- - .installation_info(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'cask/info.rb', line 39
-
-def self.installation_info(cask)
-  return "Not installed\n" unless cask.installed?
-
-  versioned_staged_path = cask.caskroom_path.join(cask.installed_version)
-  path_details = if versioned_staged_path.exist?
-    versioned_staged_path.abv
-  else
-    Formatter.error("does not exist")
-  end
-
-  "Installed\n#{versioned_staged_path} (#{path_details})\n"
-end
-
-
- -
-

- - .language_info(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# File 'cask/info.rb', line 66
-
-def self.language_info(cask)
-  return if cask.languages.empty?
-
-  <<~EOS
-    #{ohai_title("Languages")}
-    #{cask.languages.join(", ")}
-  EOS
-end
-
-
- -
-

- - .name_info(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-
-
# File 'cask/info.rb', line 52
-
-def self.name_info(cask)
-  <<~EOS
-    #{ohai_title((cask.name.size > 1) ? "Names" : "Name")}
-    #{cask.name.empty? ? Formatter.error("None") : cask.name.join("\n")}
-  EOS
-end
-
-
- -
-

- - .repo_info(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-
-
# File 'cask/info.rb', line 75
-
-def self.repo_info(cask)
-  return if cask.tap.nil?
-
-  url = if cask.tap.custom_remote? && !cask.tap.remote.nil?
-    cask.tap.remote
-  else
-    "#{cask.tap.default_remote}/blob/HEAD/#{cask.tap.relative_cask_path(cask.token)}"
-  end
-
-  "From: #{Formatter.url(url)}"
-end
-
-
- -
-

- - .title_info(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-33
-34
-35
-36
-37
-
-
# File 'cask/info.rb', line 33
-
-def self.title_info(cask)
-  title = "#{oh1_title(cask.token)}: #{cask.version}"
-  title += " (auto_updates)" if cask.auto_updates
-  title
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Installer.html b/docs/Cask/Installer.html deleted file mode 100644 index df7009c6e..000000000 --- a/docs/Cask/Installer.html +++ /dev/null @@ -1,5129 +0,0 @@ - - - - - - - Class: Cask::Installer - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Installer - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Attrable
-
- - - - - - - - -
-
Defined in:
-
cask/installer.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Installer for a Cask.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

-
-

Constructor Details

- -
-

- - #initialize(cask, command: SystemCommand, force: false, adopt: false, skip_cask_deps: false, binaries: true, verbose: false, zap: false, require_sha: false, upgrade: false, reinstall: false, installed_as_dependency: false, quarantine: true, verify_download_integrity: true, quiet: false) ⇒ Installer - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Installer.

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'cask/installer.rb', line 21
-
-def initialize(cask, command: SystemCommand, force: false, adopt: false,
-               skip_cask_deps: false, binaries: true, verbose: false,
-               zap: false, require_sha: false, upgrade: false, reinstall: false,
-               installed_as_dependency: false, quarantine: true,
-               verify_download_integrity: true, quiet: false)
-  @cask = cask
-  @command = command
-  @force = force
-  @adopt = adopt
-  @skip_cask_deps = skip_cask_deps
-  @binaries = binaries
-  @verbose = verbose
-  @zap = zap
-  @require_sha = require_sha
-  @reinstall = reinstall
-  @upgrade = upgrade
-  @installed_as_dependency = installed_as_dependency
-  @quarantine = quarantine
-  @verify_download_integrity = verify_download_integrity
-  @quiet = quiet
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .caveats(cask) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-
-
# File 'cask/installer.rb', line 47
-
-def self.caveats(cask)
-  odebug "Printing caveats"
-
-  caveats = cask.caveats
-  return if caveats.empty?
-
-  Homebrew.messages.record_caveats(cask.token, caveats)
-
-  <<~EOS
-    #{ohai_title "Caveats"}
-    #{caveats}
-  EOS
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #adopt?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-324
-
-
# File 'sorbet/rbi/parlour.rbi', line 324
-
-def adopt?; end
-
-
- -
-

- - #backupObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-434
-435
-436
-437
-
-
# File 'cask/installer.rb', line 434
-
-def backup
-  @cask.staged_path.rename backup_path
-  @cask..rename 
-end
-
-
- -
-

- - #backup_metadata_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-520
-521
-522
-523
-524
-
-
# File 'cask/installer.rb', line 520
-
-def 
-  return if @cask..nil?
-
-  Pathname("#{@cask.}.upgrading")
-end
-
-
- -
-

- - #backup_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-514
-515
-516
-517
-518
-
-
# File 'cask/installer.rb', line 514
-
-def backup_path
-  return if @cask.staged_path.nil?
-
-  Pathname("#{@cask.staged_path}.upgrading")
-end
-
-
- -
-

- - #binaries?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-318
-
-
# File 'sorbet/rbi/parlour.rbi', line 318
-
-def binaries?; end
-
-
- -
-

- - #cask_and_formula_dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-
-
# File 'cask/installer.rb', line 302
-
-def cask_and_formula_dependencies
-  return @cask_and_formula_dependencies if @cask_and_formula_dependencies
-
-  graph = ::Utils::TopologicalHash.graph_package_dependencies(@cask)
-
-  raise CaskSelfReferencingDependencyError, @cask.token if graph[@cask].include?(@cask)
-
-  ::Utils::TopologicalHash.graph_package_dependencies(primary_container.dependencies, graph)
-
-  begin
-    @cask_and_formula_dependencies = graph.tsort - [@cask]
-  rescue TSort::Cyclic
-    strongly_connected_components = graph.strongly_connected_components.sort_by(&:count)
-    cyclic_dependencies = strongly_connected_components.last - [@cask]
-    raise CaskCyclicDependencyError.new(@cask.token, cyclic_dependencies.to_sentence)
-  end
-end
-
-
- -
-

- - #caveatsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-379
-380
-381
-
-
# File 'cask/installer.rb', line 379
-
-def caveats
-  self.class.caveats(@cask)
-end
-
-
- -
-

- - #check_arch_requirementsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-
-
# File 'cask/installer.rb', line 287
-
-def check_arch_requirements
-  return if @cask.depends_on.arch.nil?
-
-  @current_arch ||= { type: Hardware::CPU.type, bits: Hardware::CPU.bits }
-  return if @cask.depends_on.arch.any? do |arch|
-    arch[:type] == @current_arch[:type] &&
-    Array(arch[:bits]).include?(@current_arch[:bits])
-  end
-
-  raise CaskError,
-        "Cask #{@cask} depends on hardware architecture being one of " \
-        "[#{@cask.depends_on.arch.map(&:to_s).join(", ")}], " \
-        "but you are running #{@current_arch}."
-end
-
-
- -
-

- - #check_conflictsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-
-
# File 'cask/installer.rb', line 146
-
-def check_conflicts
-  return unless @cask.conflicts_with
-
-  @cask.conflicts_with[:cask].each do |conflicting_cask|
-    if (conflicting_cask_tap_with_token = Tap.with_cask_token(conflicting_cask))
-      conflicting_cask_tap, = conflicting_cask_tap_with_token
-      next unless conflicting_cask_tap.installed?
-    end
-
-    conflicting_cask = CaskLoader.load(conflicting_cask)
-    raise CaskConflictError.new(@cask, conflicting_cask) if conflicting_cask.installed?
-  rescue CaskUnavailableError
-    next # Ignore conflicting Casks that do not exist.
-  end
-end
-
-
- -
-

- - #check_deprecate_disableObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-
-
# File 'cask/installer.rb', line 130
-
-def check_deprecate_disable
-  deprecate_disable_type = DeprecateDisable.type(@cask)
-  return if deprecate_disable_type.nil?
-
-  message = DeprecateDisable.message(@cask)
-  message_full = "#{@cask.token} has been #{message}"
-
-  case deprecate_disable_type
-  when :deprecated
-    opoo message_full
-  when :disabled
-    GitHub::Actions.puts_annotation_if_env_set(:error, message)
-    raise CaskCannotBeInstalledError.new(@cask, message)
-  end
-end
-
-
- -
-

- - #check_macos_requirementsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-280
-281
-282
-283
-284
-285
-
-
# File 'cask/installer.rb', line 280
-
-def check_macos_requirements
-  return unless @cask.depends_on.macos
-  return if @cask.depends_on.macos.satisfied?
-
-  raise CaskError, @cask.depends_on.macos.message(type: :cask)
-end
-
-
- -
-

- - #check_requirementsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-275
-276
-277
-278
-
-
# File 'cask/installer.rb', line 275
-
-def check_requirements
-  check_macos_requirements
-  check_arch_requirements
-end
-
-
- -
-

- - #download(quiet: nil, timeout: nil) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - quiet - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - timeout - - - (Integer, Float, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-184
-185
-186
-187
-188
-
-
# File 'cask/installer.rb', line 184
-
-def download(quiet: nil, timeout: nil)
-  # Store cask download path in cask to prevent multiple downloads in a row when checking if it's outdated
-  @cask.download ||= downloader.fetch(quiet:, verify_download_integrity: @verify_download_integrity,
-                                      timeout:)
-end
-
-
- -
-

- - #downloaderDownload - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-179
-180
-181
-
-
# File 'cask/installer.rb', line 179
-
-def downloader
-  @downloader ||= Download.new(@cask, quarantine: quarantine?)
-end
-
-
- -
-

- - #extract_primary_container(to: @cask.staged_path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-
-
# File 'cask/installer.rb', line 207
-
-def extract_primary_container(to: @cask.staged_path)
-  odebug "Extracting primary container"
-
-  odebug "Using container class #{primary_container.class} for #{primary_container.path}"
-
-  basename = downloader.basename
-
-  if (nested_container = @cask.container&.nested)
-    Dir.mktmpdir("cask-installer", HOMEBREW_TEMP) do |tmpdir|
-      tmpdir = Pathname(tmpdir)
-      primary_container.extract(to: tmpdir, basename:, verbose: verbose?)
-
-      FileUtils.chmod_R "+rw", tmpdir/nested_container, force: true, verbose: verbose?
-
-      UnpackStrategy.detect(tmpdir/nested_container, merge_xattrs: true)
-                    .extract_nestedly(to:, verbose: verbose?)
-    end
-  else
-    primary_container.extract_nestedly(to:, basename:, verbose: verbose?)
-  end
-
-  return unless quarantine?
-  return unless Quarantine.available?
-
-  Quarantine.propagate(from: primary_container.path, to:)
-end
-
-
- -
-

- - #fetch(quiet: nil, timeout: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - quiet - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - timeout - - - (Integer, Float, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-
-
# File 'cask/installer.rb', line 62
-
-def fetch(quiet: nil, timeout: nil)
-  odebug "Cask::Installer#fetch"
-
-  load_cask_from_source_api! if @cask.loaded_from_api? && @cask.caskfile_only?
-  verify_has_sha if require_sha? && !force?
-  check_requirements
-
-  download(quiet:, timeout:)
-
-  satisfy_cask_and_formula_dependencies
-
-  forbidden_tap_check
-  forbidden_cask_and_formula_check
-end
-
-
- -
-

- - #finalize_upgradeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-456
-457
-458
-459
-460
-461
-462
-
-
# File 'cask/installer.rb', line 456
-
-def finalize_upgrade
-  ohai "Purging files for version #{@cask.version} of Cask #{@cask}"
-
-  purge_backed_up_versioned_files
-
-  puts summary
-end
-
-
- -
-

- - #forbidden_cask_and_formula_checkvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-614
-615
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-638
-639
-640
-641
-642
-643
-644
-645
-646
-647
-648
-649
-650
-651
-652
-653
-654
-655
-656
-657
-658
-659
-660
-661
-662
-663
-664
-665
-666
-667
-668
-669
-
-
# File 'cask/installer.rb', line 614
-
-def forbidden_cask_and_formula_check
-  forbidden_formulae = Set.new(Homebrew::EnvConfig.forbidden_formulae.to_s.split)
-  forbidden_casks = Set.new(Homebrew::EnvConfig.forbidden_casks.to_s.split)
-  return if forbidden_formulae.blank? && forbidden_casks.blank?
-
-  owner = Homebrew::EnvConfig.forbidden_owner
-  owner_contact = if (contact = Homebrew::EnvConfig.forbidden_owner_contact.presence)
-    "\n#{contact}"
-  end
-
-  unless skip_cask_deps?
-    cask_and_formula_dependencies.each do |dep_cask_or_formula|
-      dep_name, dep_type, variable = if dep_cask_or_formula.is_a?(Cask) && forbidden_casks.present?
-        dep_cask = dep_cask_or_formula
-        dep_cask_name = if forbidden_casks.include?(dep_cask.token)
-          dep_cask.token
-        elsif dep_cask.tap.present? &&
-              forbidden_casks.include?(dep_cask.full_name)
-          dep_cask.full_name
-        end
-        [dep_cask_name, "cask", "HOMEBREW_FORBIDDEN_CASKS"]
-      elsif dep_cask_or_formula.is_a?(Formula) && forbidden_formulae.present?
-        dep_formula = dep_cask_or_formula
-        formula_name = if forbidden_formulae.include?(dep_formula.name)
-          dep_formula.name
-        elsif dep_formula.tap.present? &&
-              forbidden_formulae.include?(dep_formula.full_name)
-          dep_formula.full_name
-        end
-        [formula_name, "formula", "HOMEBREW_FORBIDDEN_FORMULAE"]
-      end
-      next if dep_name.blank?
-
-      raise CaskCannotBeInstalledError.new(@cask, <<~EOS
-        The installation of #{@cask} has a dependency #{dep_name}
-        but the #{dep_name} #{dep_type} was forbidden by #{owner} in `#{variable}`.#{owner_contact}
-      EOS
-      )
-    end
-  end
-  return if forbidden_casks.blank?
-
-  cask_name = if forbidden_casks.include?(@cask.token)
-    @cask.token
-  elsif forbidden_casks.include?(@cask.full_name)
-    @cask.full_name
-  else
-    return
-  end
-
-  raise CaskCannotBeInstalledError.new(@cask, <<~EOS
-    The installation of #{cask_name} was forbidden by #{owner}
-    in `HOMEBREW_FORBIDDEN_CASKS`.#{owner_contact}
-  EOS
-  )
-end
-
-
- -
-

- - #forbidden_tap_checkvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-592
-593
-594
-595
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-
-
# File 'cask/installer.rb', line 575
-
-def forbidden_tap_check
-  return if Tap.allowed_taps.blank? && Tap.forbidden_taps.blank?
-
-  owner = Homebrew::EnvConfig.forbidden_owner
-  owner_contact = if (contact = Homebrew::EnvConfig.forbidden_owner_contact.presence)
-    "\n#{contact}"
-  end
-
-  unless skip_cask_deps?
-    cask_and_formula_dependencies.each do |cask_or_formula|
-      dep_tap = cask_or_formula.tap
-      next if dep_tap.blank? || (dep_tap.allowed_by_env? && !dep_tap.forbidden_by_env?)
-
-      dep_full_name = cask_or_formula.full_name
-      error_message = +"The installation of #{@cask} has a dependency #{dep_full_name}\n" \
-                       "from the #{dep_tap} tap but #{owner} "
-      error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless dep_tap.allowed_by_env?
-      error_message << " and\n" if !dep_tap.allowed_by_env? && dep_tap.forbidden_by_env?
-      error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if dep_tap.forbidden_by_env?
-      error_message << ".#{owner_contact}"
-
-      raise CaskCannotBeInstalledError.new(@cask, error_message)
-    end
-  end
-
-  cask_tap = @cask.tap
-  return if cask_tap.blank? || (cask_tap.allowed_by_env? && !cask_tap.forbidden_by_env?)
-
-  error_message = +"The installation of #{@cask.full_name} has the tap #{cask_tap}\n" \
-                   "but #{owner} "
-  error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless cask_tap.allowed_by_env?
-  error_message << " and\n" if !cask_tap.allowed_by_env? && cask_tap.forbidden_by_env?
-  error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if cask_tap.forbidden_by_env?
-  error_message << ".#{owner_contact}"
-
-  raise CaskCannotBeInstalledError.new(@cask, error_message)
-end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-321
-
-
# File 'sorbet/rbi/parlour.rbi', line 321
-
-def force?; end
-
-
- -
-

- - #gain_permissions_remove(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-526
-527
-528
-
-
# File 'cask/installer.rb', line 526
-
-def gain_permissions_remove(path)
-  Utils.gain_permissions_remove(path, command: @command)
-end
-
-
- -
-

- - #installObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
-
# File 'cask/installer.rb', line 89
-
-def install
-  start_time = Time.now
-  odebug "Cask::Installer#install"
-
-  Migrator.migrate_if_needed(@cask)
-
-  old_config = @cask.config
-  predecessor = @cask if reinstall? && @cask.installed?
-
-  check_deprecate_disable
-  check_conflicts
-
-  print caveats
-  fetch
-  uninstall_existing_cask if reinstall?
-
-  backup if force? && @cask.staged_path.exist? && @cask..exist?
-
-  oh1 "Installing Cask #{Formatter.identifier(@cask)}"
-  opoo "macOS's Gatekeeper has been disabled for this Cask" unless quarantine?
-  stage
-
-  @cask.config = @cask.default_config.merge(old_config)
-
-  install_artifacts(predecessor:)
-
-  if (tap = @cask.tap) && tap.should_report_analytics?
-    ::Utils::Analytics.report_package_event(:cask_install, package_name: @cask.token, tap_name: tap.name,
-on_request: true)
-  end
-
-  purge_backed_up_versioned_files
-
-  puts summary
-  end_time = Time.now
-  Homebrew.messages.package_installed(@cask.token, end_time - start_time)
-rescue
-  restore_backup
-  raise
-end
-
-
- -
-

- - #install_artifacts(predecessor: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - predecessor - - - (Cask, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-
-
# File 'cask/installer.rb', line 235
-
-def install_artifacts(predecessor: nil)
-  artifacts = @cask.artifacts
-  already_installed_artifacts = []
-
-  odebug "Installing artifacts"
-
-  artifacts.each do |artifact|
-    next unless artifact.respond_to?(:install_phase)
-
-    odebug "Installing artifact of class #{artifact.class}"
-
-    next if artifact.is_a?(Artifact::Binary) && !binaries?
-
-    artifact.install_phase(
-      command: @command, verbose: verbose?, adopt: adopt?, force: force?, predecessor:,
-    )
-    already_installed_artifacts.unshift(artifact)
-  end
-
-  save_config_file
-  save_download_sha if @cask.version.latest?
-rescue => e
-  begin
-    already_installed_artifacts&.each do |artifact|
-      if artifact.respond_to?(:uninstall_phase)
-        odebug "Reverting installation of artifact of class #{artifact.class}"
-        artifact.uninstall_phase(command: @command, verbose: verbose?, force: force?)
-      end
-
-      next unless artifact.respond_to?(:post_uninstall_phase)
-
-      odebug "Reverting installation of artifact of class #{artifact.class}"
-      artifact.post_uninstall_phase(command: @command, verbose: verbose?, force: force?)
-    end
-  ensure
-    purge_versioned_files
-    raise e
-  end
-end
-
-
- -
-

- - #installed_as_dependency?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-345
-
-
# File 'sorbet/rbi/parlour.rbi', line 345
-
-def installed_as_dependency?; end
-
-
- -
-

- - #metadata_subdirObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-383
-384
-385
-
-
# File 'cask/installer.rb', line 383
-
-def 
-  @metadata_subdir ||= @cask.("Casks", timestamp: :now, create: true)
-end
-
-
- -
-

- - #missing_cask_and_formula_dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-
-
# File 'cask/installer.rb', line 320
-
-def missing_cask_and_formula_dependencies
-  cask_and_formula_dependencies.reject do |cask_or_formula|
-    case cask_or_formula
-    when Formula
-      cask_or_formula.any_version_installed? && cask_or_formula.optlinked?
-    when Cask
-      cask_or_formula.installed?
-    end
-  end
-end
-
-
- -
-

- - #primary_containerObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-200
-201
-202
-203
-204
-205
-
-
# File 'cask/installer.rb', line 200
-
-def primary_container
-  @primary_container ||= begin
-    downloaded_path = download(quiet: true)
-    UnpackStrategy.detect(downloaded_path, type: @cask.container&.type, merge_xattrs: true)
-  end
-end
-
-
- -
-

- - #purge_backed_up_versioned_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-530
-531
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-
-
# File 'cask/installer.rb', line 530
-
-def purge_backed_up_versioned_files
-  # versioned staged distribution
-  gain_permissions_remove(backup_path) if backup_path&.exist?
-
-  # Homebrew Cask metadata
-  return unless .directory?
-
-  .children.each do |subdir|
-    gain_permissions_remove(subdir)
-  end
-  .rmdir_if_possible
-end
-
-
- -
-

- - #purge_caskroom_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-569
-570
-571
-572
-
-
# File 'cask/installer.rb', line 569
-
-def purge_caskroom_path
-  odebug "Purging all staged versions of Cask #{@cask}"
-  gain_permissions_remove(@cask.caskroom_path)
-end
-
-
- -
-

- - #purge_versioned_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-567
-
-
# File 'cask/installer.rb', line 543
-
-def purge_versioned_files
-  ohai "Purging files for version #{@cask.version} of Cask #{@cask}"
-
-  # versioned staged distribution
-  gain_permissions_remove(@cask.staged_path) if @cask.staged_path&.exist?
-
-  # Homebrew Cask metadata
-  if @cask..directory?
-    @cask..children.each do |subdir|
-      gain_permissions_remove(subdir)
-    end
-
-    @cask..rmdir_if_possible
-  end
-  @cask..rmdir_if_possible unless upgrade?
-
-  # toplevel staged distribution
-  @cask.caskroom_path.rmdir_if_possible unless upgrade?
-
-  # Remove symlinks for renamed casks if they are now broken.
-  @cask.old_tokens.each do |old_token|
-    old_caskroom_path = Caskroom.path/old_token
-    FileUtils.rm old_caskroom_path if old_caskroom_path.symlink? && !old_caskroom_path.exist?
-  end
-end
-
-
- -
-

- - #quarantine?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-348
-
-
# File 'sorbet/rbi/parlour.rbi', line 348
-
-def quarantine?; end
-
-
- -
-

- - #quiet?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-351
-
-
# File 'sorbet/rbi/parlour.rbi', line 351
-
-def quiet?; end
-
-
- -
-

- - #reinstall?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-333
-
-
# File 'sorbet/rbi/parlour.rbi', line 333
-
-def reinstall?; end
-
-
- -
-

- - #remove_config_fileObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-418
-419
-420
-421
-
-
# File 'cask/installer.rb', line 418
-
-def remove_config_file
-  FileUtils.rm_f @cask.config_path
-  @cask.config_path.parent.rmdir_if_possible
-end
-
-
- -
-

- - #remove_download_shaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-423
-424
-425
-426
-
-
# File 'cask/installer.rb', line 423
-
-def remove_download_sha
-  FileUtils.rm_f @cask.download_sha_path
-  @cask.download_sha_path.parent.rmdir_if_possible
-end
-
-
- -
-

- - #require_sha?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-330
-
-
# File 'sorbet/rbi/parlour.rbi', line 330
-
-def require_sha?; end
-
-
- -
-

- - #restore_backupObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-439
-440
-441
-442
-443
-444
-445
-446
-447
-
-
# File 'cask/installer.rb', line 439
-
-def restore_backup
-  return if !backup_path.directory? || !.directory?
-
-  @cask.staged_path.rmtree if @cask.staged_path.exist?
-  @cask..rmtree if @cask..exist?
-
-  backup_path.rename @cask.staged_path
-  .rename @cask.
-end
-
-
- -
-

- - #revert_upgrade(predecessor:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - predecessor - - - (Cask) - - - -
  • - -
- - -
- - - - -
-
-
-
-450
-451
-452
-453
-454
-
-
# File 'cask/installer.rb', line 450
-
-def revert_upgrade(predecessor:)
-  opoo "Reverting upgrade for Cask #{@cask}"
-  restore_backup
-  install_artifacts(predecessor:)
-end
-
-
- -
-

- - #satisfy_cask_and_formula_dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-
-
# File 'cask/installer.rb', line 331
-
-def satisfy_cask_and_formula_dependencies
-  return if installed_as_dependency?
-
-  formulae_and_casks = cask_and_formula_dependencies
-
-  return if formulae_and_casks.empty?
-
-  missing_formulae_and_casks = missing_cask_and_formula_dependencies
-
-  if missing_formulae_and_casks.empty?
-    puts "All dependencies satisfied."
-    return
-  end
-
-  ohai "Installing dependencies: #{missing_formulae_and_casks.map(&:to_s).join(", ")}"
-  missing_formulae_and_casks.each do |cask_or_formula|
-    if cask_or_formula.is_a?(Cask)
-      if skip_cask_deps?
-        opoo "`--skip-cask-deps` is set; skipping installation of #{cask_or_formula}."
-        next
-      end
-
-      Installer.new(
-        cask_or_formula,
-        adopt:                   adopt?,
-        binaries:                binaries?,
-        verbose:                 verbose?,
-        installed_as_dependency: true,
-        force:                   false,
-      ).install
-    else
-      fi = FormulaInstaller.new(
-        cask_or_formula,
-        **{
-          show_header:             true,
-          installed_as_dependency: true,
-          installed_on_request:    false,
-          verbose:                 verbose?,
-        }.compact,
-      )
-      fi.prelude
-      fi.fetch
-      fi.install
-      fi.finish
-    end
-  end
-end
-
-
- -
-

- - #save_caskfileObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-387
-388
-389
-390
-391
-392
-393
-394
-395
-
-
# File 'cask/installer.rb', line 387
-
-def save_caskfile
-  old_savedir = @cask.
-
-  return if @cask.source.blank?
-
-  extension = @cask.loaded_from_api? ? "json" : "rb"
-  (/"#{@cask.token}.#{extension}").write @cask.source
-  old_savedir&.rmtree
-end
-
-
- -
-

- - #save_config_fileObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-397
-398
-399
-
-
# File 'cask/installer.rb', line 397
-
-def save_config_file
-  @cask.config_path.atomic_write(@cask.config.to_json)
-end
-
-
- -
-

- - #save_download_shaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-401
-402
-403
-
-
# File 'cask/installer.rb', line 401
-
-def save_download_sha
-  @cask.download_sha_path.atomic_write(@cask.new_download_sha) if @cask.checksumable?
-end
-
-
- -
-

- - #skip_cask_deps?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-327
-
-
# File 'sorbet/rbi/parlour.rbi', line 327
-
-def skip_cask_deps?; end
-
-
- -
-

- - #stageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-
-
# File 'cask/installer.rb', line 77
-
-def stage
-  odebug "Cask::Installer#stage"
-
-  Caskroom.ensure_caskroom_exists
-
-  extract_primary_container
-  save_caskfile
-rescue => e
-  purge_versioned_files
-  raise e
-end
-
-
- -
-

- - #start_upgrade(successor:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - successor - - - (Cask, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-429
-430
-431
-432
-
-
# File 'cask/installer.rb', line 429
-
-def start_upgrade(successor:)
-  uninstall_artifacts(successor:)
-  backup
-end
-
-
- -
-

- - #summaryString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-171
-172
-173
-174
-175
-176
-
-
# File 'cask/installer.rb', line 171
-
-def summary
-  s = +""
-  s << "#{Homebrew::EnvConfig.install_badge}  " unless Homebrew::EnvConfig.no_emoji?
-  s << "#{@cask} was successfully #{upgrade? ? "upgraded" : "installed"}!"
-  s.freeze
-end
-
-
- -
-

- - #uninstall(successor: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - successor - - - (Cask, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-
-
# File 'cask/installer.rb', line 406
-
-def uninstall(successor: nil)
-  load_installed_caskfile!
-  oh1 "Uninstalling Cask #{Formatter.identifier(@cask)}"
-  uninstall_artifacts(clear: true, successor:)
-  if !reinstall? && !upgrade?
-    remove_download_sha
-    remove_config_file
-  end
-  purge_versioned_files
-  purge_caskroom_path if force?
-end
-
-
- -
-

- - #uninstall_artifacts(clear: false, successor: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - clear - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - successor - - - (Cask, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-
-
# File 'cask/installer.rb', line 465
-
-def uninstall_artifacts(clear: false, successor: nil)
-  artifacts = @cask.artifacts
-
-  odebug "Uninstalling artifacts"
-  odebug "#{::Utils.pluralize("artifact", artifacts.length, include_count: true)} defined", artifacts
-
-  artifacts.each do |artifact|
-    if artifact.respond_to?(:uninstall_phase)
-      odebug "Uninstalling artifact of class #{artifact.class}"
-      artifact.uninstall_phase(
-        command:   @command,
-        verbose:   verbose?,
-        skip:      clear,
-        force:     force?,
-        successor:,
-        upgrade:   upgrade?,
-        reinstall: reinstall?,
-      )
-    end
-
-    next unless artifact.respond_to?(:post_uninstall_phase)
-
-    odebug "Post-uninstalling artifact of class #{artifact.class}"
-    artifact.post_uninstall_phase(
-      command:   @command,
-      verbose:   verbose?,
-      skip:      clear,
-      force:     force?,
-      successor:,
-    )
-  end
-end
-
-
- -
-

- - #uninstall_existing_caskObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-162
-163
-164
-165
-166
-167
-168
-
-
# File 'cask/installer.rb', line 162
-
-def uninstall_existing_cask
-  return unless @cask.installed?
-
-  # Always force uninstallation, ignore method parameter
-  cask_installer = Installer.new(@cask, verbose: verbose?, force: true, upgrade: upgrade?, reinstall: true)
-  zap? ? cask_installer.zap : cask_installer.uninstall(successor: @cask)
-end
-
-
- -
-

- - #upgrade?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-336
-
-
# File 'sorbet/rbi/parlour.rbi', line 336
-
-def upgrade?; end
-
-
- -
-

- - #verbose?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-339
-
-
# File 'sorbet/rbi/parlour.rbi', line 339
-
-def verbose?; end
-
-
- -
-

- - #verify_has_shaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-190
-191
-192
-193
-194
-195
-196
-197
-198
-
-
# File 'cask/installer.rb', line 190
-
-def verify_has_sha
-  odebug "Checking cask has checksum"
-  return if @cask.sha256 != :no_check
-
-  raise CaskError, <<~EOS
-    Cask '#{@cask}' does not have a sha256 checksum defined and was not installed.
-    This means you have the #{Formatter.identifier("--require-sha")} option set, perhaps in your HOMEBREW_CASK_OPTS.
-  EOS
-end
-
-
- -
-

- - #zapObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-
-
# File 'cask/installer.rb', line 498
-
-def zap
-  load_installed_caskfile!
-  ohai "Implied `brew uninstall --cask #{@cask}`"
-  uninstall_artifacts
-  if (zap_stanzas = @cask.artifacts.select { |a| a.is_a?(Artifact::Zap) }).empty?
-    opoo "No zap stanza present for Cask '#{@cask}'"
-  else
-    ohai "Dispatching zap stanza"
-    zap_stanzas.each do |stanza|
-      stanza.zap_phase(command: @command, verbose: verbose?, force: force?)
-    end
-  end
-  ohai "Removing all staged versions of Cask '#{@cask}'"
-  purge_caskroom_path
-end
-
-
- -
-

- - #zap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-342
-
-
# File 'sorbet/rbi/parlour.rbi', line 342
-
-def zap?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/List.html b/docs/Cask/List.html deleted file mode 100644 index a35bbd78d..000000000 --- a/docs/Cask/List.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - - Class: Cask::List - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::List - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/list.rb
-
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .format_versioned(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-44
-45
-46
-
-
# File 'cask/list.rb', line 44
-
-def self.format_versioned(cask)
-  "#{cask}#{cask.installed_version&.prepend(" ")}"
-end
-
-
- -
-

- - .list_artifacts(cask) ⇒ Object - - - - - -

- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-
-
# File 'cask/list.rb', line 30
-
-def self.list_artifacts(cask)
-  cask.artifacts.group_by(&:class).sort_by { |klass, _| klass.english_name }.each do |klass, artifacts|
-    next if [Artifact::Uninstall, Artifact::Zap].include? klass
-
-    ohai klass.english_name
-    artifacts.each do |artifact|
-      puts artifact.summarize_installed if artifact.respond_to?(:summarize_installed)
-      next if artifact.respond_to?(:summarize_installed)
-
-      puts artifact
-    end
-  end
-end
-
-
- -
-

- - .list_casks(*casks, one: false, full_name: false, versions: false) ⇒ Object - - - - - -

- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-
-
# File 'cask/list.rb', line 8
-
-def self.list_casks(*casks, one: false, full_name: false, versions: false)
-  output = if casks.any?
-    casks.each do |cask|
-      raise CaskNotInstalledError, cask unless cask.installed?
-    end
-  else
-    Caskroom.casks
-  end
-
-  if one
-    puts output.map(&:to_s)
-  elsif full_name
-    puts output.map(&:full_name).sort(&tap_and_name_comparison)
-  elsif versions
-    puts output.map { format_versioned(_1) }
-  elsif !output.empty? && casks.any?
-    output.map { list_artifacts(_1) }
-  elsif !output.empty?
-    puts Formatter.columns(output.map(&:to_s))
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Metadata.html b/docs/Cask/Metadata.html deleted file mode 100644 index 354865083..000000000 --- a/docs/Cask/Metadata.html +++ /dev/null @@ -1,560 +0,0 @@ - - - - - - - Module: Cask::Metadata - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Metadata - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Cask
-
- - - -
-
Defined in:
-
cask/metadata.rb,
- cask/metadata.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for reading and writing cask metadata.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METADATA_SUBDIR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
".metadata"
- -
TIMESTAMP_FORMAT = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"%Y%m%d%H%M%S.%L"
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #metadata_main_container_path(caskroom_path: self.caskroom_path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'cask/metadata.rb', line 10
-
-def (caskroom_path: self.caskroom_path)
-  caskroom_path.join(METADATA_SUBDIR)
-end
-
-
- -
-

- - #metadata_subdir(leaf, version: self.version, timestamp: :latest, create: false, caskroom_path: self.caskroom_path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-
-
# File 'cask/metadata.rb', line 41
-
-def (leaf, version: self.version, timestamp: :latest, create: false,
-                    caskroom_path: self.caskroom_path)
-  raise CaskError, "Cannot create metadata subdir when timestamp is :latest." if create && timestamp == :latest
-  raise CaskError, "Cannot create metadata subdir for empty leaf." if !leaf.respond_to?(:empty?) || leaf.empty?
-
-  parent = (version:, timestamp:, create:,
-                                     caskroom_path:)
-
-  return if parent.nil?
-
-  subdir = parent.join(leaf)
-
-  if create && !subdir.directory?
-    odebug "Creating metadata subdirectory: #{subdir}"
-    subdir.mkpath
-  end
-
-  subdir
-end
-
-
- -
-

- - #metadata_timestamped_path(version: self.version, timestamp: :latest, create: false, caskroom_path: self.caskroom_path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
# File 'cask/metadata.rb', line 22
-
-def (version: self.version, timestamp: :latest, create: false,
-                              caskroom_path: self.caskroom_path)
-  raise CaskError, "Cannot create metadata path when timestamp is :latest." if create && timestamp == :latest
-
-  path = if timestamp == :latest
-    Pathname.glob((version:, caskroom_path:).join("*")).max
-  else
-    timestamp = new_timestamp if timestamp == :now
-    (version:, caskroom_path:).join(timestamp)
-  end
-
-  if create && !path.directory?
-    odebug "Creating metadata directory: #{path}"
-    path.mkpath
-  end
-
-  path
-end
-
-
- -
-

- - #metadata_versioned_path(version: self.version, caskroom_path: self.caskroom_path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-20
-
-
# File 'cask/metadata.rb', line 14
-
-def (version: self.version, caskroom_path: self.caskroom_path)
-  cask_version = (version || :unknown).to_s
-
-  raise CaskError, "Cannot create metadata path with empty version." if cask_version.empty?
-
-  (caskroom_path:).join(cask_version)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Migrator.html b/docs/Cask/Migrator.html deleted file mode 100644 index 9917d45e9..000000000 --- a/docs/Cask/Migrator.html +++ /dev/null @@ -1,810 +0,0 @@ - - - - - - - Class: Cask::Migrator - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Migrator - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/migrator.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(old_cask, new_cask) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - old_cask - - - (Cask) - - - -
  • - -
  • - - new_cask - - - (Cask) - - - -
  • - -
- -

Raises:

- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-
-
# File 'cask/migrator.rb', line 12
-
-def initialize(old_cask, new_cask)
-  raise CaskNotInstalledError, new_cask unless new_cask.installed?
-
-  @old_cask = old_cask
-  @new_cask = new_cask
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #new_caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'cask/migrator.rb', line 9
-
-def new_cask
-  @new_cask
-end
-
-
- - - -
-

- - #old_caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'cask/migrator.rb', line 9
-
-def old_cask
-  @old_cask
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .migrate_if_needed(new_cask, dry_run: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - new_cask - - - (Cask) - - - -
  • - -
  • - - dry_run - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'cask/migrator.rb', line 20
-
-def self.migrate_if_needed(new_cask, dry_run: false)
-  old_tokens = new_cask.old_tokens
-  return if old_tokens.empty?
-
-  return unless (installed_caskfile = new_cask.installed_caskfile)
-
-  old_cask = CaskLoader.load(installed_caskfile)
-  return if new_cask.token == old_cask.token
-
-  migrator = new(old_cask, new_cask)
-  migrator.migrate(dry_run:)
-end
-
-
- -
-

- - .replace_caskfile_token(path, old_token, new_token) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Pathname) - - - -
  • - -
  • - - old_token - - - (String) - - - -
  • - -
  • - - new_token - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-
-
# File 'cask/migrator.rb', line 72
-
-def self.replace_caskfile_token(path, old_token, new_token)
-  case path.extname
-  when ".rb"
-    ::Utils::Inreplace.inreplace path, /\A\s*cask\s+"#{Regexp.escape(old_token)}"/, "cask #{new_token.inspect}"
-  when ".json"
-    json = JSON.parse(path.read)
-    json["token"] = new_token
-    path.atomic_write json.to_json
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #migrate(dry_run: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - dry_run - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'cask/migrator.rb', line 34
-
-def migrate(dry_run: false)
-  old_token = old_cask.token
-  new_token = new_cask.token
-
-  old_caskroom_path = old_cask.caskroom_path
-  new_caskroom_path = new_cask.caskroom_path
-
-  old_installed_caskfile = old_cask.installed_caskfile.relative_path_from(old_caskroom_path)
-  new_installed_caskfile = old_installed_caskfile.dirname/old_installed_caskfile.basename.sub(
-    old_token,
-    new_token,
-  )
-
-  if dry_run
-    oh1 "Would migrate cask #{Formatter.identifier(old_token)} to #{Formatter.identifier(new_token)}"
-
-    puts "cp -r #{old_caskroom_path} #{new_caskroom_path}"
-    puts "mv #{new_caskroom_path}/#{old_installed_caskfile} #{new_caskroom_path}/#{new_installed_caskfile}"
-    puts "rm -r #{old_caskroom_path}"
-    puts "ln -s #{new_caskroom_path.basename} #{old_caskroom_path}"
-  else
-    oh1 "Migrating cask #{Formatter.identifier(old_token)} to #{Formatter.identifier(new_token)}"
-
-    begin
-      FileUtils.cp_r old_caskroom_path, new_caskroom_path
-      FileUtils.mv new_caskroom_path/old_installed_caskfile, new_caskroom_path/new_installed_caskfile
-      self.class.replace_caskfile_token(new_caskroom_path/new_installed_caskfile, old_token, new_token)
-    rescue => e
-      FileUtils.rm_rf new_caskroom_path
-      raise e
-    end
-
-    FileUtils.rm_r old_caskroom_path
-    FileUtils.ln_s new_caskroom_path.basename, old_caskroom_path
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/MultipleCaskErrors.html b/docs/Cask/MultipleCaskErrors.html deleted file mode 100644 index 508206cce..000000000 --- a/docs/Cask/MultipleCaskErrors.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - Exception: Cask::MultipleCaskErrors - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::MultipleCaskErrors - - - Private -

-
- -
-
Inherits:
-
- CaskError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Cask error containing multiple other errors.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(errors) ⇒ MultipleCaskErrors - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of MultipleCaskErrors.

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-
-
# File 'cask/exceptions.rb', line 10
-
-def initialize(errors)
-  super()
-
-  @errors = errors
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Pkg.html b/docs/Cask/Pkg.html deleted file mode 100644 index 25f1067c8..000000000 --- a/docs/Cask/Pkg.html +++ /dev/null @@ -1,1135 +0,0 @@ - - - - - - - Class: Cask::Pkg - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Pkg - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/pkg.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for uninstalling .pkg installers.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(package_id, command = SystemCommand) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - package_id - - - (String) - - - -
  • - -
  • - - command - - - (T.class_of(SystemCommand)) - - - (defaults to: SystemCommand) - - -
  • - -
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-
-
# File 'cask/pkg.rb', line 20
-
-def initialize(package_id, command = SystemCommand)
-  @package_id = package_id
-  @command = command
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #package_idString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'cask/pkg.rb', line 17
-
-def package_id
-  @package_id
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .all_matching(regexp, command) ⇒ Array<Pkg> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - regexp - - - (String) - - - -
  • - -
  • - - command - - - (T.class_of(SystemCommand)) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-
-
# File 'cask/pkg.rb', line 10
-
-def self.all_matching(regexp, command)
-  command.run("/usr/sbin/pkgutil", args: ["--pkgs=#{regexp}"]).stdout.split("\n").map do |package_id|
-    new(package_id.chomp, command)
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #forgetvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-65
-66
-67
-68
-
-
# File 'cask/pkg.rb', line 60
-
-def forget
-  odebug "Unregistering pkg receipt (aka forgetting)"
-  @command.run!(
-    "/usr/sbin/pkgutil",
-    args:         ["--forget", package_id],
-    sudo:         true,
-    sudo_as_root: true,
-  )
-end
-
-
- -
-

- - #infoObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-
-
# File 'cask/pkg.rb', line 99
-
-def info
-  @info ||= @command.run!("/usr/sbin/pkgutil", args: ["--pkg-info-plist", package_id])
-                    .plist
-end
-
-
- -
-

- - #pkgutil_bom_allArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-
-
# File 'cask/pkg.rb', line 86
-
-def pkgutil_bom_all
-  @pkgutil_bom_all ||= @command.run!("/usr/sbin/pkgutil", args: ["--files", package_id])
-                               .stdout
-                               .split("\n")
-                               .map { |path| root.join(path) }
-                               .reject { MacOS.undeletable?(_1) }
-end
-
-
- -
-

- - #pkgutil_bom_dirsArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-81
-82
-83
-
-
# File 'cask/pkg.rb', line 81
-
-def pkgutil_bom_dirs
-  @pkgutil_bom_dirs ||= pkgutil_bom_all.select(&:directory?) - pkgutil_bom_specials
-end
-
-
- -
-

- - #pkgutil_bom_filesArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'cask/pkg.rb', line 71
-
-def pkgutil_bom_files
-  @pkgutil_bom_files ||= pkgutil_bom_all.select(&:file?) - pkgutil_bom_specials
-end
-
-
- -
-

- - #pkgutil_bom_specialsArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-76
-77
-78
-
-
# File 'cask/pkg.rb', line 76
-
-def pkgutil_bom_specials
-  @pkgutil_bom_specials ||= pkgutil_bom_all.select { special?(_1) }
-end
-
-
- -
-

- - #rootPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-95
-96
-97
-
-
# File 'cask/pkg.rb', line 95
-
-def root
-  @root ||= Pathname.new(info.fetch("volume")).join(info.fetch("install-location"))
-end
-
-
- -
-

- - #uninstallvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'cask/pkg.rb', line 26
-
-def uninstall
-  unless pkgutil_bom_files.empty?
-    odebug "Deleting pkg files"
-    @command.run!(
-      "/usr/bin/xargs",
-      args:         ["-0", "--", "/bin/rm", "--"],
-      input:        pkgutil_bom_files.join("\0"),
-      sudo:         true,
-      sudo_as_root: true,
-    )
-  end
-
-  unless pkgutil_bom_specials.empty?
-    odebug "Deleting pkg symlinks and special files"
-    @command.run!(
-      "/usr/bin/xargs",
-      args:         ["-0", "--", "/bin/rm", "--"],
-      input:        pkgutil_bom_specials.join("\0"),
-      sudo:         true,
-      sudo_as_root: true,
-    )
-  end
-
-  unless pkgutil_bom_dirs.empty?
-    odebug "Deleting pkg directories"
-    rmdir(deepest_path_first(pkgutil_bom_dirs))
-  end
-
-  rmdir(root) unless MacOS.undeletable?(root)
-
-  forget
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Quarantine.html b/docs/Cask/Quarantine.html deleted file mode 100644 index 59134b205..000000000 --- a/docs/Cask/Quarantine.html +++ /dev/null @@ -1,1359 +0,0 @@ - - - - - - - Module: Cask::Quarantine - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Quarantine - - - Private -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
cask/quarantine.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for quarantining files.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
QUARANTINE_ATTRIBUTE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"com.apple.quarantine"
- -
QUARANTINE_SCRIPT = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_LIBRARY_PATH/"cask/utils/quarantine.swift").freeze
- -
COPY_XATTRS_SCRIPT = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_LIBRARY_PATH/"cask/utils/copy-xattrs.swift").freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .app_management_permissions_granted?(app:, command:) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Ensures that Homebrew has permission to update apps on macOS Ventura. -This may be granted either through the App Management toggle or the Full Disk Access toggle. -The system will only show a prompt for App Management, so we ask the user to grant that.

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-
-
# File 'cask/quarantine.rb', line 208
-
-def self.app_management_permissions_granted?(app:, command:)
-  return true unless app.directory?
-
-  # To get macOS to prompt the user for permissions, we need to actually attempt to
-  # modify a file in the app.
-  test_file = app/".homebrew-write-test"
-
-  # We can't use app.writable? here because that conflates several access checks,
-  # including both file ownership and whether system permissions are granted.
-  # Here we just want to check whether sudo would be needed.
-  looks_writable_without_sudo = if app.owned?
-    (app.lstat.mode & 0200) != 0
-  elsif app.grpowned?
-    (app.lstat.mode & 0020) != 0
-  else
-    (app.lstat.mode & 0002) != 0
-  end
-
-  if looks_writable_without_sudo
-    begin
-      File.write(test_file, "")
-      test_file.delete
-      return true
-    rescue Errno::EACCES, Errno::EPERM
-      # Using error handler below
-    end
-  else
-    begin
-      command.run!(
-        "touch",
-        args:         [
-          test_file,
-        ],
-        print_stderr: false,
-        sudo:         true,
-      )
-      command.run!(
-        "rm",
-        args:         [
-          test_file,
-        ],
-        print_stderr: false,
-        sudo:         true,
-      )
-      return true
-    rescue ErrorDuringExecution => e
-      # We only want to handle "touch" errors here; propagate "sudo" errors up
-      raise e unless e.stderr.include?("touch: #{test_file}: Operation not permitted")
-    end
-  end
-
-  opoo <<~EOF
-    Your terminal does not have App Management permissions, so Homebrew will delete and reinstall the app.
-    This may result in some configurations (like notification settings or location in the Dock/Launchpad) being lost.
-    To fix this, go to System Settings > Privacy & Security > App Management and add or enable your terminal.
-  EOF
-
-  false
-end
-
-
- -
-

- - .available?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-
-
# File 'cask/quarantine.rb', line 69
-
-def self.available?
-  @status ||= check_quarantine_support
-
-  @status == :quarantine_available
-end
-
-
- -
-

- - .cask!(cask: nil, download_path: nil, action: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-
-
# File 'cask/quarantine.rb', line 123
-
-def self.cask!(cask: nil, download_path: nil, action: true)
-  return if cask.nil? || download_path.nil?
-
-  return if detect(download_path)
-
-  odebug "Quarantining #{download_path}"
-
-  quarantiner = system_command(swift,
-                               args:         [
-                                 *swift_target_args,
-                                 QUARANTINE_SCRIPT,
-                                 download_path,
-                                 cask.url.to_s,
-                                 cask.homepage.to_s,
-                               ],
-                               print_stderr: false)
-
-  return if quarantiner.success?
-
-  case quarantiner.exit_status
-  when 2
-    raise CaskQuarantineError.new(download_path, "Insufficient parameters")
-  else
-    raise CaskQuarantineError.new(download_path, quarantiner.stderr)
-  end
-end
-
-
- -
-

- - .check_quarantine_supportSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-
-
# File 'cask/quarantine.rb', line 44
-
-def self.check_quarantine_support
-  odebug "Checking quarantine support"
-
-  if xattr.nil? || !system_command(xattr, args: ["-h"], print_stderr: false).success?
-    odebug "There's no working version of `xattr` on this system."
-    :xattr_broken
-  elsif swift.nil?
-    odebug "Swift is not available on this system."
-    :no_swift
-  else
-    api_check = system_command(swift,
-                               args:         [*swift_target_args, QUARANTINE_SCRIPT],
-                               print_stderr: false)
-
-    case api_check.exit_status
-    when 2
-      odebug "Quarantine is available."
-      :quarantine_available
-    else
-      odebug "Unknown support status"
-      :unknown
-    end
-  end
-end
-
-
- -
-

- - .copy_xattrs(from, to, command:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-
-
# File 'cask/quarantine.rb', line 189
-
-def self.copy_xattrs(from, to, command:)
-  odebug "Copying xattrs from #{from} to #{to}"
-
-  command.run!(
-    swift,
-    args: [
-      *swift_target_args,
-      COPY_XATTRS_SCRIPT,
-      from,
-      to,
-    ],
-    sudo: !to.writable?,
-  )
-end
-
-
- -
-

- - .detect(file) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-
-
# File 'cask/quarantine.rb', line 75
-
-def self.detect(file)
-  return if file.nil?
-
-  odebug "Verifying Gatekeeper status of #{file}"
-
-  quarantine_status = !status(file).empty?
-
-  odebug "#{file} is #{quarantine_status ? "quarantined" : "not quarantined"}"
-
-  quarantine_status
-end
-
-
- -
-

- - .propagate(from: nil, to: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-
-
# File 'cask/quarantine.rb', line 150
-
-def self.propagate(from: nil, to: nil)
-  return if from.nil? || to.nil?
-
-  raise CaskError, "#{from} was not quarantined properly." unless detect(from)
-
-  odebug "Propagating quarantine from #{from} to #{to}"
-
-  quarantine_status = toggle_no_translocation_bit(status(from))
-
-  resolved_paths = Pathname.glob(to/"**/*", File::FNM_DOTMATCH).reject(&:symlink?)
-
-  system_command!("/usr/bin/xargs",
-                  args:  [
-                    "-0",
-                    "--",
-                    "/bin/chmod",
-                    "-h",
-                    "u+w",
-                  ],
-                  input: resolved_paths.join("\0"))
-
-  quarantiner = system_command("/usr/bin/xargs",
-                               args:         [
-                                 "-0",
-                                 "--",
-                                 xattr,
-                                 "-w",
-                                 QUARANTINE_ATTRIBUTE,
-                                 quarantine_status,
-                               ],
-                               input:        resolved_paths.join("\0"),
-                               print_stderr: false)
-
-  return if quarantiner.success?
-
-  raise CaskQuarantinePropagationError.new(to, quarantiner.stderr)
-end
-
-
- -
-

- - .release!(download_path: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-
-
# File 'cask/quarantine.rb', line 105
-
-def self.release!(download_path: nil)
-  return unless detect(download_path)
-
-  odebug "Releasing #{download_path} from quarantine"
-
-  quarantiner = system_command(xattr,
-                               args:         [
-                                 "-d",
-                                 QUARANTINE_ATTRIBUTE,
-                                 download_path,
-                               ],
-                               print_stderr: false)
-
-  return if quarantiner.success?
-
-  raise CaskQuarantineReleaseError.new(download_path, quarantiner.stderr)
-end
-
-
- -
-

- - .status(file) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-87
-88
-89
-90
-91
-
-
# File 'cask/quarantine.rb', line 87
-
-def self.status(file)
-  system_command(xattr,
-                 args:         ["-p", QUARANTINE_ATTRIBUTE, file],
-                 print_stderr: false).stdout.rstrip
-end
-
-
- -
-

- - .toggle_no_translocation_bit(attribute) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-
-
# File 'cask/quarantine.rb', line 93
-
-def self.toggle_no_translocation_bit(attribute)
-  fields = attribute.split(";")
-
-  # Fields: status, epoch, download agent, event ID
-  # Let's toggle the app translocation bit, bit 8
-  # http://www.openradar.me/radar?id=5022734169931776
-
-  fields[0] = (fields[0].to_i(16) | 0x0100).to_s(16).rjust(4, "0")
-
-  fields.join(";")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Reinstall.html b/docs/Cask/Reinstall.html deleted file mode 100644 index 9c6cf2e1e..000000000 --- a/docs/Cask/Reinstall.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - Class: Cask::Reinstall - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Reinstall - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/reinstall.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .reinstall_casks(*casks, verbose: nil, force: nil, skip_cask_deps: nil, binaries: nil, require_sha: nil, quarantine: nil, zap: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'cask/reinstall.rb', line 6
-
-def self.reinstall_casks(
-  *casks,
-  verbose: nil,
-  force: nil,
-  skip_cask_deps: nil,
-  binaries: nil,
-  require_sha: nil,
-  quarantine: nil,
-  zap: nil
-)
-  require "cask/installer"
-
-  quarantine = true if quarantine.nil?
-
-  casks.each do |cask|
-    Installer.new(cask,
-                  binaries:,
-                  verbose:,
-                  force:,
-                  skip_cask_deps:,
-                  require_sha:,
-                  reinstall:      true,
-                  quarantine:,
-                  zap:).install
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Staged.html b/docs/Cask/Staged.html deleted file mode 100644 index ef1930f98..000000000 --- a/docs/Cask/Staged.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - Module: Cask::Staged - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Staged - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - -
-
Included in:
-
DSL::Postflight, DSL::Preflight, DSL::UninstallPreflight
-
- - - -
-
Defined in:
-
cask/staged.rb,
- cask/staged.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for staged casks.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
Paths = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.type_alias { T.any(String, Pathname, T::Array[T.any(String, Pathname)]) }
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Instance Method Details

- - -
-

- - #set_ownership(paths, user: T.must(User.current), group: "staff") ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - paths - - - (Paths) - - - -
  • - -
  • - - user - - - (String, User) - - - (defaults to: T.must(User.current)) - - -
  • - -
  • - - group - - - (String) - - - (defaults to: "staff") - - -
  • - -
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'cask/staged.rb', line 24
-
-def set_ownership(paths, user: T.must(User.current), group: "staff")
-  full_paths = remove_nonexistent(paths)
-  return if full_paths.empty?
-
-  ohai "Changing ownership of paths required by #{@cask} with sudo; the password may be necessary."
-  @command.run!("/usr/sbin/chown", args: ["-R", "--", "#{user}:#{group}", *full_paths],
-                                   sudo: true)
-end
-
-
- -
-

- - #set_permissions(paths, permissions_str) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'cask/staged.rb', line 15
-
-def set_permissions(paths, permissions_str)
-  full_paths = remove_nonexistent(paths)
-  return if full_paths.empty?
-
-  @command.run!("/bin/chmod", args: ["-R", "--", permissions_str, *full_paths],
-                              sudo: false)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/TapCaskAmbiguityError.html b/docs/Cask/TapCaskAmbiguityError.html deleted file mode 100644 index 41230610a..000000000 --- a/docs/Cask/TapCaskAmbiguityError.html +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - Exception: Cask::TapCaskAmbiguityError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::TapCaskAmbiguityError - - - Private -

-
- -
-
Inherits:
-
- CaskError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask with the same name is found in multiple taps.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(token, loaders) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
-
# File 'cask/exceptions.rb', line 121
-
-def initialize(token, loaders)
-  @loaders = loaders
-
-  taps = loaders.map(&:tap)
-  casks = taps.map { |tap| "#{tap}/#{token}" }
-  cask_list = casks.sort.map { |f| "\n       * #{f}" }.join
-
-  super <<~EOS
-    Cask #{token} exists in multiple taps:#{cask_list}
-
-    Please use the fully-qualified name (e.g. #{casks.first}) to refer to a specific Cask.
-  EOS
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #loadersArray<CaskLoader::FromNameLoader> (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-118
-119
-120
-
-
# File 'cask/exceptions.rb', line 118
-
-def loaders
-  @loaders
-end
-
-
- - - -
-

- - #tokenString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-115
-116
-117
-
-
# File 'cask/exceptions.rb', line 115
-
-def token
-  @token
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/TapCaskUnavailableError.html b/docs/Cask/TapCaskUnavailableError.html deleted file mode 100644 index 626a2f318..000000000 --- a/docs/Cask/TapCaskUnavailableError.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - Exception: Cask::TapCaskUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Cask::TapCaskUnavailableError - - - Private -

-
- -
-
Inherits:
-
- CaskUnavailableError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a cask in a specific tap is not available.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #tap ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from AbstractCaskErrorWithToken

-

#reason, #token

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(tap, token) ⇒ TapCaskUnavailableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapCaskUnavailableError.

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-
-
# File 'cask/exceptions.rb', line 99
-
-def initialize(tap, token)
-  super("#{tap}/#{token}")
-  @tap = tap
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #tapObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-97
-98
-99
-
-
# File 'cask/exceptions.rb', line 97
-
-def tap
-  @tap
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/URL.html b/docs/Cask/URL.html deleted file mode 100644 index 35aeb0933..000000000 --- a/docs/Cask/URL.html +++ /dev/null @@ -1,961 +0,0 @@ - - - - - - - Class: Cask::URL - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::URL - - - Private -

-
- -
-
Inherits:
-
- Delegator - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
cask/url.rb,
- cask/url.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class corresponding to the url stanza.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: BlockDSL, DSL - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- -
-

Constructor Details

- -
-

- - #initialize(uri = nil, verified: nil, using: nil, tag: nil, branch: nil, revisions: nil, revision: nil, trust_cert: nil, cookies: nil, referer: nil, header: nil, user_agent: nil, data: nil, only_path: nil, caller_location: T.must(caller_locations).fetch(0), dsl: nil, &block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - uri - - - (URI::Generic, String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - verified - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - using - - - (Class, Symbol, nil) - - - (defaults to: nil) - - -
  • - -
  • - - tag - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - branch - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - revisions - - - (Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - revision - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - trust_cert - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - cookies - - - (Hash{String => String}, nil) - - - (defaults to: nil) - - -
  • - -
  • - - referer - - - (URI::Generic, String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - header - - - (String, Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - user_agent - - - (Symbol, String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - data - - - (Hash{String => String}, nil) - - - (defaults to: nil) - - -
  • - -
  • - - only_path - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - caller_location - - - (Thread::Backtrace::Location) - - - (defaults to: T.must(caller_locations).fetch(0)) - - -
  • - -
  • - - dsl - - - (::Cask::DSL, nil) - - - (defaults to: nil) - - -
  • - -
  • - - block - - - (T.proc.params(arg0: T.all(String, BlockDSL::PageWithURL)) .returns(T.any(T.any(URI::Generic, String), [T.any(URI::Generic, String), Hash])), nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-
-
# File 'cask/url.rb', line 195
-
-def initialize(
-  uri = nil,
-  verified: nil,
-  using: nil,
-  tag: nil,
-  branch: nil,
-  revisions: nil,
-  revision: nil,
-  trust_cert: nil,
-  cookies: nil,
-  referer: nil,
-  header: nil,
-  user_agent: nil,
-  data: nil,
-  only_path: nil,
-  caller_location: T.must(caller_locations).fetch(0),
-  dsl: nil,
-  &block
-)
-  super(
-    if block
-      LazyObject.new do
-        uri2, options = *BlockDSL.new(uri, dsl: T.must(dsl), &block).call
-        options ||= {}
-        DSL.new(uri2, **options)
-      end
-    else
-      DSL.new(
-        T.must(uri),
-        verified:,
-        using:,
-        tag:,
-        branch:,
-        revisions:,
-        revision:,
-        trust_cert:,
-        cookies:,
-        referer:,
-        header:,
-        user_agent:,
-        data:,
-        only_path:,
-      )
-    end
-  )
-
-  @from_block = !block.nil?
-  @caller_location = caller_location
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #__getobj__Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-245
-246
-247
-
-
# File 'cask/url.rb', line 245
-
-def __getobj__
-  @dsl
-end
-
-
- -
-

- - #__setobj__(dsl) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-249
-250
-251
-
-
# File 'cask/url.rb', line 249
-
-def __setobj__(dsl)
-  @dsl = dsl
-end
-
-
- -
-

- - #from_block?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-281
-282
-283
-
-
# File 'cask/url.rb', line 281
-
-def from_block?
-  @from_block
-end
-
-
- -
-

- - #locationHomebrew::SourceLocation - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-254
-255
-256
-
-
# File 'cask/url.rb', line 254
-
-def location
-  Homebrew::SourceLocation.new(@caller_location.lineno, raw_url_line&.index("url"))
-end
-
-
- -
-

- - #unversioned?(ignore_major_version: false) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ignore_major_version - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-270
-271
-272
-273
-274
-275
-276
-277
-278
-
-
# File 'cask/url.rb', line 270
-
-def unversioned?(ignore_major_version: false)
-  interpolated_url = raw_url_line&.then { |line| line[/url\s+"([^"]+)"/, 1] }
-
-  return false unless interpolated_url
-
-  interpolated_url = interpolated_url.gsub(/\#{\s*version\s*\.major\s*}/, "") if ignore_major_version
-
-  interpolated_url.exclude?('#{')
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/URL/BlockDSL.html b/docs/Cask/URL/BlockDSL.html deleted file mode 100644 index 851de454e..000000000 --- a/docs/Cask/URL/BlockDSL.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - Class: Cask::URL::BlockDSL - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::URL::BlockDSL - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/url.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: PageWithURL - - - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(uri, dsl:, &block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - uri - - - (URI::Generic, String, nil) - - - -
  • - -
  • - - dsl - - - (::Cask::DSL) - - - -
  • - -
  • - - block - - - (T.proc.params(arg0: T.all(String, PageWithURL)) .returns(T.any(T.any(URI::Generic, String), [T.any(URI::Generic, String), Hash]))) - - - -
  • - -
- - -
- - - - -
-
-
-
-116
-117
-118
-119
-120
-
-
# File 'cask/url.rb', line 116
-
-def initialize(uri, dsl:, &block)
-  @uri = uri
-  @dsl = dsl
-  @block = block
-end
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - -

- -
-

- - #method_missing(method, *args, &block) ⇒ Object (private) - - - - - -

-
-

This allows calling DSL methods from inside a url block.

- - -
-
-
- - -
- - - - -
-
-
-
-156
-157
-158
-159
-160
-161
-162
-
-
# File 'cask/url.rb', line 156
-
-def method_missing(method, *args, &block)
-  if @dsl.respond_to?(method)
-    T.unsafe(@dsl).public_send(method, *args, &block)
-  else
-    super
-  end
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #callURI::Generic, ... - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
-
# File 'cask/url.rb', line 123
-
-def call
-  if @uri
-    result = ::Utils::Curl.curl_output("--fail", "--silent", "--location", @uri)
-    result.assert_success!
-
-    page = result.stdout
-    page.extend PageWithURL
-    page.url = URI(@uri)
-
-    instance_exec(page, &@block)
-  else
-    instance_exec(&@block)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/URL/BlockDSL/PageWithURL.html b/docs/Cask/URL/BlockDSL/PageWithURL.html deleted file mode 100644 index 73c672714..000000000 --- a/docs/Cask/URL/BlockDSL/PageWithURL.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - Module: Cask::URL::BlockDSL::PageWithURL - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::URL::BlockDSL::PageWithURL - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
cask/url.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Allow accessing the URL associated with page contents.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #url ⇒ URI::Generic - - - - - - - - - - - - - - -

    Get the URL of the fetched page.

    -
    - -
  • - - -
- - - - - -
-

Instance Attribute Details

- - - -
-

- - #urlURI::Generic - - - - - -

-
-

Get the URL of the fetched page.

- -

Example

- -
url "https://example.org/download" do |page|
-  file = page[/href="([^"]+.dmg)"/, 1]
-  URL.join(page.url, file)
-end
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (URI::Generic) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-106
-107
-
-
# File 'cask/url.rb', line 105
-
-def url
-  @url
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/URL/DSL.html b/docs/Cask/URL/DSL.html deleted file mode 100644 index 2a0ce9faf..000000000 --- a/docs/Cask/URL/DSL.html +++ /dev/null @@ -1,1565 +0,0 @@ - - - - - - - Class: Cask::URL::DSL - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::URL::DSL - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
cask/url.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(uri, verified: nil, using: nil, tag: nil, branch: nil, revisions: nil, revision: nil, trust_cert: nil, cookies: nil, referer: nil, header: nil, user_agent: nil, data: nil, only_path: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - uri - - - (URI::Generic, String) - - - -
  • - -
  • - - verified - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - using - - - (Class, Symbol, nil) - - - (defaults to: nil) - - -
  • - -
  • - - tag - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - branch - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - revisions - - - (Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - revision - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - trust_cert - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - cookies - - - (Hash{String => String}, nil) - - - (defaults to: nil) - - -
  • - -
  • - - referer - - - (URI::Generic, String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - header - - - (String, Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - user_agent - - - (Symbol, String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - data - - - (Hash{String => String}, nil) - - - (defaults to: nil) - - -
  • - -
  • - - only_path - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-
-
# File 'cask/url.rb', line 49
-
-def initialize(
-  uri,
-  verified: nil,
-  using: nil,
-  tag: nil,
-  branch: nil,
-  revisions: nil,
-  revision: nil,
-  trust_cert: nil,
-  cookies: nil,
-  referer: nil,
-  header: nil,
-  user_agent: nil,
-  data: nil,
-  only_path: nil
-)
-
-  @uri = URI(uri)
-
-  header = Array(header) unless header.nil?
-
-  specs = {}
-  specs[:verified]   = @verified   = verified
-  specs[:using]      = @using      = using
-  specs[:tag]        = @tag        = tag
-  specs[:branch]     = @branch     = branch
-  specs[:revisions]  = @revisions  = revisions
-  specs[:revision]   = @revision   = revision
-  specs[:trust_cert] = @trust_cert = trust_cert
-  specs[:cookies]    = @cookies    = cookies
-  specs[:referer]    = @referer    = referer
-  specs[:headers]    = @header     = header
-  specs[:user_agent] = @user_agent = user_agent || :default
-  specs[:data]       = @data       = data
-  specs[:only_path]  = @only_path  = only_path
-
-  @specs = specs.compact
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #branchObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def branch
-  @branch
-end
-
-
- - - -
-

- - #cookiesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def cookies
-  @cookies
-end
-
-
- - - -
-

- - #dataObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def data
-  @data
-end
-
-
- - - -
-

- - #headerObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def header
-  @header
-end
-
-
- - - -
-

- - #only_pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def only_path
-  @only_path
-end
-
-
- - - -
-

- - #refererObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def referer
-  @referer
-end
-
-
- - - -
-

- - #revisionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def revision
-  @revision
-end
-
-
- - - -
-

- - #revisionsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def revisions
-  @revisions
-end
-
-
- - - -
-

- - #specsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def specs
-  @specs
-end
-
-
- - - -
-

- - #tagObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def tag
-  @tag
-end
-
-
- - - -
-

- - #trust_certObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def trust_cert
-  @trust_cert
-end
-
-
- - - -
-

- - #uriObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def uri
-  @uri
-end
-
-
- - - -
-

- - #user_agentObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def user_agent
-  @user_agent
-end
-
-
- - - -
-

- - #usingObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def using
-  @using
-end
-
-
- - - -
-

- - #verifiedObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'cask/url.rb', line 11
-
-def verified
-  @verified
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Uninstall.html b/docs/Cask/Uninstall.html deleted file mode 100644 index 3f2d2e30f..000000000 --- a/docs/Cask/Uninstall.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - Class: Cask::Uninstall - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Uninstall - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/uninstall.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .uninstall_casks(*casks, binaries: nil, force: false, verbose: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'cask/uninstall.rb', line 6
-
-def self.uninstall_casks(*casks, binaries: nil, force: false, verbose: false)
-  require "cask/installer"
-
-  casks.each do |cask|
-    odebug "Uninstalling Cask #{cask}"
-
-    raise CaskNotInstalledError, cask if !cask.installed? && !force
-
-    Installer.new(cask, binaries:, force:, verbose:).uninstall
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Upgrade.html b/docs/Cask/Upgrade.html deleted file mode 100644 index e20be51fe..000000000 --- a/docs/Cask/Upgrade.html +++ /dev/null @@ -1,900 +0,0 @@ - - - - - - - Class: Cask::Upgrade - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cask::Upgrade - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask/upgrade.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .upgrade_cask(old_cask, new_cask, binaries:, force:, quarantine:, require_sha:, skip_cask_deps:, verbose:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - old_cask - - - (Cask) - - - -
  • - -
  • - - new_cask - - - (Cask) - - - -
  • - -
  • - - binaries - - - (Boolean, nil) - - - -
  • - -
  • - - force - - - (Boolean, nil) - - - -
  • - -
  • - - quarantine - - - (Boolean, nil) - - - -
  • - -
  • - - require_sha - - - (Boolean, nil) - - - -
  • - -
  • - - skip_cask_deps - - - (Boolean, nil) - - - -
  • - -
  • - - verbose - - - (Boolean, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-
-
# File 'cask/upgrade.rb', line 144
-
-def self.upgrade_cask(
-  old_cask, new_cask,
-  binaries:, force:, quarantine:, require_sha:, skip_cask_deps:, verbose:
-)
-  require "cask/installer"
-
-  start_time = Time.now
-  odebug "Started upgrade process for Cask #{old_cask}"
-  old_config = old_cask.config
-
-  old_options = {
-    binaries:,
-    verbose:,
-    force:,
-    upgrade:  true,
-  }.compact
-
-  old_cask_installer =
-    Installer.new(old_cask, **old_options)
-
-  new_cask.config = new_cask.default_config.merge(old_config)
-
-  new_options = {
-    binaries:,
-    verbose:,
-    force:,
-    skip_cask_deps:,
-    require_sha:,
-    upgrade:        true,
-    quarantine:,
-  }.compact
-
-  new_cask_installer =
-    Installer.new(new_cask, **new_options)
-
-  started_upgrade = false
-  new_artifacts_installed = false
-
-  begin
-    oh1 "Upgrading #{Formatter.identifier(old_cask)}"
-
-    # Start new cask's installation steps
-    new_cask_installer.check_conflicts
-
-    if (caveats = new_cask_installer.caveats)
-      puts caveats
-    end
-
-    new_cask_installer.fetch
-
-    # Move the old cask's artifacts back to staging
-    old_cask_installer.start_upgrade(successor: new_cask)
-    # And flag it so in case of error
-    started_upgrade = true
-
-    # Install the new cask
-    new_cask_installer.stage
-
-    new_cask_installer.install_artifacts(predecessor: old_cask)
-    new_artifacts_installed = true
-
-    # If successful, wipe the old cask from staging.
-    old_cask_installer.finalize_upgrade
-  rescue => e
-    new_cask_installer.uninstall_artifacts(successor: old_cask) if new_artifacts_installed
-    new_cask_installer.purge_versioned_files
-    old_cask_installer.revert_upgrade(predecessor: new_cask) if started_upgrade
-    raise e
-  end
-
-  end_time = Time.now
-  Homebrew.messages.package_installed(new_cask.token, end_time - start_time)
-end
-
-
- -
-

- - .upgrade_casks(*casks, args:, force: false, greedy: false, greedy_latest: false, greedy_auto_updates: false, dry_run: false, skip_cask_deps: false, verbose: false, binaries: nil, quarantine: nil, require_sha: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - casks - - - (Cask) - - - -
  • - -
  • - - args - - - (Homebrew::CLI::Args) - - - -
  • - -
  • - - force - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - greedy - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - greedy_latest - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - greedy_auto_updates - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - dry_run - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - skip_cask_deps - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - binaries - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - quarantine - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - require_sha - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-
-
# File 'cask/upgrade.rb', line 25
-
-def self.upgrade_casks(
-  *casks,
-  args:,
-  force: false,
-  greedy: false,
-  greedy_latest: false,
-  greedy_auto_updates: false,
-  dry_run: false,
-  skip_cask_deps: false,
-  verbose: false,
-  binaries: nil,
-  quarantine: nil,
-  require_sha: nil
-)
-
-  quarantine = true if quarantine.nil?
-
-  greedy = true if Homebrew::EnvConfig.upgrade_greedy?
-
-  outdated_casks = if casks.empty?
-    Caskroom.casks(config: Config.from_args(args)).select do |cask|
-      cask.outdated?(greedy:, greedy_latest:,
-                     greedy_auto_updates:)
-    end
-  else
-    casks.select do |cask|
-      raise CaskNotInstalledError, cask if !cask.installed? && !force
-
-      if cask.outdated?(greedy: true)
-        true
-      elsif cask.version.latest?
-        opoo "Not upgrading #{cask.token}, the downloaded artifact has not changed"
-        false
-      else
-        opoo "Not upgrading #{cask.token}, the latest version is already installed"
-        false
-      end
-    end
-  end
-
-  manual_installer_casks = outdated_casks.select do |cask|
-    cask.artifacts.any?(Artifact::Installer::ManualInstaller)
-  end
-
-  if manual_installer_casks.present?
-    count = manual_installer_casks.count
-    ofail "Not upgrading #{count} `installer manual` #{::Utils.pluralize("cask", count)}."
-    puts manual_installer_casks.map(&:to_s)
-    outdated_casks -= manual_installer_casks
-  end
-
-  return false if outdated_casks.empty?
-
-  if casks.empty? && !greedy
-    if !greedy_auto_updates && !greedy_latest
-      ohai "Casks with 'auto_updates true' or 'version :latest' " \
-           "will not be upgraded; pass `--greedy` to upgrade them."
-    end
-    if greedy_auto_updates && !greedy_latest
-      ohai "Casks with 'version :latest' will not be upgraded; pass `--greedy-latest` to upgrade them."
-    end
-    if !greedy_auto_updates && greedy_latest
-      ohai "Casks with 'auto_updates true' will not be upgraded; pass `--greedy-auto-updates` to upgrade them."
-    end
-  end
-
-  verb = dry_run ? "Would upgrade" : "Upgrading"
-  oh1 "#{verb} #{outdated_casks.count} outdated #{::Utils.pluralize("package", outdated_casks.count)}:"
-
-  caught_exceptions = []
-
-  upgradable_casks = outdated_casks.map do |c|
-    unless c.installed?
-      odie <<~EOS
-        The cask '#{c.token}' was affected by a bug and cannot be upgraded as-is. To fix this, run:
-          brew reinstall --cask --force #{c.token}
-      EOS
-    end
-
-    [CaskLoader.load(c.installed_caskfile), c]
-  end
-
-  puts upgradable_casks
-    .map { |(old_cask, new_cask)| "#{new_cask.full_name} #{old_cask.version} -> #{new_cask.version}" }
-    .join("\n")
-  return true if dry_run
-
-  upgradable_casks.each do |(old_cask, new_cask)|
-    upgrade_cask(
-      old_cask, new_cask,
-      binaries:, force:, skip_cask_deps:, verbose:,
-      quarantine:, require_sha:
-    )
-  rescue => e
-    new_exception = e.exception("#{new_cask.full_name}: #{e}")
-    new_exception.set_backtrace(e.backtrace)
-    caught_exceptions << new_exception
-    next
-  end
-
-  return true if caught_exceptions.empty?
-  raise MultipleCaskErrors, caught_exceptions if caught_exceptions.count > 1
-  raise caught_exceptions.fetch(0) if caught_exceptions.count == 1
-
-  false
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Cask/Utils.html b/docs/Cask/Utils.html deleted file mode 100644 index 00303217b..000000000 --- a/docs/Cask/Utils.html +++ /dev/null @@ -1,906 +0,0 @@ - - - - - - - Module: Cask::Utils - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Cask::Utils - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
cask/utils.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for various cask operations.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .error_message_with_suggestionsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-123
-124
-125
-126
-127
-128
-
-
# File 'cask/utils.rb', line 123
-
-def self.error_message_with_suggestions
-  <<~EOS
-    Follow the instructions here:
-      #{Formatter.url(BUG_REPORTS_URL)}
-  EOS
-end
-
-
- -
-

- - .gain_permissions(path, command_args, command) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-
-
# File 'cask/utils.rb', line 61
-
-def self.gain_permissions(path, command_args, command)
-  tried_permissions = false
-  tried_ownership = false
-  begin
-    yield path
-  rescue
-    # in case of permissions problems
-    unless tried_permissions
-      print_stderr = Context.current.debug? || Context.current.verbose?
-      # TODO: Better handling for the case where path is a symlink.
-      #       The `-h` and `-R` flags cannot be combined and behavior is
-      #       dependent on whether the file argument has a trailing
-      #       slash. This should do the right thing, but is fragile.
-      command.run("/usr/bin/chflags",
-                  print_stderr:,
-                  args:         command_args + ["--", "000", path])
-      command.run("/bin/chmod",
-                  print_stderr:,
-                  args:         command_args + ["--", "u+rwx", path])
-      command.run("/bin/chmod",
-                  print_stderr:,
-                  args:         command_args + ["-N", path])
-      tried_permissions = true
-      retry # rmtree
-    end
-
-    unless tried_ownership
-      # in case of ownership problems
-      # TODO: Further examine files to see if ownership is the problem
-      #       before using `sudo` and `chown`.
-      ohai "Using sudo to gain ownership of path '#{path}'"
-      command.run("/usr/sbin/chown",
-                  args: command_args + ["--", User.current, path],
-                  sudo: true)
-      tried_ownership = true
-      # retry chflags/chmod after chown
-      tried_permissions = false
-      retry # rmtree
-    end
-
-    raise
-  end
-end
-
-
- -
-

- - .gain_permissions_mkpath(path, command: SystemCommand) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'cask/utils.rb', line 12
-
-def self.gain_permissions_mkpath(path, command: SystemCommand)
-  dir = path.ascend.find(&:directory?)
-  return if path == dir
-
-  if dir.writable?
-    path.mkpath
-  else
-    command.run!("/bin/mkdir", args: ["-p", "--", path], sudo: true, print_stderr: false)
-  end
-end
-
-
- -
-

- - .gain_permissions_remove(path, command: SystemCommand) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-
-
# File 'cask/utils.rb', line 33
-
-def self.gain_permissions_remove(path, command: SystemCommand)
-  directory = false
-  permission_flags = if path.symlink?
-    ["-h"]
-  elsif path.directory?
-    directory = true
-    ["-R"]
-  elsif path.exist?
-    []
-  else
-    # Nothing to remove.
-    return
-  end
-
-  gain_permissions(path, permission_flags, command) do |p|
-    if p.parent.writable?
-      if directory
-        p.rmtree
-      else
-        FileUtils.rm_f p
-      end
-    else
-      recursive_flag = directory ? ["-R"] : []
-      command.run!("/bin/rm", args: recursive_flag + ["-f", "--", p], sudo: true, print_stderr: false)
-    end
-  end
-end
-
-
- -
-

- - .gain_permissions_rmdir(path, command: SystemCommand) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'cask/utils.rb', line 23
-
-def self.gain_permissions_rmdir(path, command: SystemCommand)
-  gain_permissions(path, [], command) do |p|
-    if p.parent.writable?
-      FileUtils.rmdir p
-    else
-      command.run!("/bin/rmdir", args: ["--", p], sudo: true, print_stderr: false)
-    end
-  end
-end
-
-
- -
-

- - .method_missing_message(method, token, section = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-133
-134
-135
-136
-
-
# File 'cask/utils.rb', line 130
-
-def self.method_missing_message(method, token, section = nil)
-  message = +"Unexpected method '#{method}' called "
-  message << "during #{section} " if section
-  message << "on Cask #{token}."
-
-  ofail "#{message}\n#{error_message_with_suggestions}"
-end
-
-
- -
-

- - .path_occupied?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'cask/utils.rb', line 106
-
-def self.path_occupied?(path)
-  path.exist? || path.symlink?
-end
-
-
- -
-

- - .token_from(name) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-
-
# File 'cask/utils.rb', line 111
-
-def self.token_from(name)
-  name.downcase
-      .gsub("+", "-plus-")
-      .gsub("@", "-at-")
-      .gsub(/[ _·•]/, "-")
-      .gsub(/[^\w-]/, "")
-      .gsub(/--+/, "-")
-      .delete_prefix("-")
-      .delete_suffix("-")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CaskDependent.html b/docs/CaskDependent.html deleted file mode 100644 index 1bb77eec8..000000000 --- a/docs/CaskDependent.html +++ /dev/null @@ -1,901 +0,0 @@ - - - - - - - Class: CaskDependent - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CaskDependent - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask_dependent.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

An adapter for casks to provide dependency information in a formula-like interface.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Requirement - - -

- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #cask ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(cask) ⇒ CaskDependent - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CaskDependent.

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'cask_dependent.rb', line 17
-
-def initialize(cask)
-  @cask = cask
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'cask_dependent.rb', line 15
-
-def cask
-  @cask
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #any_version_installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-76
-77
-
-
# File 'cask_dependent.rb', line 75
-
-def any_version_installed?
-  @cask.installed?
-end
-
-
- -
-

- - #depsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-
-
# File 'cask_dependent.rb', line 33
-
-def deps
-  @deps ||= @cask.depends_on.formula.map do |f|
-    Dependency.new f
-  end
-end
-
-
- -
-

- - #full_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'cask_dependent.rb', line 25
-
-def full_name
-  @cask.full_name
-end
-
-
- -
-

- - #nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'cask_dependent.rb', line 21
-
-def name
-  @cask.token
-end
-
-
- -
-

- - #recursive_dependencies(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'cask_dependent.rb', line 67
-
-def recursive_dependencies(&block)
-  Dependency.expand(self, &block)
-end
-
-
- -
-

- - #recursive_requirements(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'cask_dependent.rb', line 71
-
-def recursive_requirements(&block)
-  Requirement.expand(self, &block)
-end
-
-
- -
-

- - #requirementsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'cask_dependent.rb', line 39
-
-def requirements
-  @requirements ||= begin
-    requirements = []
-    dsl_reqs = @cask.depends_on
-
-    dsl_reqs.arch&.each do |arch|
-      arch = if arch[:bits] == 64
-        if arch[:type] == :intel
-          :x86_64
-        else
-          :"#{arch[:type]}64"
-        end
-      elsif arch[:type] == :intel && arch[:bits] == 32
-        :i386
-      else
-        arch[:type]
-      end
-      requirements << ArchRequirement.new([arch])
-    end
-    dsl_reqs.cask.each do |cask_ref|
-      requirements << CaskDependent::Requirement.new([{ cask: cask_ref }])
-    end
-    requirements << dsl_reqs.macos if dsl_reqs.macos
-
-    requirements
-  end
-end
-
-
- -
-

- - #runtime_dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'cask_dependent.rb', line 29
-
-def runtime_dependencies
-  deps.flat_map { |dep| [dep, *dep.to_formula.runtime_dependencies] }.uniq
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CaskDependent/Requirement.html b/docs/CaskDependent/Requirement.html deleted file mode 100644 index cd0649694..000000000 --- a/docs/CaskDependent/Requirement.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - Class: CaskDependent::Requirement - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CaskDependent::Requirement - - - Private -

-
- -
-
Inherits:
-
- Requirement - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cask_dependent.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Defines a dependency on another cask

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Dependable

-

Dependable::RESERVED_TAGS

- - - - -

Instance Attribute Summary

- -

Attributes inherited from Requirement

-

#cask, #download, #name

- - - -

Attributes included from Dependable

-

#tags

- - - - - - - - - -

Method Summary

- -

Methods inherited from Requirement

-

cask, #display_s, download, #env, env, #env_proc, expand, fatal, #fatal?, #initialize, #message, #mktemp, #modify_build_environment, #option_names, prune, prune?, #satisfied?, #satisfied_result_parent, satisfy

- - - - - - - - - -

Methods included from BuildEnvironment::DSL

-

#env, #inherited

- - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- - - - - - - - - -

Methods included from Dependable

-

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

-
-

Constructor Details

- -

This class inherits a constructor from Requirement

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/CaskDescriptionCacheStore.html b/docs/CaskDescriptionCacheStore.html deleted file mode 100644 index 41e86d053..000000000 --- a/docs/CaskDescriptionCacheStore.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - - Class: CaskDescriptionCacheStore - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CaskDescriptionCacheStore - - - Private -

-
- -
-
Inherits:
-
- DescriptionCacheStore - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
description_cache_store.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

CaskDescriptionCacheStore provides methods to fetch and mutate cask descriptions used -by the brew desc and brew search commands.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from DescriptionCacheStore

-

#delete!, #delete_from_formula_names!, #select, #update!, #update_from_formula_names!

- - - - - - - - - -

Methods inherited from CacheStore

-

#delete!, #fetch, #initialize, #update!

-
-

Constructor Details

- -

This class inherits a constructor from CacheStore

- -
- - -
-

Instance Method Details

- - -
-

- - #populate_if_empty!(eval_all: Homebrew::EnvConfig.eval_all?) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If the database is empty update! it with all known casks.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'description_cache_store.rb', line 98
-
-def populate_if_empty!(eval_all: Homebrew::EnvConfig.eval_all?)
-  return unless eval_all
-  return unless database.empty?
-
-  Cask::Cask.all(eval_all:)
-            .each { |c| update!(c.full_name, [c.name.join(", "), c.desc.presence]) }
-end
-
-
- -
-

- - #update_from_cask_tokens!(cask_tokens) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Use an array of cask tokens to update the CaskDescriptionCacheStore.

- - -
-
-
-

Parameters:

-
    - -
  • - - cask_tokens - - - (Array) - - - - — -

    the casks to update

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
-
# File 'description_cache_store.rb', line 126
-
-def update_from_cask_tokens!(cask_tokens)
-  return unless Homebrew::EnvConfig.eval_all?
-  return populate_if_empty! if database.empty?
-
-  cask_tokens.each do |token|
-    c = Cask::CaskLoader.load(token)
-    update!(c.full_name, [c.name.join(", "), c.desc.presence])
-  rescue Cask::CaskUnavailableError, *FormulaVersions::IGNORED_EXCEPTIONS
-    delete!(c.full_name) if c.present?
-  end
-end
-
-
- -
-

- - #update_from_report!(report) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Use an update report to update the CaskDescriptionCacheStore.

- - -
-
-
-

Parameters:

-
    - -
  • - - report - - - (Report) - - - - — -

    an update report generated by cmd/update.rb

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-
-
# File 'description_cache_store.rb', line 110
-
-def update_from_report!(report)
-  return unless Homebrew::EnvConfig.eval_all?
-  return populate_if_empty! if database.empty?
-  return if report.empty?
-
-  alterations = report.select_formula_or_cask(:AC) +
-                report.select_formula_or_cask(:MC)
-
-  update_from_cask_tokens!(alterations)
-  delete_from_cask_tokens!(report.select_formula_or_cask(:DC))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CaskLock.html b/docs/CaskLock.html deleted file mode 100644 index acf4b28fd..000000000 --- a/docs/CaskLock.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - Class: CaskLock - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CaskLock - - - Private -

-
- -
-
Inherits:
-
- LockFile - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lock_file.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A lock file for a cask.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from LockFile

-

#path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from LockFile

-

#lock, #unlock, #with_lock

-
-

Constructor Details

- -
-

- - #initialize(name) ⇒ CaskLock - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CaskLock.

- - -
-
-
- - -
- - - - -
-
-
-
-61
-62
-63
-
-
# File 'lock_file.rb', line 61
-
-def initialize(name)
-  super("#{name}.cask")
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Caveats.html b/docs/Caveats.html deleted file mode 100644 index 9487023a1..000000000 --- a/docs/Caveats.html +++ /dev/null @@ -1,701 +0,0 @@ - - - - - - - Class: Caveats - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Caveats - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
caveats.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A formula's caveats.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula) ⇒ Caveats - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Caveats.

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'caveats.rb', line 13
-
-def initialize(formula)
-  @formula = formula
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #formulaObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'caveats.rb', line 11
-
-def formula
-  @formula
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #caveatsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'caveats.rb', line 17
-
-def caveats
-  caveats = []
-  begin
-    build = formula.build
-    formula.build = Tab.for_formula(formula)
-    string = formula.caveats.to_s
-    caveats << "#{string.chomp}\n" unless string.empty?
-  ensure
-    formula.build = build
-  end
-  caveats << keg_only_text
-
-  valid_shells = [:bash, :zsh, :fish].freeze
-  current_shell = Utils::Shell.preferred || Utils::Shell.parent
-  shells = if current_shell.present? &&
-              (shell_sym = current_shell.to_sym) &&
-              valid_shells.include?(shell_sym)
-    [shell_sym]
-  else
-    valid_shells
-  end
-  shells.each do |shell|
-    caveats << function_completion_caveats(shell)
-  end
-
-  caveats << service_caveats
-  caveats << elisp_caveats
-  caveats.compact.join("\n")
-end
-
-
- -
-

- - #empty?(*args, **options, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-
-
# File 'sorbet/rbi/parlour.rbi', line 9
-
-def empty?(*args, **options, &block); end
-
-
- -
-

- - #keg_only_text(skip_reason: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-
-
# File 'caveats.rb', line 49
-
-def keg_only_text(skip_reason: false)
-  return unless formula.keg_only?
-
-  s = if skip_reason
-    ""
-  else
-    <<~EOS
-      #{formula.name} is keg-only, which means it was not symlinked into #{HOMEBREW_PREFIX},
-      because #{formula.keg_only_reason.to_s.chomp}.
-    EOS
-  end.dup
-
-  if formula.bin.directory? || formula.sbin.directory?
-    s << <<~EOS
-
-      If you need to have #{formula.name} first in your PATH, run:
-    EOS
-    s << "  #{Utils::Shell.prepend_path_in_profile(formula.opt_bin.to_s)}\n" if formula.bin.directory?
-    s << "  #{Utils::Shell.prepend_path_in_profile(formula.opt_sbin.to_s)}\n" if formula.sbin.directory?
-  end
-
-  if formula.lib.directory? || formula.include.directory?
-    s << <<~EOS
-
-      For compilers to find #{formula.name} you may need to set:
-    EOS
-
-    s << "  #{Utils::Shell.export_value("LDFLAGS", "-L#{formula.opt_lib}")}\n" if formula.lib.directory?
-
-    s << "  #{Utils::Shell.export_value("CPPFLAGS", "-I#{formula.opt_include}")}\n" if formula.include.directory?
-
-    if which("pkg-config", ORIGINAL_PATHS) &&
-       ((formula.lib/"pkgconfig").directory? || (formula.share/"pkgconfig").directory?)
-      s << <<~EOS
-
-        For pkg-config to find #{formula.name} you may need to set:
-      EOS
-
-      if (formula.lib/"pkgconfig").directory?
-        s << "  #{Utils::Shell.export_value("PKG_CONFIG_PATH", "#{formula.opt_lib}/pkgconfig")}\n"
-      end
-
-      if (formula.share/"pkgconfig").directory?
-        s << "  #{Utils::Shell.export_value("PKG_CONFIG_PATH", "#{formula.opt_share}/pkgconfig")}\n"
-      end
-    end
-  end
-  s << "\n" unless s.end_with?("\n")
-  s
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Checksum.html b/docs/Checksum.html deleted file mode 100644 index beacbc91f..000000000 --- a/docs/Checksum.html +++ /dev/null @@ -1,673 +0,0 @@ - - - - - - - Class: Checksum - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Checksum - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
checksum.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A formula's checksum.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(hexdigest) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - hexdigest - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'checksum.rb', line 12
-
-def initialize(hexdigest)
-  @hexdigest = T.let(hexdigest.downcase, String)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #hexdigestString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'checksum.rb', line 9
-
-def hexdigest
-  @hexdigest
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #[](*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-
-
# File 'sorbet/rbi/parlour.rbi', line 26
-
-def [](*args, **options, &block); end
-
-
- -
-

- - #empty?(*args, **options, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/parlour.rbi', line 17
-
-def empty?(*args, **options, &block); end
-
-
- -
-

- - #length(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-
-
# File 'sorbet/rbi/parlour.rbi', line 23
-
-def length(*args, **options, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/ChecksumMismatchError.html b/docs/ChecksumMismatchError.html deleted file mode 100644 index bc7f7949e..000000000 --- a/docs/ChecksumMismatchError.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - Exception: ChecksumMismatchError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: ChecksumMismatchError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised by Pathname#verify_checksum when verification fails.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(path, expected, actual) ⇒ ChecksumMismatchError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ChecksumMismatchError.

- - -
-
-
- - -
- - - - -
-
-
-
-714
-715
-716
-717
-718
-719
-720
-721
-722
-723
-724
-
-
# File 'exceptions.rb', line 714
-
-def initialize(path, expected, actual)
-  @expected = expected
-
-  super <<~EOS
-    SHA256 mismatch
-    Expected: #{Formatter.success(expected.to_s)}
-      Actual: #{Formatter.error(actual.to_s)}
-        File: #{path}
-    To retry an incomplete download, remove the file above.
-  EOS
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #expectedObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-712
-713
-714
-
-
# File 'exceptions.rb', line 712
-
-def expected
-  @expected
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/ChecksumMissingError.html b/docs/ChecksumMissingError.html deleted file mode 100644 index 1d8fed46b..000000000 --- a/docs/ChecksumMissingError.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - Exception: ChecksumMissingError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: ChecksumMissingError - - - Private -

-
- -
-
Inherits:
-
- ArgumentError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised by Pathname#verify_checksum when "expected" is nil or empty.

- - -
-
-
- - -
- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/ChildProcessError.html b/docs/ChildProcessError.html deleted file mode 100644 index 1e267ebdc..000000000 --- a/docs/ChildProcessError.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - - Exception: ChildProcessError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: ChildProcessError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a child process sends us an exception over its error pipe.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(inner) ⇒ ChildProcessError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ChildProcessError.

- - -
-
-
- - -
- - - - -
-
-
-
-759
-760
-761
-762
-763
-764
-765
-766
-767
-768
-769
-770
-
-
# File 'exceptions.rb', line 759
-
-def initialize(inner)
-  @inner = inner
-  @inner_class = Object.const_get inner["json_class"]
-
-  super <<~EOS
-    An exception occurred within a child process:
-      #{inner_class}: #{inner["m"]}
-  EOS
-
-  # Clobber our real (but irrelevant) backtrace with that of the inner exception.
-  set_backtrace inner["b"]
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #innerObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-757
-758
-759
-
-
# File 'exceptions.rb', line 757
-
-def inner
-  @inner
-end
-
-
- - - -
-

- - #inner_classObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-757
-758
-759
-
-
# File 'exceptions.rb', line 757
-
-def inner_class
-  @inner_class
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Cleaner.html b/docs/Cleaner.html deleted file mode 100644 index ae84545fa..000000000 --- a/docs/Cleaner.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - Class: Cleaner - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Cleaner - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - -
-
Includes:
-
Context
-
- - - - - - -
-
Defined in:
-
extend/os/mac/cleaner.rb,
- extend/os/linux/cleaner.rb,
cleaner.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

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 symlinks
  • -
- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- -
    - - -
  • - - - #clean ⇒ void - - - - - - - - - - private - -

    Clean the keg of the formula.

    -
    - -
  • - - - -
  • - - - #initialize(formula) ⇒ void - - - - - - constructor - - - - - - private - -

    Create a cleaner for the given formula.

    -
    - -
  • - - -
- - - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(formula) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Create a cleaner for the given formula.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'cleaner.rb', line 19
-
-def initialize(formula)
-  @formula = formula
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #cleanvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Clean the keg of the formula.

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'cleaner.rb', line 25
-
-def clean
-  ObserverPathnameExtension.reset_counts!
-
-  # Many formulae include `lib/charset.alias`, but it is not strictly needed
-  # and will conflict if more than one formula provides it.
-  observe_file_removal @formula.lib/"charset.alias"
-
-  [@formula.bin, @formula.sbin, @formula.lib].each { |dir| clean_dir(dir) if dir.exist? }
-
-  # Get rid of any info `dir` files, so they don't conflict at the link stage.
-  #
-  # The `dir` files come in at least 3 locations:
-  #
-  # 1. `info/dir`
-  # 2. `info/#{name}/dir`
-  # 3. `info/#{arch}/dir`
-  #
-  # Of these 3 only `info/#{name}/dir` is safe to keep since the rest will
-  # conflict with other formulae because they use a shared location.
-  #
-  # See
-  # [cleaner: recursively delete info `dir`s][1],
-  # [emacs 28.1 bottle does not contain `dir` file][2] and
-  # [Keep `info/#{f.name}/dir` files in cleaner][3]
-  # for more info.
-  #
-  # [1]: https://github.com/Homebrew/brew/pull/11597
-  # [2]: https://github.com/Homebrew/homebrew-core/issues/100190
-  # [3]: https://github.com/Homebrew/brew/pull/13215
-  @formula.info.glob("**/dir").each do |info_dir_file|
-    next unless info_dir_file.file?
-    next if info_dir_file == @formula.info/@formula.name/"dir"
-    next if @formula.skip_clean?(info_dir_file)
-
-    observe_file_removal info_dir_file
-  end
-
-  rewrite_shebangs
-  
-
-  prune
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CodesignRequirement.html b/docs/CodesignRequirement.html deleted file mode 100644 index 722c8e961..000000000 --- a/docs/CodesignRequirement.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - Class: CodesignRequirement - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CodesignRequirement - - - Private -

-
- -
-
Inherits:
-
- Requirement - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
requirements/codesign_requirement.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A requirement on a code-signing identity.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Dependable

-

Dependable::RESERVED_TAGS

- - - - -

Instance Attribute Summary

- -

Attributes inherited from Requirement

-

#cask, #download, #name

- - - -

Attributes included from Dependable

-

#tags

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Requirement

-

cask, #display_s, download, #env, env, #env_proc, expand, fatal, #fatal?, #mktemp, #modify_build_environment, #option_names, prune, prune?, #satisfied?, #satisfied_result_parent, satisfy

- - - - - - - - - -

Methods included from BuildEnvironment::DSL

-

#env, #inherited

- - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- - - - - - - - - -

Methods included from Dependable

-

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

-
-

Constructor Details

- -
-

- - #initialize(tags) ⇒ CodesignRequirement - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CodesignRequirement.

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-
-
# File 'requirements/codesign_requirement.rb', line 8
-
-def initialize(tags)
-  options = tags.shift
-  raise ArgumentError, "CodesignRequirement requires an options Hash!" unless options.is_a?(Hash)
-  raise ArgumentError, "CodesignRequirement requires an identity key!" unless options.key?(:identity)
-
-  @identity = options.fetch(:identity)
-  @with = options.fetch(:with, "code signing")
-  @url = options.fetch(:url, nil)
-  super
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #messageString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-32
-33
-
-
# File 'requirements/codesign_requirement.rb', line 29
-
-def message
-  message = "#{@identity} identity must be available to build with #{@with}"
-  message += ":\n#{@url}" if @url.present?
-  message
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Commands.html b/docs/Commands.html deleted file mode 100644 index 0d6d72def..000000000 --- a/docs/Commands.html +++ /dev/null @@ -1,2272 +0,0 @@ - - - - - - - Module: Commands - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Commands - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
commands.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for commands.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
HOMEBREW_CMD_PATH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_LIBRARY_PATH/"cmd").freeze
- -
HOMEBREW_DEV_CMD_PATH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_LIBRARY_PATH/"dev-cmd").freeze
- -
HOMEBREW_INTERNAL_COMMAND_ALIASES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

If you are going to change anything in below hash, -be sure to also update appropriate case statement in brew.sh

- - -
-
-
- - -
-
-
{
-  "ls"           => "list",
-  "homepage"     => "home",
-  "-S"           => "search",
-  "up"           => "update",
-  "ln"           => "link",
-  "instal"       => "install", # gem does the same
-  "uninstal"     => "uninstall",
-  "post_install" => "postinstall",
-  "rm"           => "uninstall",
-  "remove"       => "uninstall",
-  "abv"          => "info",
-  "dr"           => "doctor",
-  "--repo"       => "--repository",
-  "environment"  => "--env",
-  "--config"     => "config",
-  "-v"           => "--version",
-  "lc"           => "livecheck",
-  "tc"           => "typecheck",
-}.freeze
- -
DESCRIPTION_SPLITTING_PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

This pattern is used to split descriptions at full stops. We only consider a -dot as a full stop if it is either followed by a whitespace or at the end of -the description. In this way we can prevent cutting off a sentence in the -middle due to dots in URLs or paths.

- - -
-
-
- - -
-
-
/\.(?>\s|$)/
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .args_method_name(cmd_path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-
-
# File 'commands.rb', line 53
-
-def self.args_method_name(cmd_path)
-  cmd_path_basename = basename_without_extension(cmd_path)
-  cmd_method_prefix = method_name(cmd_path_basename)
-  :"#{cmd_method_prefix}_args"
-end
-
-
- -
-

- - .basename_without_extension(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-148
-149
-150
-
-
# File 'commands.rb', line 148
-
-def self.basename_without_extension(path)
-  path.basename(path.extname)
-end
-
-
- -
-

- - .command_description(command, short: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-
-
# File 'commands.rb', line 205
-
-def self.command_description(command, short: false)
-  path = self.path(command)
-  return if path.blank?
-
-  if (cmd_parser = Homebrew::CLI::Parser.from_cmd_path(path))
-    if short
-      cmd_parser.description&.split(DESCRIPTION_SPLITTING_PATTERN)&.first
-    else
-      cmd_parser.description
-    end
-  else
-    comment_lines = path.read.lines.grep(/^#:/)
-
-    # skip the comment's initial usage summary lines
-    comment_lines.slice(2..-1)&.each do |line|
-      match_data = /^#:  (?<desc>\w.*+)$/.match(line)
-      next unless match_data
-
-      desc = match_data[:desc]
-      return T.must(desc).split(DESCRIPTION_SPLITTING_PATTERN).first if short
-
-      return desc
-    end
-  end
-end
-
-
- -
-

- - .command_options(command) ⇒ Array<Array(String, String)>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - command - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-
-
# File 'commands.rb', line 179
-
-def self.command_options(command)
-  return if command == "help"
-
-  path = self.path(command)
-  return if path.blank?
-
-  if (cmd_parser = Homebrew::CLI::Parser.from_cmd_path(path))
-    cmd_parser.processed_options.filter_map do |short, long, _, desc, hidden|
-      next if hidden
-
-      [long || short, desc]
-    end
-  else
-    options = []
-    comment_lines = path.read.lines.grep(/^#:/)
-    return options if comment_lines.empty?
-
-    # skip the comment's initial usage summary lines
-    comment_lines.slice(2..-1).each do |line|
-      match_data = / (?<option>-[-\w]+) +(?<desc>.*)$/.match(line)
-      options << [match_data[:option], match_data[:desc]] if match_data
-    end
-    options
-  end
-end
-
-
- -
-

- - .commands(external: true, aliases: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'commands.rb', line 98
-
-def self.commands(external: true, aliases: false)
-  cmds = internal_commands
-  cmds += internal_developer_commands
-  cmds += external_commands if external
-  cmds += internal_commands_aliases if aliases
-  cmds.sort
-end
-
-
- -
-

- - .external_cmd_path(cmd) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-84
-85
-86
-
-
# File 'commands.rb', line 84
-
-def self.external_cmd_path(cmd)
-  which("brew-#{cmd}", PATH.new(ENV.fetch("PATH")).append(Tap.cmd_directories))
-end
-
-
- -
-

- - .external_commandsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-139
-140
-141
-142
-143
-144
-145
-146
-
-
# File 'commands.rb', line 139
-
-def self.external_commands
-  Tap.cmd_directories.flat_map do |path|
-    find_commands(path).select(&:executable?)
-                       .map { basename_without_extension(_1) }
-                       .map { |p| p.to_s.delete_prefix("brew-").strip }
-  end.map(&:to_s)
-     .sort
-end
-
-
- -
-

- - .external_ruby_cmd_path(cmd) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Ruby commands which are run by being required.

- - -
-
-
- - -
- - - - -
-
-
-
-80
-81
-82
-
-
# File 'commands.rb', line 80
-
-def self.external_ruby_cmd_path(cmd)
-  which("brew-#{cmd}.rb", PATH.new(ENV.fetch("PATH")).append(Tap.cmd_directories))
-end
-
-
- -
-

- - .external_ruby_v2_cmd_path(cmd) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Ruby commands which can be required without being run.

- - -
-
-
- - -
- - - - -
-
-
-
-74
-75
-76
-77
-
-
# File 'commands.rb', line 74
-
-def self.external_ruby_v2_cmd_path(cmd)
-  path = which("#{cmd}.rb", Tap.cmd_directories)
-  path if require?(path)
-end
-
-
- -
-

- - .find_commands(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-152
-153
-154
-155
-156
-
-
# File 'commands.rb', line 152
-
-def self.find_commands(path)
-  Pathname.glob("#{path}/*")
-          .select(&:file?)
-          .sort
-end
-
-
- -
-

- - .find_internal_commands(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-134
-135
-136
-137
-
-
# File 'commands.rb', line 134
-
-def self.find_internal_commands(path)
-  find_commands(path).map(&:basename)
-                     .map { basename_without_extension(_1) }
-end
-
-
- -
-

- - .internal_cmd_path(cmd) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-
-
# File 'commands.rb', line 59
-
-def self.internal_cmd_path(cmd)
-  [
-    HOMEBREW_CMD_PATH/"#{cmd}.rb",
-    HOMEBREW_CMD_PATH/"#{cmd}.sh",
-  ].find(&:exist?)
-end
-
-
- -
-

- - .internal_commandsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-122
-123
-124
-
-
# File 'commands.rb', line 122
-
-def self.internal_commands
-  find_internal_commands(HOMEBREW_CMD_PATH).map(&:to_s)
-end
-
-
- -
-

- - .internal_commands_aliasesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-
-
# File 'commands.rb', line 130
-
-def self.internal_commands_aliases
-  HOMEBREW_INTERNAL_COMMAND_ALIASES.keys
-end
-
-
- -
-

- - .internal_commands_pathsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'commands.rb', line 106
-
-def self.internal_commands_paths
-  find_commands HOMEBREW_CMD_PATH
-end
-
-
- -
-

- - .internal_dev_cmd_path(cmd) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-
-
# File 'commands.rb', line 66
-
-def self.internal_dev_cmd_path(cmd)
-  [
-    HOMEBREW_DEV_CMD_PATH/"#{cmd}.rb",
-    HOMEBREW_DEV_CMD_PATH/"#{cmd}.sh",
-  ].find(&:exist?)
-end
-
-
- -
-

- - .internal_developer_commandsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-126
-127
-128
-
-
# File 'commands.rb', line 126
-
-def self.internal_developer_commands
-  find_internal_commands(HOMEBREW_DEV_CMD_PATH).map(&:to_s)
-end
-
-
- -
-

- - .internal_developer_commands_pathsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-110
-111
-112
-
-
# File 'commands.rb', line 110
-
-def self.internal_developer_commands_paths
-  find_commands HOMEBREW_DEV_CMD_PATH
-end
-
-
- -
-

- - .method_name(cmd) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-
-
# File 'commands.rb', line 46
-
-def self.method_name(cmd)
-  cmd.to_s
-     .tr("-", "_")
-     .downcase
-     .to_sym
-end
-
-
- -
-

- - .named_args_type(command) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-231
-232
-233
-234
-235
-236
-237
-238
-239
-
-
# File 'commands.rb', line 231
-
-def self.named_args_type(command)
-  path = self.path(command)
-  return if path.blank?
-
-  cmd_parser = Homebrew::CLI::Parser.from_cmd_path(path)
-  return if cmd_parser.blank?
-
-  Array(cmd_parser.named_args_type)
-end
-
-
- -
-

- - .official_external_commands_paths(quiet:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-114
-115
-116
-117
-118
-119
-120
-
-
# File 'commands.rb', line 114
-
-def self.official_external_commands_paths(quiet:)
-  OFFICIAL_CMD_TAPS.flat_map do |tap_name, cmds|
-    tap = Tap.fetch(tap_name)
-    tap.install(quiet:) unless tap.installed?
-    cmds.map(&method(:external_ruby_v2_cmd_path)).compact
-  end
-end
-
-
- -
-

- - .option_conflicts(command, option) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the conflicts of a given option for command.

- - -
-
-
- - -
- - - - -
-
-
-
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-
-
# File 'commands.rb', line 242
-
-def self.option_conflicts(command, option)
-  path = self.path(command)
-  return if path.blank?
-
-  cmd_parser = Homebrew::CLI::Parser.from_cmd_path(path)
-  return if cmd_parser.blank?
-
-  cmd_parser.conflicts.map do |set|
-    set.map! { |s| s.tr "_", "-" }
-    set - [option] if set.include? option
-  end.flatten.compact
-end
-
-
- -
-

- - .path(cmd) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-88
-89
-90
-91
-92
-93
-94
-95
-96
-
-
# File 'commands.rb', line 88
-
-def self.path(cmd)
-  internal_cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd)
-  path ||= internal_cmd_path(internal_cmd)
-  path ||= internal_dev_cmd_path(internal_cmd)
-  path ||= external_ruby_v2_cmd_path(cmd)
-  path ||= external_ruby_cmd_path(cmd)
-  path ||= external_cmd_path(cmd)
-  path
-end
-
-
- -
-

- - .rebuild_commands_completion_listObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-
-
# File 'commands.rb', line 166
-
-def self.rebuild_commands_completion_list
-  # Ensure that the cache exists so we can build the commands list
-  HOMEBREW_CACHE.mkpath
-
-  cmds = commands(aliases: true) - Homebrew::Completions::COMPLETIONS_EXCLUSION_LIST
-
-  all_commands_file = HOMEBREW_CACHE/"all_commands_list.txt"
-  external_commands_file = HOMEBREW_CACHE/"external_commands_list.txt"
-  all_commands_file.atomic_write("#{cmds.sort.join("\n")}\n")
-  external_commands_file.atomic_write("#{external_commands.sort.join("\n")}\n")
-end
-
-
- -
-

- - .rebuild_internal_commands_completion_listObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-158
-159
-160
-161
-162
-163
-164
-
-
# File 'commands.rb', line 158
-
-def self.rebuild_internal_commands_completion_list
-  cmds = internal_commands + internal_developer_commands + internal_commands_aliases
-  cmds.reject! { |cmd| Homebrew::Completions::COMPLETIONS_EXCLUSION_LIST.include? cmd }
-
-  file = HOMEBREW_REPOSITORY/"completions/internal_commands_list.txt"
-  file.atomic_write("#{cmds.sort.join("\n")}\n")
-end
-
-
- -
-

- - .valid_internal_cmd?(cmd) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'commands.rb', line 38
-
-def self.valid_internal_cmd?(cmd)
-  require?(HOMEBREW_CMD_PATH/cmd)
-end
-
-
- -
-

- - .valid_internal_dev_cmd?(cmd) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'commands.rb', line 42
-
-def self.valid_internal_dev_cmd?(cmd)
-  require?(HOMEBREW_DEV_CMD_PATH/cmd)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CompilerConstants.html b/docs/CompilerConstants.html deleted file mode 100644 index 0fad0a66e..000000000 --- a/docs/CompilerConstants.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - Module: CompilerConstants - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: CompilerConstants - - - Private -

-
- - - - - - - - - -
-
Included in:
-
CompilerSelector, SharedEnvExtension
-
- - - -
-
Defined in:
-
compilers.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
GNU_GCC_VERSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[4.9 5 6 7 8 9 10 11 12 13 14].freeze
- -
GNU_GCC_REGEXP = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/^gcc-(4\.9|[5-9]|10|11|12|13|14)$/
- -
COMPILER_SYMBOL_MAP = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  "gcc"        => :gcc,
-  "clang"      => :clang,
-  "llvm_clang" => :llvm_clang,
-}.freeze
- -
COMPILERS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(COMPILER_SYMBOL_MAP.values +
-GNU_GCC_VERSIONS.map { |n| "gcc-#{n}" }).freeze
- -
- - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/CompilerFailure.html b/docs/CompilerFailure.html deleted file mode 100644 index fabdbe23a..000000000 --- a/docs/CompilerFailure.html +++ /dev/null @@ -1,638 +0,0 @@ - - - - - - - Class: CompilerFailure - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CompilerFailure - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
compilers.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class for checking compiler compatibility for a formula.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #type ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - -
-

Instance Attribute Details

- - - -
-

- - #typeObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'compilers.rb', line 19
-
-def type
-  @type
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .create(spec, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'compilers.rb', line 39
-
-def self.create(spec, &block)
-  # Non-Apple compilers are in the format fails_with compiler => version
-  if spec.is_a?(Hash)
-    compiler, major_version = spec.first
-    raise ArgumentError, "The hash `fails_with` syntax only supports GCC" if compiler != :gcc
-
-    type = compiler
-    # so fails_with :gcc => '7' simply marks all 7 releases incompatible
-    version = "#{major_version}.999"
-    exact_major_match = true
-  else
-    type = spec
-    version = 9999
-    exact_major_match = false
-  end
-  new(type, version, exact_major_match:, &block)
-end
-
-
- -
-

- - .for_standard(standard) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-
-
# File 'compilers.rb', line 33
-
-def self.for_standard(standard)
-  COLLECTIONS.fetch(standard) do
-    raise ArgumentError, "\"#{standard}\" is not a recognized standard"
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #cause(_) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The cause is no longer used so we need not hold a reference to the string.

- - -
-
-
- - -
- - - - -
-
-
-
-31
-
-
# File 'compilers.rb', line 31
-
-def cause(_); end
-
-
- -
-

- - #fails_with?(compiler) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'compilers.rb', line 57
-
-def fails_with?(compiler)
-  version_matched = if type != :gcc
-    version >= compiler.version
-  elsif @exact_major_match
-    gcc_major(version) == gcc_major(compiler.version) && version >= compiler.version
-  else
-    gcc_major(version) >= gcc_major(compiler.version)
-  end
-  type == compiler.type && version_matched
-end
-
-
- -
-

- - #version(val = nil) ⇒ Object - - - - Also known as: - build - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-24
-
-
# File 'compilers.rb', line 21
-
-def version(val = nil)
-  @version = Version.parse(val.to_s) if val
-  @version
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CompilerSelectionError.html b/docs/CompilerSelectionError.html deleted file mode 100644 index a4ff5186a..000000000 --- a/docs/CompilerSelectionError.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - Exception: CompilerSelectionError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: CompilerSelectionError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised by CompilerSelector if the formula fails with all of -the compilers available on the user's system.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula) ⇒ CompilerSelectionError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CompilerSelectionError.

- - -
-
-
- - -
- - - - -
-
-
-
-601
-602
-603
-604
-605
-606
-
-
# File 'exceptions.rb', line 601
-
-def initialize(formula)
-  super <<~EOS
-    #{formula.full_name} cannot be built with any available compilers.
-    #{DevelopmentTools.custom_installation_instructions}
-  EOS
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/CompilerSelector.html b/docs/CompilerSelector.html deleted file mode 100644 index 4560020e2..000000000 --- a/docs/CompilerSelector.html +++ /dev/null @@ -1,893 +0,0 @@ - - - - - - - Class: CompilerSelector - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CompilerSelector - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
CompilerConstants
-
- - - - - - -
-
Defined in:
-
extend/os/linux/compilers.rb,
- compilers.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class for selecting a compiler for a formula.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Compiler - - -

- - -

- Constant Summary - collapse -

- -
- -
COMPILER_PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  clang: [:clang, :gnu, :llvm_clang],
-  gcc:   [:gnu, :gcc, :llvm_clang, :clang],
-}.freeze
- -
- - - - - - -

Constants included - from CompilerConstants

-

CompilerConstants::COMPILERS, CompilerConstants::COMPILER_SYMBOL_MAP, CompilerConstants::GNU_GCC_REGEXP, CompilerConstants::GNU_GCC_VERSIONS

- - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(formula, versions, compilers) ⇒ CompilerSelector - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CompilerSelector.

- - -
-
-
- - -
- - - - -
-
-
-
-118
-119
-120
-121
-122
-123
-
-
# File 'compilers.rb', line 118
-
-def initialize(formula, versions, compilers)
-  @formula = formula
-  @failures = formula.compiler_failures
-  @versions = versions
-  @compilers = compilers
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #compilersObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-116
-117
-118
-
-
# File 'compilers.rb', line 116
-
-def compilers
-  @compilers
-end
-
-
- - - -
-

- - #failuresObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-116
-117
-118
-
-
# File 'compilers.rb', line 116
-
-def failures
-  @failures
-end
-
-
- - - -
-

- - #formulaObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-116
-117
-118
-
-
# File 'compilers.rb', line 116
-
-def formula
-  @formula
-end
-
-
- - - -
-

- - #versionsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-116
-117
-118
-
-
# File 'compilers.rb', line 116
-
-def versions
-  @versions
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .compilersObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-112
-113
-114
-
-
# File 'compilers.rb', line 112
-
-def self.compilers
-  COMPILER_PRIORITY.fetch(DevelopmentTools.default_compiler)
-end
-
-
- -
-

- - .preferred_gccString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'extend/os/linux/compilers.rb', line 6
-
-def self.preferred_gcc
-  OS::LINUX_PREFERRED_GCC_COMPILER_FORMULA
-end
-
-
- -
-

- - .select_for(formula, compilers = self.compilers) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-108
-109
-110
-
-
# File 'compilers.rb', line 108
-
-def self.select_for(formula, compilers = self.compilers)
-  new(formula, DevelopmentTools, compilers).compiler
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #compilerObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-125
-126
-127
-128
-
-
# File 'compilers.rb', line 125
-
-def compiler
-  find_compiler { |c| return c.name unless fails_with?(c) }
-  raise CompilerSelectionError, formula
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CompilerSelector/Compiler.html b/docs/CompilerSelector/Compiler.html deleted file mode 100644 index a6559a0df..000000000 --- a/docs/CompilerSelector/Compiler.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - Class: CompilerSelector::Compiler - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CompilerSelector::Compiler - - - Private -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
compilers.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #name ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute name.

    -
    - -
  • - - - -
  • - - - #type ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute type.

    -
    - -
  • - - - -
  • - - - #version ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute version.

    -
    - -
  • - - -
- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute name

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of name

    -
    - -
  • - -
- -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'compilers.rb', line 101
-
-def name
-  @name
-end
-
-
- - - -
-

- - #typeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute type

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of type

    -
    - -
  • - -
- -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'compilers.rb', line 101
-
-def type
-  @type
-end
-
-
- - - -
-

- - #versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute version

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of version

    -
    - -
  • - -
- -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'compilers.rb', line 101
-
-def version
-  @version
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Context.html b/docs/Context.html deleted file mode 100644 index bd899ca15..000000000 --- a/docs/Context.html +++ /dev/null @@ -1,644 +0,0 @@ - - - - - - - Module: Context - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Context - - - Private -

- - -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Module for querying the current execution context.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: ContextStruct - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Class Method Details

- - -
-

- - .currentObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'context.rb', line 16
-
-def self.current
-  if (current_context = Thread.current[:context])
-    return current_context
-  end
-
-  synchronize do
-    @current ||= ContextStruct.new
-  end
-end
-
-
- -
-

- - .current=(context) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-
-
# File 'context.rb', line 10
-
-def self.current=(context)
-  synchronize do
-    @current = context
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #debug?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'context.rb', line 51
-
-def debug?
-  Context.current.debug?
-end
-
-
- -
-

- - #quiet?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'context.rb', line 56
-
-def quiet?
-  Context.current.quiet?
-end
-
-
- -
-

- - #verbose?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-61
-62
-63
-
-
# File 'context.rb', line 61
-
-def verbose?
-  Context.current.verbose?
-end
-
-
- -
-

- - #with_context(**options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-
-
# File 'context.rb', line 65
-
-def with_context(**options)
-  old_context = Thread.current[:context]
-
-  new_context = ContextStruct.new(
-    debug:   options.fetch(:debug, old_context&.debug?),
-    quiet:   options.fetch(:quiet, old_context&.quiet?),
-    verbose: options.fetch(:verbose, old_context&.verbose?),
-  )
-
-  Thread.current[:context] = new_context
-
-  begin
-    yield
-  ensure
-    Thread.current[:context] = old_context
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Context/ContextStruct.html b/docs/Context/ContextStruct.html deleted file mode 100644 index 8d3347d0c..000000000 --- a/docs/Context/ContextStruct.html +++ /dev/null @@ -1,462 +0,0 @@ - - - - - - - Class: Context::ContextStruct - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Context::ContextStruct - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
context.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Struct describing the current execution context.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(debug: nil, quiet: nil, verbose: nil) ⇒ ContextStruct - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ContextStruct.

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-
-
# File 'context.rb', line 28
-
-def initialize(debug: nil, quiet: nil, verbose: nil)
-  @debug = debug
-  @quiet = quiet
-  @verbose = verbose
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #debug?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'context.rb', line 35
-
-def debug?
-  @debug == true
-end
-
-
- -
-

- - #quiet?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-40
-41
-42
-
-
# File 'context.rb', line 40
-
-def quiet?
-  @quiet == true
-end
-
-
- -
-

- - #verbose?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-46
-47
-
-
# File 'context.rb', line 45
-
-def verbose?
-  @verbose == true
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CoreCaskTap.html b/docs/CoreCaskTap.html deleted file mode 100644 index 4a8731f39..000000000 --- a/docs/CoreCaskTap.html +++ /dev/null @@ -1,997 +0,0 @@ - - - - - - - Class: CoreCaskTap - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CoreCaskTap - - - Private -

-
- -
-
Inherits:
-
- AbstractCoreTap - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
tap.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A specialized Tap class for homebrew-cask.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from Tap

-

Tap::HOMEBREW_TAP_JSON_FILES, Tap::TAP_DIRECTORY

- - - - -

Instance Attribute Summary

- -

Attributes inherited from Tap

-

#full_name, #git_repository, #name, #path, #repository, #user

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCoreTap

-

#ensure_installed!, ensure_installed!, #formula_file_to_name, instance, #should_report_analytics?

- - - - - - - - - - -

Methods inherited from Tap

-

#alias_dir, #alias_file_to_name, #alias_files, #alias_reverse_table, #alias_table, #aliases, all, #allow_bump?, #allowed_by_env?, allowed_taps, #audit_exception, #audit_exceptions, #autobump, #cask_dir, #cask_file?, #cask_reverse_renames, #clear_cache, cmd_directories, #command_dir, #command_files, #config, #contents, #core_tap?, #custom_remote?, #default_remote, each, #ensure_installed!, fetch, #fix_remote_configuration, #forbidden_by_env?, forbidden_taps, #formula_dir, #formula_file?, #formula_file_to_name, #formula_files, #formula_files_by_name, #formula_names, #formula_renames, #formula_reverse_renames, from_path, #git?, #git_branch, #git_head, #git_last_commit, #install, installed, #installed?, #issues_url, #link_completions_and_manpages, names, #new_formula_path, #official?, #potential_formula_dirs, #prefix_to_versioned_formulae_names, #private?, #pypi_formula_mappings, #relative_cask_path, #remote, #remote_repo, #repository_var_suffix, #reverse_tap_migrations_renames, #shallow?, #should_report_analytics?, #style_exceptions, #synced_versions_formulae, tap_migration_oldnames, #to_hash, #uninstall, untapped_official_taps, with_cask_token, with_formula_name

- - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Enumerable

-

#compact_blank, #exclude?

-
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1393
-1394
-1395
-
-
# File 'tap.rb', line 1393
-
-def initialize
-  super "Homebrew", "cask"
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #cask_filesArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1413
-1414
-1415
-1416
-1417
-
-
# File 'tap.rb', line 1413
-
-def cask_files
-  return super if Homebrew::EnvConfig.no_install_from_api?
-
-  cask_files_by_name.values
-end
-
-
- -
-

- - #cask_files_by_nameHash{String => Pathname} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1427
-1428
-1429
-1430
-1431
-1432
-1433
-1434
-1435
-1436
-1437
-
-
# File 'tap.rb', line 1427
-
-def cask_files_by_name
-  return super if Homebrew::EnvConfig.no_install_from_api?
-
-  @cask_files_by_name ||= Homebrew::API::Cask.all_casks.each_with_object({}) do |item, hash|
-    name, cask_hash = item
-    # If there's more than one item with the same path: use the longer one to prioritise more specific results.
-    existing_path = hash[name]
-    new_path = path/cask_hash["ruby_source_path"]
-    hash[name] = new_path if existing_path.nil? || existing_path.to_s.length < new_path.to_s.length
-  end
-end
-
-
- -
-

- - #cask_renamesHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1440
-1441
-1442
-1443
-1444
-1445
-1446
-
-
# File 'tap.rb', line 1440
-
-def cask_renames
-  @cask_renames ||= if Homebrew::EnvConfig.no_install_from_api?
-    super
-  else
-    Homebrew::API::Cask.all_renames
-  end
-end
-
-
- -
-

- - #cask_tokensArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1420
-1421
-1422
-1423
-1424
-
-
# File 'tap.rb', line 1420
-
-def cask_tokens
-  return super if Homebrew::EnvConfig.no_install_from_api?
-
-  Homebrew::API::Cask.all_casks.keys
-end
-
-
- -
-

- - #core_cask_tap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1398
-1399
-1400
-
-
# File 'tap.rb', line 1398
-
-def core_cask_tap?
-  true
-end
-
-
- -
-

- - #new_cask_path(token) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - token - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1403
-1404
-1405
-1406
-1407
-1408
-1409
-1410
-
-
# File 'tap.rb', line 1403
-
-def new_cask_path(token)
-  cask_subdir = if token.start_with?("font-")
-    "font/font-#{token.delete_prefix("font-")[0]}"
-  else
-    token[0].to_s
-  end
-  cask_dir/cask_subdir/"#{token.downcase}.rb"
-end
-
-
- -
-

- - #tap_migrationsHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-1449
-1450
-1451
-1452
-1453
-1454
-1455
-1456
-1457
-
-
# File 'tap.rb', line 1449
-
-def tap_migrations
-  @tap_migrations ||= if Homebrew::EnvConfig.no_install_from_api?
-    super
-  else
-    migrations, = Homebrew::API.fetch_json_api_file "cask_tap_migrations.jws.json",
-                                                    stale_seconds: TAP_MIGRATIONS_STALE_SECONDS
-    migrations
-  end
-end
-
-
- -
-

- - #to_internal_api_hashHash{String => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{String => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-1460
-1461
-1462
-1463
-1464
-1465
-1466
-1467
-1468
-1469
-1470
-1471
-1472
-1473
-
-
# File 'tap.rb', line 1460
-
-def to_internal_api_hash
-  casks_api_hash = cask_tokens.to_h do |token|
-    cask = Cask::CaskLoader.load(token)
-    cask_hash = cask.to_hash_with_variations(hash_method: :to_internal_api_hash)
-    [token, cask_hash]
-  end
-
-  {
-    "tap_git_head"   => git_head,
-    "renames"        => cask_renames,
-    "tap_migrations" => tap_migrations,
-    "casks"          => casks_api_hash,
-  }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CoreTap.html b/docs/CoreTap.html deleted file mode 100644 index ddcbc4989..000000000 --- a/docs/CoreTap.html +++ /dev/null @@ -1,2205 +0,0 @@ - - - - - - - Class: CoreTap - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CoreTap - - - Private -

-
- -
-
Inherits:
-
- AbstractCoreTap - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
tap.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A specialized Tap class for the core formulae.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from Tap

-

Tap::HOMEBREW_TAP_JSON_FILES, Tap::TAP_DIRECTORY

- - - - -

Instance Attribute Summary

- -

Attributes inherited from Tap

-

#full_name, #git_repository, #name, #path, #repository, #user

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCoreTap

-

ensure_installed!, #formula_file_to_name, instance, #should_report_analytics?

- - - - - - - - - - -

Methods inherited from Tap

-

#alias_files, #alias_reverse_table, #aliases, all, #allow_bump?, #allowed_by_env?, allowed_taps, #audit_exception, #cask_dir, #cask_file?, #cask_files, #cask_files_by_name, #cask_renames, #cask_reverse_renames, #cask_tokens, #clear_cache, cmd_directories, #command_dir, #command_files, #config, #contents, #core_cask_tap?, #custom_remote?, #default_remote, each, fetch, #fix_remote_configuration, #forbidden_by_env?, forbidden_taps, #formula_file?, #formula_file_to_name, #formula_reverse_renames, from_path, #git?, #git_branch, #git_head, #git_last_commit, installed, #installed?, #issues_url, #link_completions_and_manpages, names, #new_cask_path, #official?, #potential_formula_dirs, #prefix_to_versioned_formulae_names, #private?, #relative_cask_path, #remote_repo, #repository_var_suffix, #reverse_tap_migrations_renames, #shallow?, #should_report_analytics?, tap_migration_oldnames, #to_hash, untapped_official_taps, with_cask_token, with_formula_name

- - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Enumerable

-

#compact_blank, #exclude?

-
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1183
-1184
-1185
-
-
# File 'tap.rb', line 1183
-
-def initialize
-  super "Homebrew", "core"
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #alias_dirPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1256
-1257
-1258
-1259
-1260
-1261
-
-
# File 'tap.rb', line 1256
-
-def alias_dir
-  @alias_dir ||= begin
-    ensure_installed!
-    super
-  end
-end
-
-
- -
-

- - #alias_file_to_name(file) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - file - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1328
-1329
-1330
-
-
# File 'tap.rb', line 1328
-
-def alias_file_to_name(file)
-  file.basename.to_s
-end
-
-
- -
-

- - #alias_tableHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1333
-1334
-1335
-1336
-1337
-1338
-1339
-
-
# File 'tap.rb', line 1333
-
-def alias_table
-  @alias_table ||= if Homebrew::EnvConfig.no_install_from_api?
-    super
-  else
-    Homebrew::API::Formula.all_aliases
-  end
-end
-
-
- -
-

- - #audit_exceptionsHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-1296
-1297
-1298
-1299
-1300
-1301
-
-
# File 'tap.rb', line 1296
-
-def audit_exceptions
-  @audit_exceptions ||= begin
-    ensure_installed!
-    super
-  end
-end
-
-
- -
-

- - #autobumpArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1288
-1289
-1290
-1291
-1292
-1293
-
-
# File 'tap.rb', line 1288
-
-def autobump
-  @autobump ||= begin
-    ensure_installed!
-    super
-  end
-end
-
-
- -
-

- - #core_tap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1225
-1226
-1227
-
-
# File 'tap.rb', line 1225
-
-def core_tap?
-  true
-end
-
-
- -
-

- - #ensure_installed!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1188
-1189
-1190
-1191
-1192
-
-
# File 'tap.rb', line 1188
-
-def ensure_installed!
-  return if ENV["HOMEBREW_TESTS"]
-
-  super
-end
-
-
- -
-

- - #formula_dirPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1235
-1236
-1237
-1238
-1239
-1240
-
-
# File 'tap.rb', line 1235
-
-def formula_dir
-  @formula_dir ||= begin
-    ensure_installed!
-    super
-  end
-end
-
-
- -
-

- - #formula_filesArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1342
-1343
-1344
-1345
-1346
-
-
# File 'tap.rb', line 1342
-
-def formula_files
-  return super if Homebrew::EnvConfig.no_install_from_api?
-
-  formula_files_by_name.values
-end
-
-
- -
-

- - #formula_files_by_nameHash{String => Pathname} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1356
-1357
-1358
-1359
-1360
-1361
-1362
-1363
-1364
-1365
-1366
-1367
-1368
-1369
-1370
-
-
# File 'tap.rb', line 1356
-
-def formula_files_by_name
-  return super if Homebrew::EnvConfig.no_install_from_api?
-
-  @formula_files_by_name ||= begin
-    tap_path = path.to_s
-    Homebrew::API::Formula.all_formulae.each_with_object({}) do |item, hash|
-      name, formula_hash = item
-      # If there's more than one item with the same path: use the longer one to prioritise more specific results.
-      existing_path = hash[name]
-      # Pathname equivalent is slow in a tight loop
-      new_path = File.join(tap_path, formula_hash.fetch("ruby_source_path"))
-      hash[name] = Pathname(new_path) if existing_path.nil? || existing_path.to_s.length < new_path.length
-    end
-  end
-end
-
-
- -
-

- - #formula_namesArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1349
-1350
-1351
-1352
-1353
-
-
# File 'tap.rb', line 1349
-
-def formula_names
-  return super if Homebrew::EnvConfig.no_install_from_api?
-
-  Homebrew::API::Formula.all_formulae.keys
-end
-
-
- -
-

- - #formula_renamesHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1264
-1265
-1266
-1267
-1268
-1269
-1270
-1271
-
-
# File 'tap.rb', line 1264
-
-def formula_renames
-  @formula_renames ||= if Homebrew::EnvConfig.no_install_from_api?
-    ensure_installed!
-    super
-  else
-    Homebrew::API::Formula.all_renames
-  end
-end
-
-
- -
-

- - #install(quiet: false, clone_target: nil, custom_remote: false, verify: false, force: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

CoreTap never allows shallow clones (on request from GitHub).

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-1202
-1203
-1204
-1205
-1206
-1207
-1208
-1209
-1210
-1211
-1212
-1213
-1214
-1215
-
-
# File 'tap.rb', line 1202
-
-def install(quiet: false, clone_target: nil,
-            custom_remote: false, verify: false, force: false)
-  remote = Homebrew::EnvConfig.core_git_remote # set by HOMEBREW_CORE_GIT_REMOTE
-  requested_remote = clone_target || remote
-
-  # The remote will changed again on `brew update` since remotes for homebrew/core are mismatched
-  raise TapCoreRemoteMismatchError.new(name, remote, requested_remote) if requested_remote != remote
-
-  if remote != default_remote
-    $stderr.puts "HOMEBREW_CORE_GIT_REMOTE set: using #{remote} as the Homebrew/homebrew-core Git remote."
-  end
-
-  super(quiet:, clone_target: remote, custom_remote:, force:)
-end
-
-
- -
-

- - #linuxbrew_core?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1230
-1231
-1232
-
-
# File 'tap.rb', line 1230
-
-def linuxbrew_core?
-  remote_repo.to_s.end_with?("/linuxbrew-core") || remote_repo == "Linuxbrew/homebrew-core"
-end
-
-
- -
-

- - #new_formula_path(name) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1243
-1244
-1245
-1246
-1247
-1248
-1249
-1250
-1251
-1252
-1253
-
-
# File 'tap.rb', line 1243
-
-def new_formula_path(name)
-  formula_subdir = if name.start_with?("lib")
-    "lib"
-  else
-    name[0].to_s
-  end
-
-  return super unless (formula_dir/formula_subdir).directory?
-
-  formula_dir/formula_subdir/"#{name.downcase}.rb"
-end
-
-
- -
-

- - #pypi_formula_mappingsHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-1312
-1313
-1314
-1315
-1316
-1317
-
-
# File 'tap.rb', line 1312
-
-def pypi_formula_mappings
-  @pypi_formula_mappings ||= begin
-    ensure_installed!
-    super
-  end
-end
-
-
- -
-

- - #remoteString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-1195
-1196
-1197
-1198
-1199
-
-
# File 'tap.rb', line 1195
-
-def remote
-  return super if Homebrew::EnvConfig.no_install_from_api?
-
-  Homebrew::EnvConfig.core_git_remote
-end
-
-
- -
-

- - #style_exceptionsHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-1304
-1305
-1306
-1307
-1308
-1309
-
-
# File 'tap.rb', line 1304
-
-def style_exceptions
-  @style_exceptions ||= begin
-    ensure_installed!
-    super
-  end
-end
-
-
- -
-

- - #synced_versions_formulaeArray<Array<String>> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1320
-1321
-1322
-1323
-1324
-1325
-
-
# File 'tap.rb', line 1320
-
-def synced_versions_formulae
-  @synced_versions_formulae ||= begin
-    ensure_installed!
-    super
-  end
-end
-
-
- -
-

- - #tap_migrationsHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-1274
-1275
-1276
-1277
-1278
-1279
-1280
-1281
-1282
-1283
-1284
-1285
-
-
# File 'tap.rb', line 1274
-
-def tap_migrations
-  @tap_migrations ||= if Homebrew::EnvConfig.no_install_from_api?
-    ensure_installed!
-    super
-  elsif Homebrew::API.internal_json_v3?
-    Homebrew::API::Formula.tap_migrations
-  else
-    migrations, = Homebrew::API.fetch_json_api_file "formula_tap_migrations.jws.json",
-                                                    stale_seconds: TAP_MIGRATIONS_STALE_SECONDS
-    migrations
-  end
-end
-
-
- -
-

- - #to_internal_api_hashHash{String => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{String => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-1373
-1374
-1375
-1376
-1377
-1378
-1379
-1380
-1381
-1382
-1383
-1384
-1385
-1386
-1387
-
-
# File 'tap.rb', line 1373
-
-def to_internal_api_hash
-  formulae_api_hash = formula_names.to_h do |name|
-    formula = Formulary.factory(name)
-    formula_hash = formula.to_hash_with_variations(hash_method: :to_internal_api_hash)
-    [name, formula_hash]
-  end
-
-  {
-    "tap_git_head"   => git_head,
-    "aliases"        => alias_table,
-    "renames"        => formula_renames,
-    "tap_migrations" => tap_migrations,
-    "formulae"       => formulae_api_hash,
-  }
-end
-
-
- -
-

- - #uninstall(manual: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - manual - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-1218
-1219
-1220
-1221
-1222
-
-
# File 'tap.rb', line 1218
-
-def uninstall(manual: false)
-  raise "Tap#uninstall is not available for CoreTap" if Homebrew::EnvConfig.no_install_from_api?
-
-  super
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CurlApacheMirrorDownloadStrategy.html b/docs/CurlApacheMirrorDownloadStrategy.html deleted file mode 100644 index e2e0e53d0..000000000 --- a/docs/CurlApacheMirrorDownloadStrategy.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - Class: CurlApacheMirrorDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CurlApacheMirrorDownloadStrategy - - - -

-
- -
-
Inherits:
-
- CurlDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a file from an Apache Mirror URL.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CurlDownloadStrategy

-

#clear_cache, #fetch, #initialize, #resolved_time_file_size

- - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from AbstractFileDownloadStrategy

-

#basename, #cached_location, #symlink_location, #temporary_path

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #initialize, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -

This class inherits a constructor from CurlDownloadStrategy

- -
- - -
-

Instance Method Details

- - -
-

- - #mirrorsObject - - - - - -

-
- - -
-
-
- - -
- - - - -
-
-
-
-639
-640
-641
-
-
# File 'download_strategy.rb', line 639
-
-def mirrors
-  combined_mirrors
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CurlDownloadStrategy.html b/docs/CurlDownloadStrategy.html deleted file mode 100644 index c18eeb3a9..000000000 --- a/docs/CurlDownloadStrategy.html +++ /dev/null @@ -1,698 +0,0 @@ - - - - - - - Class: CurlDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CurlDownloadStrategy - - - -

-
- -
-
Inherits:
-
- AbstractFileDownloadStrategy - - - show all - -
-
- - - - - - -
-
Includes:
-
Utils::Curl
-
- - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading files using curl.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from AbstractFileDownloadStrategy

-

#basename, #cached_location, #symlink_location, #temporary_path

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ CurlDownloadStrategy - - - - - -

-
-

Returns a new instance of CurlDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-
-
# File 'download_strategy.rb', line 379
-
-def initialize(url, name, version, **meta)
-  @try_partial = true
-  @mirrors = meta.fetch(:mirrors, [])
-
-  # Merge `:header` with `:headers`.
-  if (header = meta.delete(:header))
-    meta[:headers] ||= []
-    meta[:headers] << header
-  end
-
-  super
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #mirrorsObject (readonly) - - - - - -

-
- - -
-
-
- - -
- - - - -
-
-
-
-377
-378
-379
-
-
# File 'download_strategy.rb', line 377
-
-def mirrors
-  @mirrors
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #clear_cacheObject - - - - - -

-
- - -
-
-
- - -
- - - - -
-
-
-
-457
-458
-459
-460
-
-
# File 'download_strategy.rb', line 457
-
-def clear_cache
-  super
-  rm_rf(temporary_path)
-end
-
-
- -
-

- - #fetch(timeout: nil) ⇒ Object - - - - - -

-
-

Download and cache the file at AbstractFileDownloadStrategy#cached_location.

- - -
-
-
- - -
- - - - -
-
-
-
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-
-
# File 'download_strategy.rb', line 395
-
-def fetch(timeout: nil)
-  end_time = Time.now + timeout if timeout
-
-  download_lock = LockFile.new(temporary_path.basename)
-  download_lock.lock
-
-  urls = [url, *mirrors]
-
-  begin
-    url = urls.shift
-
-    if (domain = Homebrew::EnvConfig.artifact_domain)
-      url = url.sub(%r{^https?://#{GitHubPackages::URL_DOMAIN}/}o, "#{domain.chomp("/")}/")
-      urls = [] if Homebrew::EnvConfig.artifact_domain_no_fallback?
-    end
-
-    ohai "Downloading #{url}"
-
-    use_cached_location = cached_location.exist?
-    use_cached_location = false if version.respond_to?(:latest?) && version.latest?
-
-    resolved_url, _, last_modified, _, is_redirection = begin
-      resolve_url_basename_time_file_size(url, timeout: Utils::Timer.remaining!(end_time))
-    rescue ErrorDuringExecution
-      raise unless use_cached_location
-    end
-
-    # Authorization is no longer valid after redirects
-    meta[:headers]&.delete_if { |header| header.start_with?("Authorization") } if is_redirection
-
-    # The cached location is no longer fresh if Last-Modified is after the file's timestamp
-    use_cached_location = false if cached_location.exist? && last_modified && last_modified > cached_location.mtime
-
-    if use_cached_location
-      puts "Already downloaded: #{cached_location}"
-    else
-      begin
-        _fetch(url:, resolved_url:, timeout: Utils::Timer.remaining!(end_time))
-      rescue ErrorDuringExecution
-        raise CurlDownloadStrategyError, url
-      end
-      ignore_interrupts do
-        cached_location.dirname.mkpath
-        temporary_path.rename(cached_location)
-        symlink_location.dirname.mkpath
-      end
-    end
-
-    FileUtils.ln_s cached_location.relative_path_from(symlink_location.dirname), symlink_location, force: true
-  rescue CurlDownloadStrategyError
-    raise if urls.empty?
-
-    puts "Trying a mirror..."
-    retry
-  rescue Timeout::Error => e
-    raise Timeout::Error, "Timed out downloading #{self.url}: #{e}"
-  end
-ensure
-  download_lock&.unlock
-  download_lock&.path&.unlink
-end
-
-
- -
-

- - #resolved_time_file_size(timeout: nil) ⇒ Object - - - - - -

-
- - -
-
-
- - -
- - - - -
-
-
-
-462
-463
-464
-465
-
-
# File 'download_strategy.rb', line 462
-
-def resolved_time_file_size(timeout: nil)
-  _, _, time, file_size = resolve_url_basename_time_file_size(url, timeout:)
-  [time, file_size]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CurlDownloadStrategyError.html b/docs/CurlDownloadStrategyError.html deleted file mode 100644 index 9dfd26e28..000000000 --- a/docs/CurlDownloadStrategyError.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - Exception: CurlDownloadStrategyError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: CurlDownloadStrategyError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised in CurlDownloadStrategy#fetch.

- - -
-
-
- - -
-

Direct Known Subclasses

-

HomebrewCurlDownloadStrategyError

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(url) ⇒ CurlDownloadStrategyError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CurlDownloadStrategyError.

- - -
-
-
- - -
- - - - -
-
-
-
-625
-626
-627
-628
-629
-630
-631
-632
-
-
# File 'exceptions.rb', line 625
-
-def initialize(url)
-  case url
-  when %r{^file://(.+)}
-    super "File does not exist: #{Regexp.last_match(1)}"
-  else
-    super "Download failed: #{url}"
-  end
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/CurlGitHubPackagesDownloadStrategy.html b/docs/CurlGitHubPackagesDownloadStrategy.html deleted file mode 100644 index 7e32c1e2c..000000000 --- a/docs/CurlGitHubPackagesDownloadStrategy.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - Class: CurlGitHubPackagesDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CurlGitHubPackagesDownloadStrategy - - - -

-
- -
-
Inherits:
-
- CurlDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a file from an GitHub Packages URL.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from CurlDownloadStrategy

-

#mirrors

- - - -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CurlDownloadStrategy

-

#clear_cache, #fetch, #resolved_time_file_size

- - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from AbstractFileDownloadStrategy

-

#basename, #cached_location, #symlink_location, #temporary_path

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ CurlGitHubPackagesDownloadStrategy - - - - - -

-
-

Returns a new instance of CurlGitHubPackagesDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-618
-619
-620
-621
-622
-623
-624
-
-
# File 'download_strategy.rb', line 618
-
-def initialize(url, name, version, **meta)
-  meta[:headers] ||= []
-  # GitHub Packages authorization header.
-  # HOMEBREW_GITHUB_PACKAGES_AUTH set in brew.sh
-  meta[:headers] << "Authorization: #{HOMEBREW_GITHUB_PACKAGES_AUTH}"
-  super
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #resolved_basename=(value) ⇒ Object (writeonly) - - - - - -

-
- - -
-
-
- - -
- - - - -
-
-
-
-616
-617
-618
-
-
# File 'download_strategy.rb', line 616
-
-def resolved_basename=(value)
-  @resolved_basename = value
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/CurlPostDownloadStrategy.html b/docs/CurlPostDownloadStrategy.html deleted file mode 100644 index 3626f4df8..000000000 --- a/docs/CurlPostDownloadStrategy.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - Class: CurlPostDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CurlPostDownloadStrategy - - - -

-
- -
-
Inherits:
-
- CurlDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading via an HTTP POST request using curl. -Query parameters on the URL are converted into POST parameters.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CurlDownloadStrategy

-

#mirrors

- - - -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - - - - - - - -

Method Summary

- -

Methods inherited from CurlDownloadStrategy

-

#clear_cache, #fetch, #initialize, #resolved_time_file_size

- - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from AbstractFileDownloadStrategy

-

#basename, #cached_location, #symlink_location, #temporary_path

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #initialize, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -

This class inherits a constructor from CurlDownloadStrategy

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/CxxStdlib.html b/docs/CxxStdlib.html deleted file mode 100644 index f2b32d2ba..000000000 --- a/docs/CxxStdlib.html +++ /dev/null @@ -1,542 +0,0 @@ - - - - - - - Class: CxxStdlib - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: CxxStdlib - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cxxstdlib.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Combination of C++ standard library and compiler.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(type, compiler) ⇒ CxxStdlib - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CxxStdlib.

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-
-
# File 'cxxstdlib.rb', line 16
-
-def initialize(type, compiler)
-  @type = type
-  @compiler = compiler.to_sym
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #compilerObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'cxxstdlib.rb', line 14
-
-def compiler
-  @compiler
-end
-
-
- - - -
-

- - #typeObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'cxxstdlib.rb', line 14
-
-def type
-  @type
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .create(type, compiler) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-
-
# File 'cxxstdlib.rb', line 8
-
-def self.create(type, compiler)
-  raise ArgumentError, "Invalid C++ stdlib type: #{type}" if type && [:libstdcxx, :libcxx].exclude?(type)
-
-  CxxStdlib.new(type, compiler)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #type_stringObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'cxxstdlib.rb', line 21
-
-def type_string
-  type.to_s.gsub(/cxx$/, "c++")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/CyclicDependencyError.html b/docs/CyclicDependencyError.html deleted file mode 100644 index 79d51f8b5..000000000 --- a/docs/CyclicDependencyError.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - Exception: CyclicDependencyError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: CyclicDependencyError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when one or more formulae have cyclic dependencies.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(strongly_connected_components) ⇒ CyclicDependencyError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CyclicDependencyError.

- - -
-
-
- - -
- - - - -
-
-
-
-782
-783
-784
-785
-786
-787
-
-
# File 'exceptions.rb', line 782
-
-def initialize(strongly_connected_components)
-  super <<~EOS
-    The following packages contain cyclic dependencies:
-      #{strongly_connected_components.select { |packages| packages.count > 1 }.map(&:to_sentence).join("\n  ")}
-  EOS
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/DATAPatch.html b/docs/DATAPatch.html deleted file mode 100644 index 4836ba59e..000000000 --- a/docs/DATAPatch.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - Class: DATAPatch - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: DATAPatch - - - Private -

-
- -
-
Inherits:
-
- EmbeddedPatch - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
patch.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A patch at the __END__ of a formula file.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from EmbeddedPatch

-

#owner, #strip

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from EmbeddedPatch

-

#apply, #external?

-
-

Constructor Details

- -
-

- - #initialize(strip) ⇒ DATAPatch - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of DATAPatch.

- - -
-
-
- - -
- - - - -
-
-
-
-64
-65
-66
-67
-
-
# File 'patch.rb', line 64
-
-def initialize(strip)
-  super
-  @path = nil
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'patch.rb', line 62
-
-def path
-  @path
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #contentsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'patch.rb', line 70
-
-def contents
-  data = +""
-  path.open("rb") do |f|
-    loop do
-      line = f.gets
-      break if line.nil? || /^__END__$/.match?(line)
-    end
-    while (line = f.gets)
-      data << line
-    end
-  end
-  data.freeze
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Debrew.html b/docs/Debrew.html deleted file mode 100644 index da30d360e..000000000 --- a/docs/Debrew.html +++ /dev/null @@ -1,554 +0,0 @@ - - - - - - - Module: Debrew - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Debrew - - - Private -

-
- - - - -
-
Extended by:
-
Attrable, Mutex_m
-
- - - - - - - - -
-
Defined in:
-
debrew.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for debugging formulae.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Formula - - - - Classes: Menu - - -

- - - - -

Class Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- -
-

Class Attribute Details

- - - -
-

- - .debugged_exceptionsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-78
-79
-80
-
-
# File 'debrew.rb', line 78
-
-def debugged_exceptions
-  @debugged_exceptions
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .active?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-
-
# File 'sorbet/rbi/parlour.rbi', line 31
-
-def self.active?; end
-
-
- -
-

- - .debrewObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'debrew.rb', line 81
-
-def self.debrew
-  @active = true
-  Ignorable.hook_raise
-
-  begin
-    yield
-  rescue SystemExit
-    raise
-  rescue Ignorable::ExceptionMixin => e
-    e.ignore if debug(e) == :ignore # execution jumps back to where the exception was thrown
-  ensure
-    Ignorable.unhook_raise
-    @active = false
-  end
-end
-
-
- -
-

- - .debug(exception) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-
-
# File 'debrew.rb', line 97
-
-def self.debug(exception)
-  raise(exception) if !active? || !debugged_exceptions.add?(exception) || !mu_try_lock
-
-  begin
-    puts exception.backtrace.first
-    puts Formatter.error(exception, label: exception.class.name)
-
-    loop do
-      Menu.choose do |menu|
-        menu.prompt = "Choose an action: "
-
-        menu.choice(:raise) { raise(exception) }
-        menu.choice(:ignore) { return :ignore } if exception.is_a?(Ignorable::ExceptionMixin)
-        menu.choice(:backtrace) { puts exception.backtrace }
-
-        if exception.is_a?(Ignorable::ExceptionMixin)
-          menu.choice(:irb) do
-            puts "When you exit this IRB session, execution will continue."
-            set_trace_func proc { |event, _, _, id, binding, klass|
-              if klass == Object && id == :raise && event == "return"
-                set_trace_func(nil)
-                mu_synchronize do
-                  require "debrew/irb"
-                  IRB.start_within(binding)
-                end
-              end
-            }
-
-            return :ignore
-          end
-        end
-
-        menu.choice(:shell) do
-          puts "When you exit this shell, you will return to the menu."
-          interactive_shell
-        end
-      end
-    end
-  ensure
-    mu_unlock
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Debrew/Formula.html b/docs/Debrew/Formula.html deleted file mode 100644 index 2efc18811..000000000 --- a/docs/Debrew/Formula.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - Module: Debrew::Formula - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Debrew::Formula - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
debrew.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Module for allowing to debug formulae.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #installObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'debrew.rb', line 14
-
-def install
-  Debrew.debrew { super }
-end
-
-
- -
-

- - #patchObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'debrew.rb', line 18
-
-def patch
-  Debrew.debrew { super }
-end
-
-
- -
-

- - #testObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'debrew.rb', line 22
-
-def test
-  Debrew.debrew { super }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Debrew/Menu.html b/docs/Debrew/Menu.html deleted file mode 100644 index 2247ebcbe..000000000 --- a/docs/Debrew/Menu.html +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - Class: Debrew::Menu - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Debrew::Menu - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
debrew.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Module for displaying a debugging menu.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Entry - - -

- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'debrew.rb', line 34
-
-def initialize
-  @entries = []
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #entriesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'debrew.rb', line 31
-
-def entries
-  @entries
-end
-
-
- - - -
-

- - #promptObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'debrew.rb', line 31
-
-def prompt
-  @prompt
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .choose {|menu| ... } ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Yields:

-
    - -
  • - - - (menu) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'debrew.rb', line 42
-
-def self.choose
-  menu = new
-  yield menu
-
-  choice = T.let(nil, T.nilable(Entry))
-  while choice.nil?
-    menu.entries.each_with_index { |e, i| puts "#{i + 1}. #{e.name}" }
-    print menu.prompt unless menu.prompt.nil?
-
-    input = $stdin.gets || exit
-    input.chomp!
-
-    i = input.to_i
-    if i.positive?
-      choice = menu.entries[i - 1]
-    else
-      possible = menu.entries.select { |e| e.name.start_with?(input) }
-
-      case possible.size
-      when 0 then puts "No such option"
-      when 1 then choice = possible.first
-      else puts "Multiple options match: #{possible.map(&:name).join(" ")}"
-      end
-    end
-  end
-
-  choice[:action].call
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #choice(name, &action) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'debrew.rb', line 38
-
-def choice(name, &action)
-  entries << Entry.new(name.to_s, action)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Debrew/Menu/Entry.html b/docs/Debrew/Menu/Entry.html deleted file mode 100644 index 790272296..000000000 --- a/docs/Debrew/Menu/Entry.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - Class: Debrew::Menu::Entry - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Debrew::Menu::Entry - - - Private -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
debrew.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #action ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute action.

    -
    - -
  • - - - -
  • - - - #name ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute name.

    -
    - -
  • - - -
- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #actionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute action

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of action

    -
    - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'debrew.rb', line 29
-
-def action
-  @action
-end
-
-
- - - -
-

- - #nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute name

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of name

    -
    - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'debrew.rb', line 29
-
-def name
-  @name
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Dependable.html b/docs/Dependable.html deleted file mode 100644 index 718c6350b..000000000 --- a/docs/Dependable.html +++ /dev/null @@ -1,1018 +0,0 @@ - - - - - - - Module: Dependable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Dependable - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Dependency, Requirement
-
- - - -
-
Defined in:
-
dependable.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Shared functions for classes which can be depended upon.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
RESERVED_TAGS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

:run and :linked are no longer used but keep them here to avoid their -misuse in future.

- - -
-
-
- - -
-
-
[:build, :optional, :recommended, :run, :test, :linked, :implicit].freeze
- -
- - - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #tags ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Instance Attribute Details

- - - -
-

- - #tagsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'dependable.rb', line 12
-
-def tags
-  @tags
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #build?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'dependable.rb', line 14
-
-def build?
-  tags.include? :build
-end
-
-
- -
-

- - #implicit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'dependable.rb', line 30
-
-def implicit?
-  tags.include? :implicit
-end
-
-
- -
-

- - #option_tagsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'dependable.rb', line 38
-
-def option_tags
-  tags - RESERVED_TAGS
-end
-
-
- -
-

- - #optional?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'dependable.rb', line 18
-
-def optional?
-  tags.include? :optional
-end
-
-
- -
-

- - #optionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'dependable.rb', line 42
-
-def options
-  Options.create(option_tags)
-end
-
-
- -
-

- - #prune_from_option?(build) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-
-
# File 'dependable.rb', line 46
-
-def prune_from_option?(build)
-  return false if !optional? && !recommended?
-
-  build.without?(self)
-end
-
-
- -
-

- - #prune_if_build_and_not_dependent?(dependent, formula = nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-
-
# File 'dependable.rb', line 52
-
-def prune_if_build_and_not_dependent?(dependent, formula = nil)
-  return false unless build?
-  return dependent.installed? unless formula
-
-  dependent != formula
-end
-
-
- -
-

- - #recommended?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'dependable.rb', line 22
-
-def recommended?
-  tags.include? :recommended
-end
-
-
- -
-

- - #required?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'dependable.rb', line 34
-
-def required?
-  !build? && !test? && !optional? && !recommended?
-end
-
-
- -
-

- - #test?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'dependable.rb', line 26
-
-def test?
-  tags.include? :test
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Dependencies.html b/docs/Dependencies.html deleted file mode 100644 index a0b172c44..000000000 --- a/docs/Dependencies.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - Class: Dependencies - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Dependencies - - - Private -

-
- -
-
Inherits:
-
- SimpleDelegator - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
dependencies.rb,
- dependencies.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- -
-

Constructor Details

- -
-

- - #initialize(*args) ⇒ Dependencies - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Dependencies.

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'dependencies.rb', line 8
-
-def initialize(*args)
-  super(args)
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #buildObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'dependencies.rb', line 22
-
-def build
-  __getobj__.select(&:build?)
-end
-
-
- -
-

- - #defaultObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'dependencies.rb', line 30
-
-def default
-  build + required + recommended
-end
-
-
- -
-

- - #dup_without_system_depsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'dependencies.rb', line 34
-
-def dup_without_system_deps
-  self.class.new(*__getobj__.reject { |dep| dep.uses_from_macos? && dep.use_macos_install? })
-end
-
-
- -
-

- - #optionalObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'dependencies.rb', line 14
-
-def optional
-  __getobj__.select(&:optional?)
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'dependencies.rb', line 18
-
-def recommended
-  __getobj__.select(&:recommended?)
-end
-
-
- -
-

- - #requiredObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'dependencies.rb', line 26
-
-def required
-  __getobj__.select(&:required?)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/DependenciesHelpers.html b/docs/DependenciesHelpers.html deleted file mode 100644 index dafd12406..000000000 --- a/docs/DependenciesHelpers.html +++ /dev/null @@ -1,515 +0,0 @@ - - - - - - - Module: DependenciesHelpers - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: DependenciesHelpers - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - -
-
Included in:
-
Homebrew::Cmd::Deps, Homebrew::Cmd::Uses
-
- - - -
-
Defined in:
-
dependencies_helpers.rb,
- dependencies_helpers.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .dependents(formulae_or_casks) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'dependencies_helpers.rb', line 49
-
-def dependents(formulae_or_casks)
-  formulae_or_casks.map do |formula_or_cask|
-    if formula_or_cask.is_a?(Formula)
-      formula_or_cask
-    else
-      CaskDependent.new(formula_or_cask)
-    end
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #args_includes_ignores(args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-
-
# File 'dependencies_helpers.rb', line 8
-
-def args_includes_ignores(args)
-  includes = [:required?, :recommended?] # included by default
-  includes << :build? if args.include_build?
-  includes << :test? if args.include_test?
-  includes << :optional? if args.include_optional?
-
-  ignores = []
-  ignores << :recommended? if args.skip_recommended?
-  ignores << :satisfied? if args.missing?
-
-  [includes, ignores]
-end
-
-
- -
-

- - #recursive_includes(klass, root_dependent, includes, ignores) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
# File 'dependencies_helpers.rb', line 21
-
-def recursive_includes(klass, root_dependent, includes, ignores)
-  raise ArgumentError, "Invalid class argument: #{klass}" if klass != Dependency && klass != Requirement
-
-  cache_key = "recursive_includes_#{includes}_#{ignores}"
-
-  klass.expand(root_dependent, cache_key:) do |dependent, dep|
-    klass.prune if ignores.any? { |ignore| dep.public_send(ignore) }
-    klass.prune if includes.none? do |include|
-      # Ignore indirect test dependencies
-      next if include == :test? && dependent != root_dependent
-
-      dep.public_send(include)
-    end
-
-    # If a tap isn't installed, we can't find the dependencies of one of
-    # its formulae and an exception will be thrown if we try.
-    Dependency.keep_but_prune_recursive_deps if klass == Dependency && dep.tap && !dep.tap.installed?
-  end
-end
-
-
- -
-

- - #select_includes(dependables, ignores, includes) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'dependencies_helpers.rb', line 41
-
-def select_includes(dependables, ignores, includes)
-  dependables.select do |dep|
-    next false if ignores.any? { |ignore| dep.public_send(ignore) }
-
-    includes.any? { |include| dep.public_send(include) }
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Dependency.html b/docs/Dependency.html deleted file mode 100644 index 1f34d0965..000000000 --- a/docs/Dependency.html +++ /dev/null @@ -1,1622 +0,0 @@ - - - - - - - Class: Dependency - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Dependency - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Cachable, Forwardable
-
- - - -
-
Includes:
-
Dependable
-
- - - - - - -
-
Defined in:
-
dependency.rb
-
- -
- -

Overview

-
-

- This class is part of an internal API. - This class may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A dependency on another Homebrew formula.

- - -
-
-
- - -
-

Direct Known Subclasses

-

UsesFromMacOSDependency

-
- - - -

Constant Summary

- -

Constants included - from Dependable

-

Dependable::RESERVED_TAGS

- - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #name ⇒ String - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #tap ⇒ Tap? - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes included from Dependable

-

#tags

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

- - - - - - - - - -

Methods included from Dependable

-

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

-
-

Constructor Details

- -
-

- - #initialize(name, tags = []) ⇒ Dependency - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Dependency.

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'dependency.rb', line 20
-
-def initialize(name, tags = [])
-  raise ArgumentError, "Dependency must have a name!" unless name
-
-  @name = name
-  @tags = tags
-
-  return unless (tap_with_name = Tap.with_formula_name(name))
-
-  @tap, = tap_with_name
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #nameString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'dependency.rb', line 15
-
-def name
-  @name
-end
-
-
- - - -
-

- - #tapTap? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Tap, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'dependency.rb', line 18
-
-def tap
-  @tap
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .action(dependent, dep, &block) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-163
-164
-165
-166
-167
-168
-169
-170
-171
-
-
# File 'dependency.rb', line 163
-
-def action(dependent, dep, &block)
-  catch(:action) do
-    if block
-      yield dependent, dep
-    elsif dep.optional? || dep.recommended?
-      prune unless dependent.build.with?(dep)
-    end
-  end
-end
-
-
- -
-

- - .expand(dependent, deps = dependent.deps, cache_key: nil, &block) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Expand the dependencies of each dependent recursively, optionally yielding -[dependent, dep] pairs to allow callers to apply arbitrary filters to -the list. -The default filter, which is applied when a block is not given, omits -optionals and recommends based on what the dependent has asked for

- - -
-
-
- - -
- - - - -
-
-
-
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-
-
# File 'dependency.rb', line 120
-
-def expand(dependent, deps = dependent.deps, cache_key: nil, &block)
-  # Keep track dependencies to avoid infinite cyclic dependency recursion.
-  @expand_stack ||= []
-  @expand_stack.push dependent.name
-
-  if cache_key.present?
-    cache[cache_key] ||= {}
-    return cache[cache_key][cache_id dependent].dup if cache[cache_key][cache_id dependent]
-  end
-
-  expanded_deps = []
-
-  deps.each do |dep|
-    next if dependent.name == dep.name
-
-    case action(dependent, dep, &block)
-    when :prune
-      next
-    when :skip
-      next if @expand_stack.include? dep.name
-
-      expanded_deps.concat(expand(dep.to_formula, cache_key:, &block))
-    when :keep_but_prune_recursive_deps
-      expanded_deps << dep
-    else
-      next if @expand_stack.include? dep.name
-
-      dep_formula = dep.to_formula
-      expanded_deps.concat(expand(dep_formula, cache_key:, &block))
-
-      # Fixes names for renamed/aliased formulae.
-      dep = dep.dup_with_formula_name(dep_formula)
-      expanded_deps << dep
-    end
-  end
-
-  expanded_deps = merge_repeats(expanded_deps)
-  cache[cache_key][cache_id dependent] = expanded_deps.dup if cache_key.present?
-  expanded_deps
-ensure
-  @expand_stack.pop
-end
-
-
- -
-

- - .keep_but_prune_recursive_depsvoid - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Keep a dependency, but prune its dependencies.

- - -
-
-
- - -
- - - - -
-
-
-
-189
-190
-191
-
-
# File 'dependency.rb', line 189
-
-def keep_but_prune_recursive_deps
-  throw(:action, :keep_but_prune_recursive_deps)
-end
-
-
- -
-

- - .merge_repeats(all) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-
-
# File 'dependency.rb', line 193
-
-def merge_repeats(all)
-  grouped = all.group_by(&:name)
-
-  all.map(&:name).uniq.map do |name|
-    deps = grouped.fetch(name)
-    dep  = deps.first
-    tags = merge_tags(deps)
-    kwargs = {}
-    kwargs[:bounds] = dep.bounds if dep.uses_from_macos?
-    dep.class.new(name, tags, **kwargs)
-  end
-end
-
-
- -
-

- - .prunevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Prune a dependency and its dependencies recursively.

- - -
-
-
- - -
- - - - -
-
-
-
-175
-176
-177
-
-
# File 'dependency.rb', line 175
-
-def prune
-  throw(:action, :prune)
-end
-
-
- -
-

- - .skipvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Prune a single dependency but do not prune its dependencies.

- - -
-
-
- - -
- - - - -
-
-
-
-181
-182
-183
-
-
# File 'dependency.rb', line 181
-
-def skip
-  throw(:action, :skip)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dup_with_formula_name(formula) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-108
-109
-110
-
-
# File 'dependency.rb', line 108
-
-def dup_with_formula_name(formula)
-  self.class.new(formula.full_name.to_s, tags)
-end
-
-
- -
-

- - #installed?(minimum_version: nil, minimum_revision: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - minimum_version - - - (Version, nil) - - - (defaults to: nil) - - -
  • - -
  • - - minimum_revision - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'dependency.rb', line 47
-
-def installed?(minimum_version: nil, minimum_revision: nil)
-  formula = begin
-    to_formula
-  rescue FormulaUnavailableError
-    nil
-  end
-  return false unless formula
-
-  return true if formula.latest_version_installed?
-
-  return false if minimum_version.blank?
-
-  installed_version = formula.any_installed_version
-  return false unless installed_version
-
-  # Tabs prior to 4.1.18 did not have revision or pkg_version fields.
-  # As a result, we have to be more conversative when we do not have
-  # a minimum revision from the tab and assume that if the formula has a
-  # the same version and a non-zero revision that it needs upgraded.
-  if minimum_revision.present?
-    minimum_pkg_version = PkgVersion.new(minimum_version, minimum_revision)
-    installed_version >= minimum_pkg_version
-  elsif installed_version.version == minimum_version
-    formula.revision.zero?
-  else
-    installed_version.version > minimum_version
-  end
-end
-
-
- -
-

- - #missing_options(inherited_options) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-81
-82
-83
-84
-85
-86
-87
-88
-
-
# File 'dependency.rb', line 81
-
-def missing_options(inherited_options)
-  formula = to_formula
-  required = options
-  required |= inherited_options
-  required &= formula.options.to_a
-  required -= Tab.for_formula(formula).used_options
-  required
-end
-
-
- -
-

- - #option_namesObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'dependency.rb', line 90
-
-def option_names
-  [name.split("/").last].freeze
-end
-
-
- -
-

- - #satisfied?(inherited_options = [], minimum_version: nil, minimum_revision: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-76
-77
-78
-79
-
-
# File 'dependency.rb', line 76
-
-def satisfied?(inherited_options = [], minimum_version: nil, minimum_revision: nil)
-  installed?(minimum_version:, minimum_revision:) &&
-    missing_options(inherited_options).empty?
-end
-
-
- -
-

- - #to_formulaObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-
-
# File 'dependency.rb', line 40
-
-def to_formula
-  formula = Formulary.factory(name, warn: false)
-  formula.build = BuildOptions.new(options, formula.options)
-  formula
-end
-
-
- -
-

- - #uses_from_macos?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-95
-96
-97
-
-
# File 'dependency.rb', line 95
-
-def uses_from_macos?
-  false
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/DependencyCollector.html b/docs/DependencyCollector.html deleted file mode 100644 index d9828950d..000000000 --- a/docs/DependencyCollector.html +++ /dev/null @@ -1,1652 +0,0 @@ - - - - - - - Class: DependencyCollector - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: DependencyCollector - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Cachable
-
- - - - - - - - -
-
Defined in:
-
extend/os/mac/dependency_collector.rb,
- extend/os/linux/dependency_collector.rb,
dependency_collector.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This class is used by depends_on in the formula DSL to turn dependency -specifications into the proper kinds of dependencies and requirements.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

-
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'dependency_collector.rb', line 26
-
-def initialize
-  # Ensure this is synced with `initialize_dup` and `freeze` (excluding simple objects like integers and booleans)
-  @deps = Dependencies.new
-  @requirements = Requirements.new
-
-  init_global_dep_tree_if_needed!
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #depsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'dependency_collector.rb', line 23
-
-def deps
-  @deps
-end
-
-
- - - -
-

- - #requirementsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'dependency_collector.rb', line 23
-
-def requirements
-  @requirements
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .tar_needs_xz_dependency?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-126
-127
-
-
# File 'dependency_collector.rb', line 125
-
-def self.tar_needs_xz_dependency?
-  !new.xz_dep_if_needed([]).nil?
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #add(spec) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-
-
# File 'dependency_collector.rb', line 46
-
-def add(spec)
-  case dep = fetch(spec)
-  when Array
-    dep.compact.each { |dep| @deps << dep }
-  when Dependency
-    @deps << dep
-  when Requirement
-    @requirements << dep
-  when nil
-    # no-op when we have a nil value
-    nil
-  else
-    raise ArgumentError, "DependencyCollector#add passed something that isn't a Dependency or Requirement!"
-  end
-  dep
-end
-
-
- -
-

- - #build(spec) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-78
-79
-80
-81
-
-
# File 'dependency_collector.rb', line 78
-
-def build(spec)
-  spec, tags = spec.is_a?(Hash) ? spec.first : spec
-  parse_spec(spec, Array(tags))
-end
-
-
- -
-

- - #bzip2_dep_if_needed(tags) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-22
-
-
# File 'extend/os/mac/dependency_collector.rb', line 22
-
-def bzip2_dep_if_needed(tags); end
-
-
- -
-

- - #cache_key(spec) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-
-
# File 'dependency_collector.rb', line 67
-
-def cache_key(spec)
-  if spec.is_a?(Resource)
-    if spec.download_strategy <= CurlDownloadStrategy
-      return "#{spec.download_strategy}#{File.extname(spec.url).split("?").first}"
-    end
-
-    return spec.download_strategy
-  end
-  spec
-end
-
-
- -
-

- - #curl_dep_if_needed(tags) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-95
-96
-97
-
-
# File 'dependency_collector.rb', line 95
-
-def curl_dep_if_needed(tags)
-  Dependency.new("curl", [*tags, :implicit])
-end
-
-
- -
-

- - #cvs_dep_if_needed(tags) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'extend/os/mac/dependency_collector.rb', line 14
-
-def cvs_dep_if_needed(tags)
-  Dependency.new("cvs", [*tags, :implicit])
-end
-
-
- -
-

- - #fetch(spec) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-63
-64
-65
-
-
# File 'dependency_collector.rb', line 63
-
-def fetch(spec)
-  self.class.cache.fetch(cache_key(spec)) { |key| self.class.cache[key] = build(spec) }
-end
-
-
- -
-

- - #freezeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-
-
# File 'dependency_collector.rb', line 40
-
-def freeze
-  @deps.freeze
-  @requirements.freeze
-  super
-end
-
-
- -
-

- - #gcc_dep_if_needed(related_formula_names) ⇒ Dependency? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - related_formula_names - - - (Array<String>) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'extend/os/linux/dependency_collector.rb', line 12
-
-def gcc_dep_if_needed(related_formula_names)
-  # gcc is required for libgcc_s.so.1 if glibc or gcc are too old
-  return unless DevelopmentTools.needs_build_formulae?
-  return if building_global_dep_tree?
-  return if related_formula_names.include?(GCC)
-  return if global_dep_tree[GCC]&.intersect?(related_formula_names)
-  return unless formula_for(GCC)
-
-  Dependency.new(GCC, [:implicit])
-end
-
-
- -
-

- - #git_dep_if_needed(tags) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-8
-
-
# File 'extend/os/mac/dependency_collector.rb', line 8
-
-def git_dep_if_needed(tags); end
-
-
- -
-

- - #glibc_dep_if_needed(related_formula_names) ⇒ Dependency? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - related_formula_names - - - (Array<String>) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'extend/os/linux/dependency_collector.rb', line 24
-
-def glibc_dep_if_needed(related_formula_names)
-  return unless DevelopmentTools.needs_libc_formula?
-  return if building_global_dep_tree?
-  return if related_formula_names.include?(GLIBC)
-  return if global_dep_tree[GLIBC]&.intersect?(related_formula_names)
-  return unless formula_for(GLIBC)
-
-  Dependency.new(GLIBC, [:implicit])
-end
-
-
- -
-

- - #initialize_dup(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-
-
# File 'dependency_collector.rb', line 34
-
-def initialize_dup(other)
-  super
-  @deps = @deps.dup
-  @requirements = @requirements.dup
-end
-
-
- -
-

- - #subversion_dep_if_needed(tags) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'extend/os/mac/dependency_collector.rb', line 10
-
-def subversion_dep_if_needed(tags)
-  Dependency.new("subversion", [*tags, :implicit])
-end
-
-
- -
-

- - #unzip_dep_if_needed(tags) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-
-
# File 'extend/os/mac/dependency_collector.rb', line 20
-
-def unzip_dep_if_needed(tags); end
-
-
- -
-

- - #xz_dep_if_needed(tags) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-
-
# File 'extend/os/mac/dependency_collector.rb', line 18
-
-def xz_dep_if_needed(tags); end
-
-
- -
-

- - #zstd_dep_if_needed(tags) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-113
-114
-115
-
-
# File 'dependency_collector.rb', line 113
-
-def zstd_dep_if_needed(tags)
-  Dependency.new("zstd", [*tags, :implicit]) unless which("zstd")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/DeprecateDisable.html b/docs/DeprecateDisable.html deleted file mode 100644 index b274e91b0..000000000 --- a/docs/DeprecateDisable.html +++ /dev/null @@ -1,449 +0,0 @@ - - - - - - - Module: DeprecateDisable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: DeprecateDisable - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
deprecate_disable.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for handling disable! and deprecate!.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
FORMULA_DEPRECATE_DISABLE_REASONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  does_not_build:      "does not build",
-  no_license:          "has no license",
-  repo_archived:       "has an archived upstream repository",
-  repo_removed:        "has a removed upstream repository",
-  unmaintained:        "is not maintained upstream",
-  unsupported:         "is not supported upstream",
-  deprecated_upstream: "is deprecated upstream",
-  versioned_formula:   "is a versioned formula",
-  checksum_mismatch:   "was built with an initially released source file that had " \
-                       "a different checksum than the current one. " \
-                       "Upstream's repository might have been compromised. " \
-                       "We can re-package this once upstream has confirmed that they retagged their release",
-}.freeze
- -
CASK_DEPRECATE_DISABLE_REASONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  discontinued:             "is discontinued upstream",
-  moved_to_mas:             "is now exclusively distributed on the Mac App Store",
-  no_longer_available:      "is no longer available upstream",
-  no_longer_meets_criteria: "no longer meets the criteria for acceptable casks",
-  unmaintained:             "is not maintained upstream",
-  unsigned:                 "is unsigned or does not meet signature requirements",
-}.freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .message(formula_or_cask) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'deprecate_disable.rb', line 38
-
-def message(formula_or_cask)
-  return if type(formula_or_cask).blank?
-
-  reason = if formula_or_cask.deprecated?
-    formula_or_cask.deprecation_reason
-  elsif formula_or_cask.disabled?
-    formula_or_cask.disable_reason
-  end
-
-  reason = if formula_or_cask.is_a?(Formula) && FORMULA_DEPRECATE_DISABLE_REASONS.key?(reason)
-    FORMULA_DEPRECATE_DISABLE_REASONS[reason]
-  elsif formula_or_cask.is_a?(Cask::Cask) && CASK_DEPRECATE_DISABLE_REASONS.key?(reason)
-    CASK_DEPRECATE_DISABLE_REASONS[reason]
-  else
-    reason
-  end
-
-  return "#{type(formula_or_cask)} because it #{reason}!" if reason.present?
-
-  "#{type(formula_or_cask)}!"
-end
-
-
- -
-

- - .to_reason_string_or_symbol(string, type:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-65
-66
-67
-
-
# File 'deprecate_disable.rb', line 60
-
-def to_reason_string_or_symbol(string, type:)
-  if (type == :formula && FORMULA_DEPRECATE_DISABLE_REASONS.key?(string&.to_sym)) ||
-     (type == :cask && CASK_DEPRECATE_DISABLE_REASONS.key?(string&.to_sym))
-    return string.to_sym
-  end
-
-  string
-end
-
-
- -
-

- - .type(formula_or_cask) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-
-
# File 'deprecate_disable.rb', line 32
-
-def type(formula_or_cask)
-  return :deprecated if formula_or_cask.deprecated?
-
-  :disabled if formula_or_cask.disabled?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/DeprecatedOption.html b/docs/DeprecatedOption.html deleted file mode 100644 index 169f3ee12..000000000 --- a/docs/DeprecatedOption.html +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - - Class: DeprecatedOption - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: DeprecatedOption - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
options.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A deprecated formula option.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(old, current) ⇒ DeprecatedOption - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of DeprecatedOption.

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-45
-
-
# File 'options.rb', line 42
-
-def initialize(old, current)
-  @old = old
-  @current = current
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #currentObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-
-
# File 'options.rb', line 40
-
-def current
-  @current
-end
-
-
- - - -
-

- - #oldObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-
-
# File 'options.rb', line 40
-
-def old
-  @old
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #current_flagString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'options.rb', line 53
-
-def current_flag
-  "--#{current}"
-end
-
-
- -
-

- - #old_flagString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'options.rb', line 48
-
-def old_flag
-  "--#{old}"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/DescriptionCacheStore.html b/docs/DescriptionCacheStore.html deleted file mode 100644 index d20a0b59e..000000000 --- a/docs/DescriptionCacheStore.html +++ /dev/null @@ -1,885 +0,0 @@ - - - - - - - Class: DescriptionCacheStore - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: DescriptionCacheStore - - - Private -

-
- -
-
Inherits:
-
- CacheStore - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
description_cache_store.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

DescriptionCacheStore provides methods to fetch and mutate formula descriptions used -by the brew desc and brew search commands.

- - -
-
-
- - -
-

Direct Known Subclasses

-

CaskDescriptionCacheStore

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CacheStore

-

#fetch, #initialize

-
-

Constructor Details

- -

This class inherits a constructor from CacheStore

- -
- - -
-

Instance Method Details

- - -
-

- - #delete!(formula_name) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Delete the formula description from the DescriptionCacheStore.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula_name - - - (String) - - - - — -

    the name of the formula to delete

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'description_cache_store.rb', line 25
-
-def delete!(formula_name)
-  database.delete(formula_name)
-end
-
-
- -
-

- - #delete_from_formula_names!(formula_names) ⇒ nil - - - - Also known as: - delete_from_cask_tokens! - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Use an array of formula names to delete them from the DescriptionCacheStore.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula_names - - - (Array) - - - - — -

    the formulae to delete

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-
-
# File 'description_cache_store.rb', line 77
-
-def delete_from_formula_names!(formula_names)
-  return if database.empty?
-
-  formula_names.each(&method(:delete!))
-end
-
-
- -
-

- - #populate_if_empty!(eval_all: Homebrew::EnvConfig.eval_all?) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If the database is empty update! it with all known formulae.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-
-
# File 'description_cache_store.rb', line 32
-
-def populate_if_empty!(eval_all: Homebrew::EnvConfig.eval_all?)
-  return unless eval_all
-  return unless database.empty?
-
-  Formula.all(eval_all:).each { |f| update!(f.full_name, f.desc) }
-end
-
-
- -
-

- - #select(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

select from the underlying database.

- - -
-
-
- - -
- - - - -
-
-
-
-85
-86
-87
-
-
# File 'description_cache_store.rb', line 85
-
-def select(&block)
-  database.select(&block)
-end
-
-
- -
-

- - #update!(formula_name, description) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Inserts a formula description into the cache if it does not exist or -updates the formula description if it does exist.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula_name - - - (String) - - - - — -

    the name of the formula to set

    -
    - -
  • - -
  • - - description - - - (String) - - - - — -

    the description from the formula to set

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'description_cache_store.rb', line 17
-
-def update!(formula_name, description)
-  database.set(formula_name, description)
-end
-
-
- -
-

- - #update_from_formula_names!(formula_names) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Use an array of formula names to update the DescriptionCacheStore.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula_names - - - (Array) - - - - — -

    the formulae to update

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'description_cache_store.rb', line 62
-
-def update_from_formula_names!(formula_names)
-  return unless Homebrew::EnvConfig.eval_all?
-  return populate_if_empty! if database.empty?
-
-  formula_names.each do |name|
-    update!(name, Formula[name].desc)
-  rescue FormulaUnavailableError, *FormulaVersions::IGNORED_EXCEPTIONS
-    delete!(name)
-  end
-end
-
-
- -
-

- - #update_from_report!(report) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Use an update report to update the DescriptionCacheStore.

- - -
-
-
-

Parameters:

-
    - -
  • - - report - - - (Report) - - - - — -

    an update report generated by cmd/update.rb

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'description_cache_store.rb', line 43
-
-def update_from_report!(report)
-  return unless Homebrew::EnvConfig.eval_all?
-  return populate_if_empty! if database.empty?
-  return if report.empty?
-
-  renamings   = report.select_formula_or_cask(:R)
-  alterations = report.select_formula_or_cask(:A) +
-                report.select_formula_or_cask(:M) +
-                renamings.map(&:last)
-
-  update_from_formula_names!(alterations)
-  delete_from_formula_names!(report.select_formula_or_cask(:D) +
-                             renamings.map(&:first))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Descriptions.html b/docs/Descriptions.html deleted file mode 100644 index e0e289009..000000000 --- a/docs/Descriptions.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - Class: Descriptions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Descriptions - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
descriptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for printing and searching descriptions.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(descriptions) ⇒ Descriptions - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Create an actual instance.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'descriptions.rb', line 27
-
-def initialize(descriptions)
-  @descriptions = descriptions
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .search(string_or_regex, field, cache_store, eval_all = Homebrew::EnvConfig.eval_all?) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Given a regex, find all formulae whose specified fields contain a match.

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'descriptions.rb', line 11
-
-def self.search(string_or_regex, field, cache_store, eval_all = Homebrew::EnvConfig.eval_all?)
-  cache_store.populate_if_empty!(eval_all:)
-
-  results = case field
-  when :name
-    Homebrew::Search.search(cache_store, string_or_regex) { |name, _| name }
-  when :desc
-    Homebrew::Search.search(cache_store, string_or_regex) { |_, desc| desc }
-  when :either
-    Homebrew::Search.search(cache_store, string_or_regex)
-  end
-
-  new(results)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Take search results -- a hash mapping formula names to descriptions -- and -print them.

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'descriptions.rb', line 33
-
-def print
-  blank = Formatter.warning("[no description]")
-  @descriptions.keys.sort.each do |full_name|
-    short_name = short_names[full_name]
-    printed_name = if short_name_counts[short_name] == 1
-      short_name
-    else
-      full_name
-    end
-    description = @descriptions[full_name] || blank
-    if description.is_a?(Array)
-      names = description[0]
-      description = description[1] || blank
-      puts "#{Tty.bold}#{printed_name}:#{Tty.reset} (#{names}) #{description}"
-    else
-      puts "#{Tty.bold}#{printed_name}:#{Tty.reset} #{description}"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/DevelopmentTools.html b/docs/DevelopmentTools.html deleted file mode 100644 index 46b77bb9e..000000000 --- a/docs/DevelopmentTools.html +++ /dev/null @@ -1,2004 +0,0 @@ - - - - - - - Class: DevelopmentTools - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: DevelopmentTools - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/linux/development_tools.rb,
- extend/os/mac/development_tools.rb,
development_tools.rb
-
-
- -
- -

Overview

-
-

Helper class for gathering information about development tools.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .build_system_infoHash{String => String, nil} - - - - Also known as: - generic_build_system_info - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-
-
# File 'extend/os/mac/development_tools.rb', line 77
-
-def build_system_info
-  build_info = {
-    "xcode"          => MacOS::Xcode.version.to_s.presence,
-    "clt"            => MacOS::CLT.version.to_s.presence,
-    "preferred_perl" => MacOS.preferred_perl_version,
-  }
-  generic_build_system_info.merge build_info
-end
-
-
- -
-

- - .ca_file_handles_most_https_certificates?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-143
-144
-145
-146
-147
-
-
# File 'development_tools.rb', line 143
-
-def ca_file_handles_most_https_certificates?
-  # The system CA file is too old for some modern HTTPS certificates on
-  # older OS versions.
-  ENV["HOMEBREW_SYSTEM_CA_CERTIFICATES_TOO_OLD"].nil?
-end
-
-
- -
-

- - .ca_file_substitution_required?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-155
-156
-157
-158
-
-
# File 'development_tools.rb', line 155
-
-def ca_file_substitution_required?
-  (!ca_file_handles_most_https_certificates? || ENV["HOMEBREW_FORCE_BREWED_CA_CERTIFICATES"].present?) &&
-    !(HOMEBREW_PREFIX/"etc/ca-certificates/cert.pem").exist?
-end
-
-
- -
-

- - .clang_build_versionVersion - - - - - -

-
-

Get the Clang build version.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-85
-
-
# File 'development_tools.rb', line 77
-
-def clang_build_version
-  @clang_build_version ||= if (path = locate("clang")) &&
-                              (build_version = `#{path} --version`[
-%r{clang(-| version [^ ]+ \(tags/RELEASE_)(\d{2,})}, 2])
-    Version.new build_version
-  else
-    Version::NULL
-  end
-end
-
-
- -
-

- - .clang_versionVersion - - - - - -

-
-

Get the Clang version.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'development_tools.rb', line 64
-
-def clang_version
-  @clang_version ||= if (path = locate("clang")) &&
-                        (build_version = `#{path} --version`[/(?:clang|LLVM) version (\d+\.\d(?:\.\d)?)/, 1])
-    Version.new build_version
-  else
-    Version::NULL
-  end
-end
-
-
- -
-

- - .clear_version_cachevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-122
-123
-124
-125
-
-
# File 'development_tools.rb', line 122
-
-def clear_version_cache
-  @clang_version = @clang_build_version = nil
-  @gcc_version = {}
-end
-
-
- -
-

- - .curl_handles_most_https_certificates?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-
-
# File 'extend/os/mac/development_tools.rb', line 50
-
-def curl_handles_most_https_certificates?
-  # The system Curl is too old for some modern HTTPS certificates on
-  # older macOS versions.
-  ENV["HOMEBREW_SYSTEM_CURL_TOO_OLD"].nil?
-end
-
-
- -
-

- - .curl_substitution_required?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-161
-162
-163
-
-
# File 'development_tools.rb', line 161
-
-def curl_substitution_required?
-  !curl_handles_most_https_certificates? && !HOMEBREW_BREWED_CURL_PATH.exist?
-end
-
-
- -
-

- - .custom_installation_instructionsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-
-
# File 'extend/os/mac/development_tools.rb', line 69
-
-def custom_installation_instructions
-  <<~EOS
-    Install GNU's GCC:
-      brew install gcc
-  EOS
-end
-
-
- -
-

- - .default_compilerSymbol - - - - - -

-
-

Get the default C compiler.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'extend/os/mac/development_tools.rb', line 33
-
-def default_compiler
-  :clang
-end
-
-
- -
-

- - .gcc_version(cc) ⇒ Version - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get the GCC version.

- - -
-
-
-

Parameters:

-
    - -
  • - - cc - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'development_tools.rb', line 107
-
-def gcc_version(cc)
-  (@gcc_version ||= {}).fetch(cc) do
-    path = HOMEBREW_PREFIX/"opt/#{CompilerSelector.preferred_gcc}/bin"/cc
-    path = locate(cc) unless path.exist?
-    version = if path &&
-                 (build_version = `#{path} --version`[/gcc(?:(?:-\d+(?:\.\d)?)? \(.+\))? (\d+\.\d\.\d)/, 1])
-      Version.new build_version
-    else
-      Version::NULL
-    end
-    @gcc_version[cc] = version
-  end
-end
-
-
- -
-

- - .generic_locateObject - - - - - -

- - - - -
-
-
-
-8
-
-
# File 'extend/os/mac/development_tools.rb', line 8
-
-alias generic_locate locate
-
-
- -
-

- - .insecure_download_warning(resource) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - resource - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-
-
# File 'development_tools.rb', line 45
-
-def insecure_download_warning(resource)
-  package = curl_handles_most_https_certificates? ? "ca-certificates" : "curl"
-  "Using `--insecure` with curl to download #{resource} because we need it to run " \
-    "`brew install #{package}` in order to download securely from now on. " \
-    "Checksums will still be verified."
-end
-
-
- -
-

- - .installation_instructionsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-64
-65
-66
-
-
# File 'extend/os/mac/development_tools.rb', line 64
-
-def installation_instructions
-  MacOS::CLT.installation_instructions
-end
-
-
- -
-

- - .installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks if the user has any developer tools installed, either via Xcode -or the CLT. Convenient for guarding against formula builds when building -is impossible.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-
-
# File 'extend/os/mac/development_tools.rb', line 28
-
-def installed?
-  MacOS::Xcode.installed? || MacOS::CLT.installed?
-end
-
-
- -
-

- - .ld64_versionVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'extend/os/mac/development_tools.rb', line 38
-
-def ld64_version
-  @ld64_version ||= begin
-    json = Utils.popen_read("/usr/bin/ld", "-version_details")
-    if $CHILD_STATUS.success?
-      Version.parse(JSON.parse(json)["version"])
-    else
-      Version::NULL
-    end
-  end
-end
-
-
- -
-

- - .llvm_clang_build_versionVersion - - - - - -

-
-

Get the LLVM Clang build version.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
-
# File 'development_tools.rb', line 91
-
-def llvm_clang_build_version
-  @llvm_clang_build_version ||= begin
-    path = Formulary.factory("llvm").opt_prefix/"bin/clang"
-    if path.executable? &&
-       (build_version = `#{path} --version`[/clang version (\d+\.\d\.\d)/, 1])
-      Version.new build_version
-    else
-      Version::NULL
-    end
-  end
-end
-
-
- -
-

- - .locate(tool) ⇒ Pathname? - - - - - -

-
-

Locate a development tool.

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'extend/os/mac/development_tools.rb', line 13
-
-def locate(tool)
-  (@locate ||= {}).fetch(tool) do |key|
-    @locate[key] = if (located_tool = generic_locate(tool))
-      located_tool
-    else
-      path = Utils.popen_read("/usr/bin/xcrun", "-no-cache", "-find", tool, err: :close).chomp
-      Pathname.new(path) if File.executable?(path)
-    end
-  end
-end
-
-
- -
-

- - .needs_build_formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-128
-129
-130
-
-
# File 'development_tools.rb', line 128
-
-def needs_build_formulae?
-  needs_libc_formula? || needs_compiler_formula?
-end
-
-
- -
-

- - .needs_compiler_formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'extend/os/linux/development_tools.rb', line 35
-
-def needs_compiler_formula?
-  return @needs_compiler_formula if defined? @needs_compiler_formula
-
-  gcc = "/usr/bin/gcc"
-  @needs_compiler_formula = if File.exist?(gcc)
-    gcc_version(gcc) < OS::LINUX_GCC_CI_VERSION
-  else
-    true
-  end
-end
-
-
- -
-

- - .needs_libc_formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-
-
# File 'extend/os/linux/development_tools.rb', line 28
-
-def needs_libc_formula?
-  return @needs_libc_formula if defined? @needs_libc_formula
-
-  @needs_libc_formula = OS::Linux::Glibc.below_ci_version?
-end
-
-
- -
-

- - .subversion_handles_most_https_certificates?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-
-
# File 'extend/os/mac/development_tools.rb', line 57
-
-def subversion_handles_most_https_certificates?
-  # The system Subversion is too old for some HTTPS certificates on
-  # older macOS versions.
-  MacOS.version >= :sierra
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/DiskUsageExtension.html b/docs/DiskUsageExtension.html deleted file mode 100644 index 649366e08..000000000 --- a/docs/DiskUsageExtension.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - - Module: DiskUsageExtension - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: DiskUsageExtension - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Pathname
-
- - - -
-
Defined in:
-
extend/pathname.rbi,
- extend/pathname.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #abvString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'extend/pathname.rb', line 28
-
-def abv
-  out = +""
-  compute_disk_usage
-  out << "#{number_readable(@file_count)} files, " if @file_count > 1
-  out << disk_usage_readable(@disk_usage).to_s
-  out.freeze
-end
-
-
- -
-

- - #disk_usageInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-
-
# File 'extend/pathname.rb', line 12
-
-def disk_usage
-  return @disk_usage if defined?(@disk_usage)
-
-  compute_disk_usage
-  @disk_usage
-end
-
-
- -
-

- - #file_countInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-
-
# File 'extend/pathname.rb', line 20
-
-def file_count
-  return @file_count if defined?(@file_count)
-
-  compute_disk_usage
-  @file_count
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/DownloadError.html b/docs/DownloadError.html deleted file mode 100644 index bc86e1e83..000000000 --- a/docs/DownloadError.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - Exception: DownloadError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: DownloadError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised in Downloadable#fetch.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #cause ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(downloadable, cause) ⇒ DownloadError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of DownloadError.

- - -
-
-
- - -
- - - - -
-
-
-
-613
-614
-615
-616
-617
-618
-619
-620
-
-
# File 'exceptions.rb', line 613
-
-def initialize(downloadable, cause)
-  super <<~EOS
-    Failed to download resource #{downloadable.download_name.inspect}
-    #{cause.message}
-  EOS
-  @cause = cause
-  set_backtrace(cause.backtrace)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #causeObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-611
-612
-613
-
-
# File 'exceptions.rb', line 611
-
-def cause
-  @cause
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/DownloadStrategyDetector.html b/docs/DownloadStrategyDetector.html deleted file mode 100644 index c12fd4cdb..000000000 --- a/docs/DownloadStrategyDetector.html +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - - Class: DownloadStrategyDetector - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: DownloadStrategyDetector - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for detecting a download strategy from a URL.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .detect(url, using = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1444
-1445
-1446
-1447
-1448
-1449
-1450
-1451
-1452
-1453
-1454
-1455
-
-
# File 'download_strategy.rb', line 1444
-
-def self.detect(url, using = nil)
-  if using.nil?
-    detect_from_url(url)
-  elsif using.is_a?(Class) && using < AbstractDownloadStrategy
-    using
-  elsif using.is_a?(Symbol)
-    detect_from_symbol(using)
-  else
-    raise TypeError,
-          "Unknown download strategy specification #{using.inspect}"
-  end
-end
-
-
- -
-

- - .detect_from_symbol(symbol) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1493
-1494
-1495
-1496
-1497
-1498
-1499
-1500
-1501
-1502
-1503
-1504
-1505
-1506
-1507
-1508
-
-
# File 'download_strategy.rb', line 1493
-
-def self.detect_from_symbol(symbol)
-  case symbol
-  when :hg                     then MercurialDownloadStrategy
-  when :nounzip                then NoUnzipCurlDownloadStrategy
-  when :git                    then GitDownloadStrategy
-  when :bzr                    then BazaarDownloadStrategy
-  when :svn                    then SubversionDownloadStrategy
-  when :curl                   then CurlDownloadStrategy
-  when :homebrew_curl          then HomebrewCurlDownloadStrategy
-  when :cvs                    then CVSDownloadStrategy
-  when :post                   then CurlPostDownloadStrategy
-  when :fossil                 then FossilDownloadStrategy
-  else
-    raise TypeError, "Unknown download strategy #{symbol} was requested."
-  end
-end
-
-
- -
-

- - .detect_from_url(url) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1457
-1458
-1459
-1460
-1461
-1462
-1463
-1464
-1465
-1466
-1467
-1468
-1469
-1470
-1471
-1472
-1473
-1474
-1475
-1476
-1477
-1478
-1479
-1480
-1481
-1482
-1483
-1484
-1485
-1486
-1487
-1488
-1489
-1490
-1491
-
-
# File 'download_strategy.rb', line 1457
-
-def self.detect_from_url(url)
-  case url
-  when GitHubPackages::URL_REGEX
-    CurlGitHubPackagesDownloadStrategy
-  when %r{^https?://github\.com/[^/]+/[^/]+\.git$}
-    GitHubGitDownloadStrategy
-  when %r{^https?://.+\.git$},
-       %r{^git://},
-       %r{^https?://git\.sr\.ht/[^/]+/[^/]+$},
-       %r{^ssh://git}
-    GitDownloadStrategy
-  when %r{^https?://www\.apache\.org/dyn/closer\.cgi},
-       %r{^https?://www\.apache\.org/dyn/closer\.lua}
-    CurlApacheMirrorDownloadStrategy
-  when %r{^https?://([A-Za-z0-9\-.]+\.)?googlecode\.com/svn},
-       %r{^https?://svn\.},
-       %r{^svn://},
-       %r{^svn\+http://},
-       %r{^http://svn\.apache\.org/repos/},
-       %r{^https?://([A-Za-z0-9\-.]+\.)?sourceforge\.net/svnroot/}
-    SubversionDownloadStrategy
-  when %r{^cvs://}
-    CVSDownloadStrategy
-  when %r{^hg://},
-       %r{^https?://([A-Za-z0-9\-.]+\.)?googlecode\.com/hg},
-       %r{^https?://([A-Za-z0-9\-.]+\.)?sourceforge\.net/hgweb/}
-    MercurialDownloadStrategy
-  when %r{^bzr://}
-    BazaarDownloadStrategy
-  when %r{^fossil://}
-    FossilDownloadStrategy
-  else
-    CurlDownloadStrategy
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Downloadable.html b/docs/Downloadable.html deleted file mode 100644 index 977f09144..000000000 --- a/docs/Downloadable.html +++ /dev/null @@ -1,1433 +0,0 @@ - - - - - - - Class: Downloadable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Downloadable - Abstract - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - -
-
Includes:
-
Context
-
- - - - - - -
-
Defined in:
-
downloadable.rb
-
- -
- -

Overview

-
-
- This class is abstract. -

It cannot be directly instantiated. Subclasses must implement the abstract methods below.

-
-
- - -
-
-
- - -
-

Direct Known Subclasses

-

Cask::Download, Homebrew::API::Download, Resource

-
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'downloadable.rb', line 23
-
-def initialize
-  @mirrors = T.let([], T::Array[String])
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #checksumChecksum? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'downloadable.rb', line 17
-
-def checksum
-  @checksum
-end
-
-
- - - -
-

- - #mirrorsArray<String> (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'downloadable.rb', line 20
-
-def mirrors
-  @mirrors
-end
-
-
- - - -
-

- - #urlURL? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (URL, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'downloadable.rb', line 14
-
-def url
-  @url
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #cached_downloadPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'downloadable.rb', line 48
-
-def cached_download
-  downloader.cached_location
-end
-
-
- -
-

- - #clear_cachevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'downloadable.rb', line 53
-
-def clear_cache
-  downloader.clear_cache
-end
-
-
- -
-

- - #download_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-112
-113
-114
-
-
# File 'downloadable.rb', line 112
-
-def download_name
-  File.basename(determine_url.to_s)
-end
-
-
- -
-

- - #download_strategyT.class_of(AbstractDownloadStrategy) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'downloadable.rb', line 66
-
-def download_strategy
-  @download_strategy ||= determine_url&.download_strategy
-end
-
-
- -
-

- - #downloaded?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'downloadable.rb', line 43
-
-def downloaded?
-  cached_download.exist?
-end
-
-
- -
-

- - #downloaderAbstractDownloadStrategy - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-79
-
-
# File 'downloadable.rb', line 71
-
-def downloader
-  @downloader ||= begin
-    primary_url, *mirrors = determine_url_mirrors
-    raise ArgumentError, "attempted to use a Downloadable without a URL!" if primary_url.blank?
-
-    download_strategy.new(primary_url, download_name, version,
-                          mirrors:, cache:, **T.must(@url).specs)
-  end
-end
-
-
- -
-

- - #fetch(verify_download_integrity: true, timeout: nil) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - verify_download_integrity - - - (Boolean) - - - (defaults to: true) - - -
  • - -
  • - - timeout - - - (Integer, Float, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-
-
# File 'downloadable.rb', line 82
-
-def fetch(verify_download_integrity: true, timeout: nil)
-  cache.mkpath
-
-  begin
-    downloader.fetch(timeout:)
-  rescue ErrorDuringExecution, CurlDownloadStrategyError => e
-    raise DownloadError.new(self, e)
-  end
-
-  download = cached_download
-  verify_download_integrity(download) if verify_download_integrity
-  download
-end
-
-
- -
-

- - #freezeT.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-
-
# File 'downloadable.rb', line 35
-
-def freeze
-  @checksum.freeze
-  @mirrors.freeze
-  @version.freeze
-  super
-end
-
-
- -
-

- - #initialize_dup(other) ⇒ Object - - - - - -

- - - - -
-
-
-
-27
-28
-29
-30
-31
-32
-
-
# File 'downloadable.rb', line 27
-
-def initialize_dup(other)
-  super
-  @checksum = @checksum.dup
-  @mirrors = @mirrors.dup
-  @version = @version.dup
-end
-
-
- -
-

- - #verify_download_integrity(filename) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - filename - - - (Pathname) - - - -
  • - -
- - -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-
-
# File 'downloadable.rb', line 97
-
-def verify_download_integrity(filename)
-  if filename.file?
-    ohai "Verifying checksum for '#{filename.basename}'" if verbose?
-    filename.verify_checksum(checksum)
-  end
-rescue ChecksumMissingError
-  opoo <<~EOS
-    Cannot verify integrity of '#{filename.basename}'.
-    No checksum was provided.
-    For your reference, the checksum is:
-      sha256 "#{filename.sha256}"
-  EOS
-end
-
-
- -
-

- - #versionVersion? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Version, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-
-
# File 'downloadable.rb', line 58
-
-def version
-  return @version if @version && !@version.null?
-
-  version = determine_url&.version
-  version unless version&.null?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/DuplicateResourceError.html b/docs/DuplicateResourceError.html deleted file mode 100644 index 76206f763..000000000 --- a/docs/DuplicateResourceError.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Exception: DuplicateResourceError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: DuplicateResourceError - - - Private -

-
- -
-
Inherits:
-
- ArgumentError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a resource is specified multiple times.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(resource) ⇒ DuplicateResourceError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of DuplicateResourceError.

- - -
-
-
- - -
- - - - -
-
-
-
-736
-737
-738
-
-
# File 'exceptions.rb', line 736
-
-def initialize(resource)
-  super "Resource #{resource.inspect} is defined more than once"
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/ELFShim.html b/docs/ELFShim.html deleted file mode 100644 index f20244a85..000000000 --- a/docs/ELFShim.html +++ /dev/null @@ -1,1368 +0,0 @@ - - - - - - - Module: ELFShim - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: ELFShim - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Pathname
-
- - - -
-
Defined in:
-
os/linux/elf.rb,
- os/linux/elf.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #archObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'os/linux/elf.rb', line 58
-
-def arch
-  return :dunno unless elf?
-
-  @arch ||= case read_uint16(ARCHITECTURE_OFFSET)
-  when ARCHITECTURE_I386 then :i386
-  when ARCHITECTURE_X86_64 then :x86_64
-  when ARCHITECTURE_POWERPC then :powerpc
-  when ARCHITECTURE_ARM then :arm
-  when ARCHITECTURE_AARCH64 then :arm64
-  else :dunno
-  end
-end
-
-
- -
-

- - #binary_executable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-85
-86
-87
-
-
# File 'os/linux/elf.rb', line 85
-
-def binary_executable?
-  elf_type == :executable
-end
-
-
- -
-

- - #dylib?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-82
-83
-
-
# File 'os/linux/elf.rb', line 81
-
-def dylib?
-  elf_type == :dylib
-end
-
-
- -
-

- - #dylib_idObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-217
-218
-219
-
-
# File 'os/linux/elf.rb', line 217
-
-def dylib_id
-  .dylib_id
-end
-
-
- -
-

- - #dynamic_elf?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-115
-116
-117
-118
-119
-
-
# File 'os/linux/elf.rb', line 115
-
-def dynamic_elf?
-  return @dynamic_elf if defined? @dynamic_elf
-
-  @dynamic_elf = patchelf_patcher.elf.segment_by_type(:DYNAMIC).present?
-end
-
-
- -
-

- - #dynamically_linked_librariesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-221
-222
-223
-
-
# File 'os/linux/elf.rb', line 221
-
-def dynamically_linked_libraries(*)
-  .dylibs
-end
-
-
- -
-

- - #elf?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'os/linux/elf.rb', line 49
-
-def elf?
-  return @elf if defined? @elf
-  return @elf = false if read(MAGIC_NUMBER_ASCII.size, MAGIC_NUMBER_OFFSET) != MAGIC_NUMBER_ASCII
-
-  # Check that this ELF file is for Linux or System V.
-  # OS_ABI is often set to 0 (System V), regardless of the target platform.
-  @elf = [OS_ABI_LINUX, OS_ABI_SYSTEM_V].include? read_uint8(OS_ABI_OFFSET)
-end
-
-
- -
-

- - #elf_typeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-79
-
-
# File 'os/linux/elf.rb', line 71
-
-def elf_type
-  return :dunno unless elf?
-
-  @elf_type ||= case read_uint16(TYPE_OFFSET)
-  when TYPE_EXECUTABLE then :executable
-  when TYPE_SHARED then :dylib
-  else :dunno
-  end
-end
-
-
- -
-

- - #interpreterObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-103
-104
-105
-106
-107
-
-
# File 'os/linux/elf.rb', line 103
-
-def interpreter
-  return @interpreter if defined? @interpreter
-
-  @interpreter = patchelf_patcher.interpreter
-end
-
-
- -
-

- - #patch!(interpreter: nil, rpath: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-
-
# File 'os/linux/elf.rb', line 109
-
-def patch!(interpreter: nil, rpath: nil)
-  return if interpreter.blank? && rpath.blank?
-
-  save_using_patchelf_rb interpreter, rpath
-end
-
-
- -
-

- - #patchelf_patcherObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-207
-208
-209
-210
-
-
# File 'os/linux/elf.rb', line 207
-
-def patchelf_patcher
-  require "patchelf"
-  @patchelf_patcher ||= ::PatchELF::Patcher.new to_s, on_error: :silent
-end
-
-
- -
-

- - #read_uint16(offset) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-
-
# File 'os/linux/elf.rb', line 45
-
-def read_uint16(offset)
-  read(2, offset).unpack1("v")
-end
-
-
- -
-

- - #read_uint8(offset) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-41
-42
-43
-
-
# File 'os/linux/elf.rb', line 41
-
-def read_uint8(offset)
-  read(1, offset).unpack1("C")
-end
-
-
- -
-

- - #rpathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The runtime search path, such as: -"/lib:/usr/lib:/usr/local/lib"

- - -
-
-
- - -
- - - - -
-
-
-
-91
-92
-93
-94
-95
-
-
# File 'os/linux/elf.rb', line 91
-
-def rpath
-  return @rpath if defined? @rpath
-
-  @rpath = rpath_using_patchelf_rb
-end
-
-
- -
-

- - #rpath_using_patchelf_rbObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-203
-204
-205
-
-
# File 'os/linux/elf.rb', line 203
-
-def rpath_using_patchelf_rb
-  patchelf_patcher.runpath || patchelf_patcher.rpath
-end
-
-
- -
-

- - #rpathsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of runtime search path entries, such as: -["/lib", "/usr/lib", "/usr/local/lib"]

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'os/linux/elf.rb', line 99
-
-def rpaths
-  Array(rpath&.split(":"))
-end
-
-
- -
-

- - #save_using_patchelf_rb(new_interpreter, new_rpath) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-196
-197
-198
-199
-200
-201
-
-
# File 'os/linux/elf.rb', line 196
-
-def save_using_patchelf_rb(new_interpreter, new_rpath)
-  patcher = patchelf_patcher
-  patcher.interpreter = new_interpreter if new_interpreter.present?
-  patcher.rpath = new_rpath if new_rpath.present?
-  patcher.save(patchelf_compatible: true)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/ENV.html b/docs/ENV.html deleted file mode 100644 index fa40b7a3a..000000000 --- a/docs/ENV.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - Class: ENV - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: ENV - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
EnvActivation
-
- - - - - - - - -
-
Defined in:
-
extend/ENV.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

ENV is not actually a class, but this makes YARD happy

- - -
-
-
- - -

See Also:

- - -
- - -

Constant Summary

- -

Constants included - from CompilerConstants

-

CompilerConstants::COMPILERS, CompilerConstants::COMPILER_SYMBOL_MAP, CompilerConstants::GNU_GCC_REGEXP, CompilerConstants::GNU_GCC_VERSIONS

- - - - -

Instance Attribute Summary

- -

Attributes included from Superenv

-

#deps, #keg_only_deps, #run_time_deps

- - - - - - - - - -

Method Summary

- -

Methods included from EnvActivation

-

activate_extensions!, clear_sensitive_environment!, sensitive?, sensitive_environment, with_build_environment

- - - - - - - - - -

Methods included from Superenv

-

#O0, #O1, #O3, bin, #cxx11, #deparallelize, #determine_cccfg, #determine_dynamic_linker_path, #determine_rpath_paths, extended, #homebrew_extra_cmake_frameworks_paths, #homebrew_extra_cmake_include_paths, #homebrew_extra_cmake_library_paths, #homebrew_extra_isystem_paths, #homebrew_extra_library_paths, #homebrew_extra_paths, #libcxx, #make_jobs, #no_fixup_chains, #no_weak_imports, #permit_arch_flags, #refurbish_args, #reset, #runtime_cpu_detection, #set_debug_symbols, shims_path

- - - - - - - - - -

Methods included from SharedEnvExtension

-

#append, #append_path, #append_to_cccfg, #append_to_cflags, #cc, #cflags, #compiler, #cppflags, #cxx, #cxxflags, #effective_arch, #fc, #fcflags, #fflags, #fortran, #ldflags, #no_fixup_chains_support?, #no_weak_imports_support?, #permit_arch_flags, #prepend, #prepend_create_path, #prepend_path, #remove, #remove_cc_etc, #remove_from_cflags

- - - - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/EmbeddedPatch.html b/docs/EmbeddedPatch.html deleted file mode 100644 index 62ea11e26..000000000 --- a/docs/EmbeddedPatch.html +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - Class: EmbeddedPatch - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: EmbeddedPatch - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
patch.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

An abstract class representing a patch embedded into a formula.

- - -
-
-
- - -
-

Direct Known Subclasses

-

DATAPatch, StringPatch

-
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #owner ⇒ Object - - - - - - - - - writeonly - - - - - - private - -
    - -
  • - - - -
  • - - - #strip ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(strip) ⇒ EmbeddedPatch - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of EmbeddedPatch.

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'patch.rb', line 37
-
-def initialize(strip)
-  @strip = strip
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #owner=(value) ⇒ Object (writeonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'patch.rb', line 34
-
-def owner=(value)
-  @owner = value
-end
-
-
- - - -
-

- - #stripObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'patch.rb', line 35
-
-def strip
-  @strip
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #applyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-48
-49
-50
-51
-52
-
-
# File 'patch.rb', line 48
-
-def apply
-  data = contents.gsub("HOMEBREW_PREFIX", HOMEBREW_PREFIX)
-  args = %W[-g 0 -f -#{strip}]
-  Utils.safe_popen_write("patch", *args) { |p| p.write(data) }
-end
-
-
- -
-

- - #contentsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-46
-
-
# File 'patch.rb', line 46
-
-def contents; end
-
-
- -
-

- - #external?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'patch.rb', line 42
-
-def external?
-  false
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Enumerable.html b/docs/Enumerable.html deleted file mode 100644 index b133a7e7c..000000000 --- a/docs/Enumerable.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - Module: Enumerable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Enumerable - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Homebrew::Style::Offenses, Options, PATH, Tap
-
- - - -
-
Defined in:
-
extend/enumerable.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #compact_blankT.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new +Array+ without the blank items. -Uses Object#blank? for determining if an item is blank.

- -

Examples

- -
[1, "", nil, 2, " ", [], {}, false, true].compact_blank
-# =>  [1, 2, true]
-
- -
Set.new([nil, "", 1, false]).compact_blank
-# => [1]
-
- -

When called on a Hash, returns a new Hash without the blank values.

- -
{ a: "", b: 1, c: nil, d: [], e: false, f: true }.compact_blank
-# => { b: 1, f: true }
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-
-
# File 'extend/enumerable.rb', line 32
-
-def compact_blank = T.unsafe(self).reject(&:blank?)
-
-
- -
-

- - #exclude?(object) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The negative of the #include?. Returns true if the -collection does not include the object.

- - -
-
-
-

Parameters:

-
    - -
  • - - object - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-
-
# File 'extend/enumerable.rb', line 8
-
-def exclude?(object) = !include?(object)
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/EnvActivation.html b/docs/EnvActivation.html deleted file mode 100644 index 7d0972ff5..000000000 --- a/docs/EnvActivation.html +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - - Module: EnvActivation - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: EnvActivation - - - Private -

-
- - - - - - -
-
Includes:
-
Superenv
-
- - - - -
-
Included in:
-
ENV, Sorbet::Private::Static::ENVClass
-
- - - -
-
Defined in:
-
extend/ENV.rb,
- extend/ENV.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - - - - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from CompilerConstants

-

CompilerConstants::COMPILERS, CompilerConstants::COMPILER_SYMBOL_MAP, CompilerConstants::GNU_GCC_REGEXP, CompilerConstants::GNU_GCC_VERSIONS

- - - - -

Instance Attribute Summary

- -

Attributes included from Superenv

-

#deps, #keg_only_deps, #run_time_deps

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Superenv

-

#O0, #O1, #O3, bin, #cxx11, #deparallelize, #determine_cccfg, #determine_dynamic_linker_path, #determine_rpath_paths, extended, #homebrew_extra_cmake_frameworks_paths, #homebrew_extra_cmake_include_paths, #homebrew_extra_cmake_library_paths, #homebrew_extra_isystem_paths, #homebrew_extra_library_paths, #homebrew_extra_paths, #libcxx, #make_jobs, #no_fixup_chains, #no_weak_imports, #permit_arch_flags, #refurbish_args, #reset, #runtime_cpu_detection, #set_debug_symbols, shims_path

- - - - - - - - - -

Methods included from SharedEnvExtension

-

#append, #append_path, #append_to_cccfg, #append_to_cflags, #cc, #cflags, #compiler, #cppflags, #cxx, #cxxflags, #effective_arch, #fc, #fcflags, #fflags, #fortran, #ldflags, #no_fixup_chains_support?, #no_weak_imports_support?, #permit_arch_flags, #prepend, #prepend_create_path, #prepend_path, #remove, #remove_cc_etc, #remove_from_cflags

- - - - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #activate_extensions!(env: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - env - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'extend/ENV.rb', line 32
-
-def activate_extensions!(env: nil)
-  if superenv?(env)
-    extend(Superenv)
-  else
-    extend(Stdenv)
-  end
-end
-
-
- -
-

- - #clear_sensitive_environment!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-77
-78
-79
-
-
# File 'extend/ENV.rb', line 77
-
-def clear_sensitive_environment!
-  each_key { |key| delete key if sensitive?(key) }
-end
-
-
- -
-

- - #sensitive?(key) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'extend/ENV.rb', line 67
-
-def sensitive?(key)
-  key.match?(/(cookie|key|token|password|passphrase)/i)
-end
-
-
- -
-

- - #sensitive_environmentHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-72
-73
-74
-
-
# File 'extend/ENV.rb', line 72
-
-def sensitive_environment
-  select { |key, _| sensitive?(key) }
-end
-
-
- -
-

- - #with_build_environment(env: nil, cc: nil, build_bottle: false, bottle_arch: nil, debug_symbols: false, &_block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - env - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - cc - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - build_bottle - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - bottle_arch - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - debug_symbols - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - _block - - - (T.proc.returns(T.untyped)) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'extend/ENV.rb', line 50
-
-def with_build_environment(env: nil, cc: nil, build_bottle: false, bottle_arch: nil, debug_symbols: false, &_block)
-  old_env = to_hash.dup
-  tmp_env = to_hash.dup.extend(EnvActivation)
-  T.cast(tmp_env, EnvActivation).activate_extensions!(env:)
-  T.cast(tmp_env, T.any(Superenv, Stdenv))
-   .setup_build_environment(cc:, build_bottle:, bottle_arch:,
-                            debug_symbols:)
-  replace(tmp_env)
-
-  begin
-    yield
-  ensure
-    replace(old_env)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/ErrorDuringExecution.html b/docs/ErrorDuringExecution.html deleted file mode 100644 index 0d0bcf809..000000000 --- a/docs/ErrorDuringExecution.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - - - - Exception: ErrorDuringExecution - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: ErrorDuringExecution - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised by Kernel#safe_system in utils.rb.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(cmd, status:, output: nil, secrets: []) ⇒ ErrorDuringExecution - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ErrorDuringExecution.

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-646
-647
-648
-649
-650
-651
-652
-653
-654
-655
-656
-657
-658
-659
-660
-661
-662
-663
-664
-665
-666
-667
-668
-669
-670
-671
-672
-673
-674
-675
-676
-677
-678
-679
-680
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-
-
# File 'exceptions.rb', line 646
-
-def initialize(cmd, status:, output: nil, secrets: [])
-  @cmd = cmd
-  @status = status
-  @output = output
-
-  raise ArgumentError, "Status cannot be nil." if status.nil?
-
-  exitstatus = case status
-  when Integer
-    status
-  when Hash
-    status["exitstatus"]
-  else
-    status.exitstatus
-  end
-
-  termsig = case status
-  when Integer
-    nil
-  when Hash
-    status["termsig"]
-  else
-    status.termsig
-  end
-
-  redacted_cmd = redact_secrets(cmd.shelljoin.gsub('\=', "="), secrets)
-
-  reason = if exitstatus
-    "exited with #{exitstatus}"
-  elsif termsig
-    "was terminated by uncaught signal #{Signal.signame(termsig)}"
-  else
-    raise ArgumentError, "Status neither has `exitstatus` nor `termsig`."
-  end
-
-  s = +"Failure while executing; `#{redacted_cmd}` #{reason}."
-
-  if Array(output).present?
-    format_output_line = lambda do |type_line|
-      type, line = *type_line
-      if type == :stderr
-        Formatter.error(line)
-      else
-        line
-      end
-    end
-
-    s << " Here's the output:\n"
-    s << output.map(&format_output_line).join
-    s << "\n" unless s.end_with?("\n")
-  end
-
-  super s.freeze
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #cmdObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-644
-645
-646
-
-
# File 'exceptions.rb', line 644
-
-def cmd
-  @cmd
-end
-
-
- - - -
-

- - #outputObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-644
-645
-646
-
-
# File 'exceptions.rb', line 644
-
-def output
-  @output
-end
-
-
- - - -
-

- - #statusObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-644
-645
-646
-
-
# File 'exceptions.rb', line 644
-
-def status
-  @status
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #stderrString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-702
-703
-704
-
-
# File 'exceptions.rb', line 702
-
-def stderr
-  Array(output).select { |type,| type == :stderr }.map(&:last).join
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/ExternalPatch.html b/docs/ExternalPatch.html deleted file mode 100644 index 5ebb28be9..000000000 --- a/docs/ExternalPatch.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - - - - Class: ExternalPatch - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: ExternalPatch - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
patch.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A string containing a patch.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(strip, &block) ⇒ ExternalPatch - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ExternalPatch.

- - -
-
-
- - -
- - - - -
-
-
-
-107
-108
-109
-110
-
-
# File 'patch.rb', line 107
-
-def initialize(strip, &block)
-  @strip    = strip
-  @resource = Resource::PatchResource.new(&block)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #resourceObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'patch.rb', line 101
-
-def resource
-  @resource
-end
-
-
- - - -
-

- - #stripObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'patch.rb', line 101
-
-def strip
-  @strip
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #applyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-
-
# File 'patch.rb', line 122
-
-def apply
-  base_dir = Pathname.pwd
-  resource.unpack do
-    patch_dir = Pathname.pwd
-    if patch_files.empty?
-      children = patch_dir.children
-      if children.length != 1 || !children.fetch(0).file?
-        raise MissingApplyError, <<~EOS
-          There should be exactly one patch file in the staging directory unless
-          the "apply" method was used one or more times in the patch-do block.
-        EOS
-      end
-
-      patch_files << children.fetch(0).basename
-    end
-    dir = base_dir
-    dir /= resource.directory if resource.directory.present?
-    dir.cd do
-      patch_files.each do |patch_file|
-        ohai "Applying #{patch_file}"
-        patch_file = patch_dir/patch_file
-        safe_system "patch", "-g", "0", "-f", "-#{strip}", "-i", patch_file
-      end
-    end
-  end
-rescue ErrorDuringExecution => e
-  f = resource.owner.owner
-  cmd, *args = e.cmd
-  raise BuildError.new(f, cmd, args, ENV.to_hash)
-end
-
-
- -
-

- - #external?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-113
-114
-115
-
-
# File 'patch.rb', line 113
-
-def external?
-  true
-end
-
-
- -
-

- - #owner=(owner) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-117
-118
-119
-120
-
-
# File 'patch.rb', line 117
-
-def owner=(owner)
-  resource.owner = owner
-  resource.version(resource.checksum&.hexdigest || ERB::Util.url_encode(resource.url))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/FalseClass.html b/docs/FalseClass.html deleted file mode 100644 index 05e9ecd59..000000000 --- a/docs/FalseClass.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - Class: FalseClass - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: FalseClass - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/blank.rb
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #blank?true - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

false is blank:

- -
false.blank? # => true
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (true) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-
-
# File 'extend/blank.rb', line 72
-
-def blank? = true
-
-
- -
-

- - #present?false - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (false) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-
-
# File 'extend/blank.rb', line 75
-
-def present? = false # :nodoc:
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/File.html b/docs/File.html deleted file mode 100644 index 290851f05..000000000 --- a/docs/File.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - Class: File - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: File - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/file/atomic.rb
-
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .atomic_write(file_name, temp_dir = dirname(file_name), &_block) ⇒ T.type_parameter(:out) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Write to a file atomically. Useful for situations where you don't -want other processes or threads to see half-written files.

- -

File.atomic_write('important.file') do |file| - file.write('hello') - end

- -

This method needs to create a temporary file. By default it will create it -in the same directory as the destination file. If you don't like this -behavior you can provide a different directory but it must be on the -same physical filesystem as the file you're trying to write.

- -

File.atomic_write('/data/something.important', '/data/tmp') do |file| - file.write('hello') - end

- - -
-
-
-

Parameters:

-
    - -
  • - - file_name - - - (Pathname, String) - - - -
  • - -
  • - - temp_dir - - - (String) - - - (defaults to: dirname(file_name)) - - -
  • - -
  • - - _block - - - (T.proc.params(arg0: Tempfile).returns(T.type_parameter(:out))) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.type_parameter(:out)) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-
-
# File 'extend/file/atomic.rb', line 29
-
-def self.atomic_write(file_name, temp_dir = dirname(file_name), &_block)
-  require "tempfile" unless defined?(Tempfile)
-
-  Tempfile.open(".#{basename(file_name)}", temp_dir) do |temp_file|
-    temp_file.binmode
-    return_val = yield temp_file
-    temp_file.close
-
-    old_stat = if exist?(file_name)
-      # Get original file permissions
-      stat(file_name)
-    else
-      # If not possible, probe which are the default permissions in the
-      # destination directory.
-      probe_stat_in(dirname(file_name))
-    end
-
-    if old_stat
-      # Set correct permissions on new file
-      begin
-        chown(old_stat.uid, old_stat.gid, T.must(temp_file.path))
-        # This operation will affect filesystem ACL's
-        chmod(old_stat.mode, T.must(temp_file.path))
-      rescue Errno::EPERM, Errno::EACCES
-        # Changing file ownership failed, moving on.
-      end
-    end
-
-    # Overwrite original file with temp file
-    rename(T.must(temp_file.path), file_name)
-    return_val
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formatter.html b/docs/Formatter.html deleted file mode 100644 index dfa637096..000000000 --- a/docs/Formatter.html +++ /dev/null @@ -1,957 +0,0 @@ - - - - - - - Module: Formatter - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Formatter - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/formatter.rb
-
- -
- -

Overview

-
-

- This module is part of an internal API. - This module may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for formatting output.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
COMMAND_DESC_WIDTH = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
80
- -
OPTION_DESC_WIDTH = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
45
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .arrow(string, color: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'utils/formatter.rb', line 13
-
-def self.arrow(string, color: nil)
-  prefix("==>", string, color)
-end
-
-
- -
-

- - .columns(*objects, gap_size: 2) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Layout objects in columns that fit the current terminal width.

- - -
-
-
- - -
- - - - -
-
-
-
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-
-
# File 'utils/formatter.rb', line 102
-
-def self.columns(*objects, gap_size: 2)
-  objects = objects.flatten.map(&:to_s)
-
-  fallback = proc do
-    return objects.join("\n").concat("\n")
-  end
-
-  fallback.call if objects.empty?
-  fallback.call if respond_to?(:tty?) ? !T.unsafe(self).tty? : !$stdout.tty?
-
-  console_width = Tty.width
-  object_lengths = objects.map { |obj| Tty.strip_ansi(obj).length }
-  cols = (console_width + gap_size) / (T.must(object_lengths.max) + gap_size)
-
-  fallback.call if cols < 2
-
-  rows = (objects.count + cols - 1) / cols
-  cols = (objects.count + rows - 1) / rows # avoid empty trailing columns
-
-  col_width = ((console_width + gap_size) / cols) - gap_size
-
-  gap_string = "".rjust(gap_size)
-
-  output = +""
-
-  rows.times do |row_index|
-    item_indices_for_row = T.cast(row_index.step(objects.size - 1, rows).to_a, T::Array[Integer])
-
-    first_n = T.must(item_indices_for_row[0...-1]).map do |index|
-      objects[index] + "".rjust(col_width - object_lengths.fetch(index))
-    end
-
-    # don't add trailing whitespace to last column
-    last = objects.values_at(item_indices_for_row.fetch(-1))
-
-    output.concat((first_n + last)
-          .join(gap_string))
-          .concat("\n")
-  end
-
-  output.freeze
-end
-
-
- -
-

- - .error(string, label: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Format a string as error, with an optional label.

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'utils/formatter.rb', line 49
-
-def self.error(string, label: nil)
-  label(label, string, :red)
-end
-
-
- -
-

- - .format_help_text(string, width: 172) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Wraps text to fit within a given number of columns using regular expressions that:

- -
    -
  1. convert hard-wrapped paragraphs to a single line
  2. -
  3. add line break and indent to subcommand descriptions
  4. -
  5. find any option descriptions longer than a pre-set length and wrap between words -with a hanging indent, without breaking any words that overflow
  6. -
  7. wrap any remaining description lines that need wrapping with the same indent
  8. -
  9. wrap all lines to the given width.
  10. -
- -

Note that an option (e.g. --foo) may not be at the beginning of a line, -so we always wrap one word before an option.

- - -
-
- - - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'utils/formatter.rb', line 66
-
-def self.format_help_text(string, width: 172)
-  desc = OPTION_DESC_WIDTH
-  indent = width - desc
-  string.gsub(/(?<=\S) *\n(?=\S)/, " ")
-        .gsub(/([`>)\]]:) /, "\\1\n    ")
-        .gsub(/^( +-.+  +(?=\S.{#{desc}}))(.{1,#{desc}})( +|$)(?!-)\n?/, "\\1\\2\n#{" " * indent}")
-        .gsub(/^( {#{indent}}(?=\S.{#{desc}}))(.{1,#{desc}})( +|$)(?!-)\n?/, "\\1\\2\n#{" " * indent}")
-        .gsub(/(.{1,#{width}})( +|$)(?!-)\n?/, "\\1\n")
-end
-
-
- -
-

- - .headline(string, color: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Format a string as headline.

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'utils/formatter.rb', line 20
-
-def self.headline(string, color: nil)
-  arrow("#{Tty.bold}#{string}#{Tty.reset}", color:)
-end
-
-
- -
-

- - .identifier(string) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'utils/formatter.rb', line 24
-
-def self.identifier(string)
-  "#{Tty.green}#{string}#{Tty.default}"
-end
-
-
- -
-

- - .option(string) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-
-
# File 'utils/formatter.rb', line 28
-
-def self.option(string)
-  "#{Tty.bold}#{string}#{Tty.reset}"
-end
-
-
- -
-

- - .success(string, label: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Format a string as success, with an optional label.

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'utils/formatter.rb', line 35
-
-def self.success(string, label: nil)
-  label(label, string, :green)
-end
-
-
- -
-

- - .url(string) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-76
-77
-78
-
-
# File 'utils/formatter.rb', line 76
-
-def self.url(string)
-  "#{Tty.underline}#{string}#{Tty.no_underline}"
-end
-
-
- -
-

- - .warning(string, label: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Format a string as warning, with an optional label.

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'utils/formatter.rb', line 42
-
-def self.warning(string, label: nil)
-  label(label, string, :yellow)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formula.html b/docs/Formula.html deleted file mode 100644 index ea6035851..000000000 --- a/docs/Formula.html +++ /dev/null @@ -1,28862 +0,0 @@ - - - - - - - Class: Formula - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formula - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
APIHashable, Attrable, BuildEnvironment::DSL, Cachable, Forwardable, OnSystem::MacOSAndLinux
-
- - - -
-
Includes:
-
Context, FileUtils, Homebrew::Livecheck::Constants, OnSystem::MacOSAndLinux, Utils::Shebang, Utils::Shell
-
- - - - - - -
-
Defined in:
-
extend/os/mac/formula.rb,
- extend/os/linux/formula.rb,
formula.rb,
formula.rbi,
sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This file provides definitions for Forwardable#delegate, which is currently not supported by Sorbet.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Homebrew::Livecheck::Constants

-

Homebrew::Livecheck::Constants::LATEST_VERSION

- - - -

Constants included - from Utils::Shell

-

Utils::Shell::SHELL_PROFILE_MAP, Utils::Shell::UNSAFE_SHELL_CHAR

- - -

Class Attribute Summary collapse

- - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from OnSystem::MacOSAndLinux

-

included

- - - - - - - - - -

Methods included from BuildEnvironment::DSL

-

inherited

- - - - - - - - - - -

Methods included from Cachable

-

cache

- - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- - - - - - - - - -

Methods included from APIHashable

-

generated_hash!, generating_hash!, generating_hash?

- - - - - - - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - - - - - - - - - -

Methods included from Utils::Shell

-

csh_quote, export_value, from_path, parent, preferred, preferred_path, prepend_path_in_profile, profile, set_variable_in_profile, sh_quote

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from Utils::Shebang

-

rewrite_shebang

- -
-

Constructor Details

- -
-

- - #initialize(name, path, spec, alias_path: nil, tap: nil, force_bottle: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - path - - - (Pathname) - - - -
  • - -
  • - - spec - - - (Symbol) - - - -
  • - -
  • - - alias_path - - - (Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - tap - - - (Tap, nil) - - - (defaults to: nil) - - -
  • - -
  • - - force_bottle - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-
-
# File 'formula.rb', line 216
-
-def initialize(name, path, spec, alias_path: nil, tap: nil, force_bottle: false)
-  # Only allow instances of subclasses. The base class does not hold any spec information (URLs etc).
-  raise "Do not call `Formula.new' directly without a subclass." unless self.class < Formula
-
-  # Stop any subsequent modification of a formula's definition.
-  # Changes do not propagate to existing instances of formulae.
-  # Now that we have an instance, it's too late to make any changes to the class-level definition.
-  self.class.freeze
-
-  @name = name
-  @unresolved_path = path
-  @path = path.resolved_path
-  @alias_path = alias_path
-  @alias_name = (File.basename(alias_path) if alias_path)
-  @revision = self.class.revision || 0
-  @version_scheme = self.class.version_scheme || 0
-
-  @force_bottle = force_bottle
-
-  @tap = tap
-  @tap ||= if path == Formulary.core_path(name)
-    CoreTap.instance
-  else
-    Tap.from_path(path)
-  end
-
-  @full_name = full_name_with_optional_tap(name)
-  @full_alias_name = full_name_with_optional_tap(@alias_name)
-
-  self.class.spec_syms.each do |sym|
-    spec_eval sym
-  end
-
-  @active_spec = determine_active_spec(spec)
-  @active_spec_sym = if head?
-    :head
-  else
-    :stable
-  end
-  validate_attributes!
-  @build = active_spec.build
-  @pin = FormulaPin.new(self)
-  @follow_installed_alias = true
-  @prefix_returns_versioned_prefix = false
-  @oldname_locks = []
-end
-
-
- -
- -
-

Class Attribute Details

- - - -
-

- - .allow_network_access!(phases = []) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

The phases for which network access is allowed. By default, network -access is allowed for all phases. Valid phases are :build, :test, -and :postinstall. When no argument is passed, network access will be -allowed for all phases.

- -

Examples

- -
allow_network_access!
-
- -
allow_network_access! :build
-
- -
allow_network_access! [:build, :test]
-
- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-3366
-3367
-3368
-3369
-3370
-3371
-3372
-3373
-3374
-3375
-3376
-3377
-
-
# File 'formula.rb', line 3366
-
-def allow_network_access!(phases = [])
-  phases_array = Array(phases)
-  if phases_array.empty?
-    @network_access_allowed.each_key { |phase| @network_access_allowed[phase] = true }
-  else
-    phases_array.each do |phase|
-      raise ArgumentError, "Unknown phase: #{phase}" unless SUPPORTED_NETWORK_ACCESS_PHASES.include?(phase)
-
-      @network_access_allowed[phase] = true
-    end
-  end
-end
-
-
- - - -
-

- - .conflictsArray<FormulaConflict> (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-3456
-3457
-3458
-
-
# File 'formula.rb', line 3456
-
-def conflicts
-  @conflicts
-end
-
-
- - - -
-

- - .deny_network_access!(phases = []) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

The phases for which network access is denied. By default, network -access is allowed for all phases. Valid phases are :build, :test, -and :postinstall. When no argument is passed, network access will be -denied for all phases.

- -

Examples

- -
deny_network_access!
-
- -
deny_network_access! :build
-
- -
deny_network_access! [:build, :test]
-
- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-3400
-3401
-3402
-3403
-3404
-3405
-3406
-3407
-3408
-3409
-3410
-3411
-
-
# File 'formula.rb', line 3400
-
-def deny_network_access!(phases = [])
-  phases_array = Array(phases)
-  if phases_array.empty?
-    @network_access_allowed.each_key { |phase| @network_access_allowed[phase] = false }
-  else
-    phases_array.each do |phase|
-      raise ArgumentError, "Unknown phase: #{phase}" unless SUPPORTED_NETWORK_ACCESS_PHASES.include?(phase)
-
-      @network_access_allowed[phase] = false
-    end
-  end
-end
-
-
- - - -
-

- - .deprecated_option(hash) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Deprecated options are used to rename options and migrate users who used -them to newer ones. They are mostly used for migrating non-with options -(e.g. enable-debug) to with options (e.g. with-debug).

- -

Example

- -
deprecated_option "enable-debug" => "with-debug"
-
- - -
-
-
- - -
- - - - -
-
-
-
-3845
-3846
-3847
-
-
# File 'formula.rb', line 3845
-
-def deprecated_option(hash)
-  specs.each { |spec| spec.deprecated_option(hash) }
-end
-
-
- - - -
-

- - .deprecation_dateObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The date that this Formula was or becomes deprecated. -Returns nil if no date is specified.

- - -
-
-
- -

Returns:

-
    - -
  • - - - - - - - -

    Date

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-4212
-4213
-4214
-
-
# File 'formula.rb', line 4212
-
-def deprecation_date
-  @deprecation_date
-end
-
-
- - - -
-

- - .deprecation_reasonnil, ... (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The reason for deprecation of a Formula.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (nil) - - - - — -

    if no reason was provided or the formula is not deprecated.

    -
    - -
  • - -
  • - - - (String, Symbol) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-4219
-4220
-4221
-
-
# File 'formula.rb', line 4219
-
-def deprecation_reason
-  @deprecation_reason
-end
-
-
- - - -
-

- - .desc(arg = T.unsafe(nil)) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg - - - (T.untyped) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-162
-
-
# File 'sorbet/rbi/parlour.rbi', line 162
-
-def self.desc(arg = T.unsafe(nil)); end
-
-
- - - -
-

- - .disable_dateObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The date that this Formula was or becomes disabled. -Returns nil if no date is specified.

- - -
-
-
- -

Returns:

-
    - -
  • - - - - - - - -

    Date

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-4265
-4266
-4267
-
-
# File 'formula.rb', line 4265
-
-def disable_date
-  @disable_date
-end
-
-
- - - -
-

- - .disable_reasonString, Symbol (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The reason this Formula is disabled. -Returns nil if no reason was provided or the formula is not disabled.

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-4272
-4273
-4274
-
-
# File 'formula.rb', line 4272
-
-def disable_reason
-  @disable_reason
-end
-
-
- - - -
-

- - .head(val = nil, specs = {}, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Adds a head SoftwareSpec. -This can be installed by passing the --HEAD option to allow -installing software directly from a branch of a version-control repository. -If called as a method this provides just the url for the SoftwareSpec. -If a block is provided you can also add depends_on and Patches just to the head SoftwareSpec. -The download strategies (e.g. :using =>) are the same as for url. -master is the default branch and doesn't need stating with a branch: parameter.

- -

Example

- -
head "https://we.prefer.https.over.git.example.com/.git"
-
- -
head "https://example.com/.git", branch: "name_of_branch"
-
- -

or (if autodetect fails):

- -
head "https://hg.is.awesome.but.git.has.won.example.com/", using: :hg
-
- - -
-
-
- - -
- - - - -
-
-
-
-3680
-3681
-3682
-3683
-3684
-3685
-3686
-3687
-3688
-
-
# File 'formula.rb', line 3680
-
-def head(val = nil, specs = {}, &block)
-  if block
-    @head.instance_eval(&block)
-  elsif val
-    @head.url(val, specs)
-  else
-    @head
-  end
-end
-
-
- - - -
-

- - .homepage(arg = T.unsafe(nil)) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg - - - (T.untyped) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-165
-
-
# File 'sorbet/rbi/parlour.rbi', line 165
-
-def self.homepage(arg = T.unsafe(nil)); end
-
-
- - - -
-

- - .keg_only_reasonObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The reason for why this software is not linked (by default) to HOMEBREW_PREFIX.

- - -
-
-
- - -
- - - - -
-
-
-
-3271
-3272
-3273
-
-
# File 'formula.rb', line 3271
-
-def keg_only_reason
-  @keg_only_reason
-end
-
-
- - - -
-

- - .license(args = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The SPDX ID of the open-source license that the formula uses. -Shows when running brew info.

- -

Use :any_of, :all_of or :with to describe complex license expressions. -:any_of should be used when the user can choose which license to use. -:all_of should be used when the user must use all licenses. -:with should be used to specify a valid SPDX exception.

- -

Add + to an identifier to indicate that the formulae can be -licensed under later versions of the same license.

- -

Examples

- -
license "BSD-2-Clause"
-
- -
license "EPL-1.0+"
-
- -
license any_of: ["MIT", "GPL-2.0-only"]
-
- -
license all_of: ["MIT", "GPL-2.0-only"]
-
- -
license "GPL-2.0-only" => { with: "LLVM-exception" }
-
- -
license :public_domain
-
- -
license any_of: [
-  "MIT",
-  :public_domain,
-  all_of: ["0BSD", "Zlib", "Artistic-1.0+"],
-  "Apache-2.0" => { with: "LLVM-exception" },
-]
-
- - -
-
- - - - - -
-
-
-
-3337
-3338
-3339
-3340
-3341
-3342
-3343
-
-
# File 'formula.rb', line 3337
-
-def license(args = nil)
-  if args.nil?
-    @licenses
-  else
-    @licenses = args
-  end
-end
-
-
- - - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-3458
-3459
-3460
-
-
# File 'formula.rb', line 3458
-
-def link_overwrite_paths
-  @link_overwrite_paths
-end
-
-
- - - -
-

- - .livecheck(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Livecheck can be used to check for newer versions of the software. -This method evaluates the DSL specified in the livecheck block of the -Formula (if it exists) and sets the instance variables of a Livecheck -object accordingly. This is used by brew livecheck to check for newer -versions of the software.

- -

Example

- -
livecheck do
-  skip "Not maintained"
-  url "https://example.com/foo/releases"
-  regex /foo-(\d+(?:\.\d+)+)\.tar/
-end
-
- - -
-
-
- - -
- - - - -
-
-
-
-4085
-4086
-4087
-4088
-4089
-4090
-
-
# File 'formula.rb', line 4085
-
-def livecheck(&block)
-  return @livecheck unless block
-
-  @livecheckable = true
-  @livecheck.instance_eval(&block)
-end
-
-
- - - -
-

- - .mirror(val) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Additional URLs for the stable version of the formula. -These are only used if the url fails to download. It's optional and -there can be more than one. Generally we add them when the main url -is unreliable. If url is really unreliable then we may swap the -mirror and url.

- -

Example

- -
mirror "https://in.case.the.host.is.down.example.com"
-mirror "https://in.case.the.mirror.is.down.example.com
-
- - -
-
-
- - -
- - - - -
-
-
-
-3568
-3569
-3570
-
-
# File 'formula.rb', line 3568
-
-def mirror(val)
-  stable.mirror(val)
-end
-
-
- - - -
-

- - .option(name, description = "") ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Options can be used as arguments to brew install. -To switch features on/off: "with-something" or "with-otherthing". -To use other software: "with-other-software" or "without-foo". -Note that for depends_on that are :optional or :recommended, options -are generated automatically.

- -

There are also some special options:

- -
    -
  • :universal: build a universal binary/library (e.g. on newer Intel Macs -this means a combined x86_64/x86 binary/library).
  • -
- -

Examples

- -
option "with-spam", "The description goes here without a dot at the end"
-
- -
option "with-qt", "Text here overwrites what's autogenerated by 'depends_on "qt" => :optional'"
-
- -
option :universal
-
- - -
-
-
- - -
- - - - -
-
-
-
-3829
-3830
-3831
-
-
# File 'formula.rb', line 3829
-
-def option(name, description = "")
-  specs.each { |spec| spec.option(name, description) }
-end
-
-
- - - -
-

- - .pour_bottle_check_unsatisfied_reasonObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If pour_bottle? returns false the user-visible reason to display for -why they cannot use the bottle.

- - -
-
-
- - -
- - - - -
-
-
-
-3462
-3463
-3464
-
-
# File 'formula.rb', line 3462
-
-def pour_bottle_check_unsatisfied_reason
-  @pour_bottle_check_unsatisfied_reason
-end
-
-
- - - -
-

- - .pour_bottle_only_ifObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-3458
-3459
-3460
-
-
# File 'formula.rb', line 3458
-
-def pour_bottle_only_if
-  @pour_bottle_only_if
-end
-
-
- - - -
-

- - .revision(arg = T.unsafe(nil)) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg - - - (T.untyped) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-168
-
-
# File 'sorbet/rbi/parlour.rbi', line 168
-
-def self.revision(arg = T.unsafe(nil)); end
-
-
- - - -
-

- - .service(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Service can be used to define services. -This method evaluates the DSL specified in the service block of the -Formula (if it exists) and sets the instance variables of a Service -object accordingly. This is used by brew install to generate a service file.

- -

Example

- -
service do
-  run [opt_bin/"foo"]
-end
-
- - -
-
-
- - -
- - - - -
-
-
-
-4107
-4108
-4109
-4110
-4111
-
-
# File 'formula.rb', line 4107
-
-def service(&block)
-  return @service_block unless block
-
-  @service_block = block
-end
-
-
- - - -
-

- - .sha256(val) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

To verify the cached download's integrity and security we verify the -SHA-256 hash matches what we've declared in the Formula. To quickly fill -this value you can leave it blank and run brew fetch --force and it'll -tell you the currently valid value.

- -

Example

- -
sha256 "2a2ba417eebaadcb4418ee7b12fe2998f26d6e6f7fda7983412ff66a741ab6f7"
-
- - -
-
-
- - -
- - - - -
-
-
-
-3586
-3587
-3588
-
-
# File 'formula.rb', line 3586
-
-def sha256(val)
-  stable.sha256(val)
-end
-
-
- - - -
-

- - .skip_clean_pathsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-3458
-3459
-3460
-
-
# File 'formula.rb', line 3458
-
-def skip_clean_paths
-  @skip_clean_paths
-end
-
-
- - - -
-

- - .stable(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Allows adding depends_on and Patches just to the stable SoftwareSpec. -This is required instead of using a conditional. -It is preferable to also pull the url and sha256 into the block if one is added.

- -

Example

- -
stable do
-  url "https://example.com/foo-1.0.tar.gz"
-  sha256 "2a2ba417eebaadcb4418ee7b12fe2998f26d6e6f7fda7983412ff66a741ab6f7"
-
-  depends_on "libxml2"
-  depends_on "libffi"
-end
-
- - -
-
-
- - -
- - - - -
-
-
-
-3650
-3651
-3652
-3653
-3654
-
-
# File 'formula.rb', line 3650
-
-def stable(&block)
-  return @stable unless block
-
-  @stable.instance_eval(&block)
-end
-
-
- - - -
-

- - .url(val, specs = {}) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The URL used to download the source for the stable version of the formula. -We prefer https for security and proxy reasons. -If not inferable, specify the download strategy with using: ....

- -
    -
  • :git, :hg, :svn, :bzr, :fossil, :cvs,
  • -
  • :curl (normal file download, will also extract)
  • -
  • :nounzip (without extracting)
  • -
  • :post (download via an HTTP POST)
  • -
- -

Examples

- -
url "https://packed.sources.and.we.prefer.https.example.com/archive-1.2.3.tar.bz2"
-
- -
url "https://some.dont.provide.archives.example.com",
-    using:    :git,
-    tag:      "1.2.3",
-    revision: "db8e4de5b2d6653f66aea53094624468caad15d2"
-
- - -
-
-
- - -
- - - - -
-
-
-
-3533
-3534
-3535
-
-
# File 'formula.rb', line 3533
-
-def url(val, specs = {})
-  stable.url(val, specs)
-end
-
-
- - - -
-

- - .version(val = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The version string for the stable version of the formula. -The version is autodetected from the URL and/or tag so only needs to be -declared if it cannot be autodetected correctly.

- -

Example

- -
version "1.2-final"
-
- - -
-
-
- - -
- - - - -
-
-
-
-3549
-3550
-3551
-
-
# File 'formula.rb', line 3549
-
-def version(val = nil)
-  stable.version(val)
-end
-
-
- - - -
-

- - .version_scheme(arg = T.unsafe(nil)) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg - - - (T.untyped) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-171
-
-
# File 'sorbet/rbi/parlour.rbi', line 171
-
-def self.version_scheme(arg = T.unsafe(nil)); end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #active_log_typeString? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

When performing a build, test, or other loggable action, indicates which -log file location to use.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-191
-192
-193
-
-
# File 'formula.rb', line 191
-
-def active_log_type
-  @active_log_type
-end
-
-
- - - -
-

- - #active_spec=(spec_sym) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-
-
# File 'formula.rb', line 263
-
-def active_spec=(spec_sym)
-  spec = send(spec_sym)
-  raise FormulaSpecificationError, "#{spec_sym} spec is not available for #{full_name}" unless spec
-
-  old_spec_sym = @active_spec_sym
-  @active_spec = spec
-  @active_spec_sym = spec_sym
-  validate_attributes!
-  @build = active_spec.build
-
-  return if spec_sym == old_spec_sym
-
-  Dependency.clear_cache
-  Requirement.clear_cache
-end
-
-
- - - -
-

- - #active_spec_symSymbol (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A symbol to indicate currently active SoftwareSpec. -It's either :stable or :head

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -

See Also:

-
    - -
  • #active_spec
  • - -
- -
- - - - -
-
-
-
-156
-157
-158
-
-
# File 'formula.rb', line 156
-
-def active_spec_sym
-  @active_spec_sym
-end
-
-
- - - -
-

- - #alias_nameString? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The name of the alias that was used to identify this Formula. -e.g. another-name-for-this-formula

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-97
-98
-99
-
-
# File 'formula.rb', line 97
-
-def alias_name
-  @alias_name
-end
-
-
- - - -
-

- - #alias_pathPathname? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The path to the alias that was used to identify this Formula. -e.g. /usr/local/Library/Taps/homebrew/homebrew-core/Aliases/another-name-for-this-formula

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-92
-93
-94
-
-
# File 'formula.rb', line 92
-
-def alias_path
-  @alias_path
-end
-
-
- - - -
-

- - #buildBuildOptions, Tab - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The BuildOptions or Tab for this Formula. Lists the arguments passed -and any options in the Formula. Note that these may differ at -different times during the installation of a Formula. This is annoying -but the result of state that we're trying to eliminate.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-198
-199
-200
-
-
# File 'formula.rb', line 198
-
-def build
-  @build
-end
-
-
- - - -
-

- - #buildpathPathname? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The current working directory during builds. -Will only be non-nil inside #install.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-176
-177
-178
-
-
# File 'formula.rb', line 176
-
-def buildpath
-  @buildpath
-end
-
-
- - - -
-

- - #follow_installed_aliasBoolean - - - - Also known as: - follow_installed_alias? - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether this formula should be considered outdated -if the target of the alias it was installed with has since changed. -Defaults to true.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-204
-205
-206
-
-
# File 'formula.rb', line 204
-
-def follow_installed_alias
-  @follow_installed_alias
-end
-
-
- - - -
-

- - #force_bottleBoolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether or not to force the use of a bottle.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-210
-211
-212
-
-
# File 'formula.rb', line 210
-
-def force_bottle
-  @force_bottle
-end
-
-
- - - -
-

- - #full_alias_nameString? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The fully-qualified alias referring to this Formula. -For core formulae it's the same as #alias_name. -e.g. homebrew/tap-name/another-name-for-this-formula

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-111
-112
-113
-
-
# File 'formula.rb', line 111
-
-def full_alias_name
-  @full_alias_name
-end
-
-
- - - -
-

- - #full_nameString (readonly) - - - - - -

-
-

The fully-qualified name of this Formula. -For core formulae it's the same as #name. -e.g. homebrew/tap-name/this-formula

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-106
-107
-
-
# File 'formula.rb', line 105
-
-def full_name
-  @full_name
-end
-
-
- - - -
-

- - #headSoftwareSpec? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The HEAD SoftwareSpec for this Formula. -Installed when using brew install --HEAD. -This is always installed with the version HEAD and taken from the latest -commit in the version control system. -nil if there is no HEAD version.

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-143
-144
-145
-
-
# File 'formula.rb', line 143
-
-def head
-  @head
-end
-
-
- - - -
-

- - #local_bottle_pathPathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

When installing a bottle (binary package) from a local path this will be -set to the full path to the bottle tarball. If not, it will be nil.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-186
-187
-188
-
-
# File 'formula.rb', line 186
-
-def local_bottle_path
-  @local_bottle_path
-end
-
-
- - - -
-

- - #nameString (readonly) - - - - - -

-
-

The name of this Formula. -e.g. this-formula

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-87
-88
-89
-
-
# File 'formula.rb', line 87
-
-def name
-  @name
-end
-
-
- - - -
-

- - #pathPathname (readonly) - - - - - -

-
-

The full path to this Formula. -e.g. /usr/local/Library/Taps/homebrew/homebrew-core/Formula/t/this-formula.rb

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-118
-119
-120
-
-
# File 'formula.rb', line 118
-
-def path
-  @path
-end
-
-
- - - -
-

- - #revisionInteger (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Used for creating new Homebrew versions of software without new upstream -versions.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-166
-167
-168
-
-
# File 'formula.rb', line 166
-
-def revision
-  @revision
-end
-
-
- - - -
-

- - #source_modified_timeTime? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

most recent modified time for source files

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-160
-161
-162
-
-
# File 'formula.rb', line 160
-
-def source_modified_time
-  @source_modified_time
-end
-
-
- - - -
-

- - #stableSoftwareSpec? (readonly) - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The stable (and default) SoftwareSpec for this Formula. -This contains all the attributes (e.g. URL, checksum) that apply to the -stable version of this formula.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-133
-134
-135
-
-
# File 'formula.rb', line 133
-
-def stable
-  @stable
-end
-
-
- - - -
-

- - #tapTap? (readonly) - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The Tap instance associated with this Formula. -If it's nil, then this formula is loaded from a path or URL.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Tap, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-126
-127
-
-
# File 'formula.rb', line 125
-
-def tap
-  @tap
-end
-
-
- - - -
-

- - #testpathPathname? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The current working directory during tests. -Will only be non-nil inside test.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-181
-182
-183
-
-
# File 'formula.rb', line 181
-
-def testpath
-  @testpath
-end
-
-
- - - -
-

- - #version_schemeInteger (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Used to change version schemes for packages.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-171
-172
-173
-
-
# File 'formula.rb', line 171
-
-def version_scheme
-  @version_scheme
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .[](name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2197
-2198
-2199
-
-
# File 'formula.rb', line 2197
-
-def self.[](name)
-  Formulary.factory(name)
-end
-
-
- -
-

- - .alias_full_namesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all aliases as fully-qualified names

- - -
-
-
- - -
- - - - -
-
-
-
-2187
-2188
-2189
-
-
# File 'formula.rb', line 2187
-
-def self.alias_full_names
-  @alias_full_names ||= core_aliases + tap_aliases
-end
-
-
- -
-

- - .aliasesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all aliases

- - -
-
-
- - -
- - - - -
-
-
-
-2182
-2183
-2184
-
-
# File 'formula.rb', line 2182
-
-def self.aliases
-  @aliases ||= (core_aliases + tap_aliases.map { |name| name.split("/").last }).uniq.sort
-end
-
-
- -
-

- - .all(eval_all: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all Formula -this should only be used when users specify --all to a command

- - -
-
-
- - -
- - - - -
-
-
-
-2118
-2119
-2120
-2121
-2122
-2123
-2124
-2125
-2126
-2127
-2128
-2129
-2130
-2131
-2132
-
-
# File 'formula.rb', line 2118
-
-def self.all(eval_all: false)
-  if !eval_all && !Homebrew::EnvConfig.eval_all?
-    raise ArgumentError, "Formula#all without `--eval-all` or HOMEBREW_EVAL_ALL"
-  end
-
-  (core_names + tap_files).filter_map do |name_or_file|
-    Formulary.factory(name_or_file)
-  rescue FormulaUnavailableError, FormulaUnreadableError => e
-    # Don't let one broken formula break commands. But do complain.
-    onoe "Failed to import: #{name_or_file}"
-    $stderr.puts e
-
-    nil
-  end
-end
-
-
- -
-

- - .bottle(&block) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Adds a bottle SoftwareSpec. -This provides a pre-built binary package built by the Homebrew maintainers for you. -It will be installed automatically if there is a binary package for your platform -and you haven't passed or previously used any options on this formula.

- -

If you maintain your own repository, you can add your own bottle links. -You can ignore this block entirely if submitting to Homebrew/homebrew-core. -It'll be handled for you by the Brew Test Bot.

- -
bottle do
-  root_url "https://example.com" # Optional root to calculate bottle URLs.
-  rebuild 1 # Marks the old bottle as outdated without bumping the version/revision of the formula.
-  # Optionally specify the HOMEBREW_CELLAR in which the bottles were built.
-  sha256 cellar: "/brew/Cellar", catalina:    "ef65c759c5097a36323fa9c77756468649e8d1980a3a4e05695c05e39568967c"
-  sha256 cellar: :any,           mojave:      "28f4090610946a4eb207df102d841de23ced0d06ba31cb79e040d883906dcd4f"
-  sha256                         high_sierra: "91dd0caca9bd3f38c439d5a7b6f68440c4274945615fae035ff0a369264b8a2f"
-end
-
- -

Homebrew maintainers aim to bottle all formulae.

- - -
-
-
-

Parameters:

- - - -

See Also:

- - -
- - - - -
-
-
-
-3615
-3616
-3617
-
-
# File 'formula.rb', line 3615
-
-def bottle(&block)
-  stable.bottle(&block)
-end
-
-
- -
-

- - .buildObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-3619
-3620
-3621
-
-
# File 'formula.rb', line 3619
-
-def build
-  stable.build
-end
-
-
- -
-

- - .build_flagsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get the BUILD_FLAGS from the formula's namespace set in Formulary::load_formula.

- - -
-
-
- - -
- - - - -
-
-
-
-3624
-3625
-3626
-3627
-3628
-3629
-3630
-
-
# File 'formula.rb', line 3624
-
-def build_flags
-  namespace = T.must(to_s.split("::")[0..-2]).join("::")
-  return [] if namespace.empty?
-
-  mod = const_get(namespace)
-  mod.const_get(:BUILD_FLAGS)
-end
-
-
- -
-

- - .conflicts_with(*names) ⇒ Object - - - - - -

-
-

One or more formulae that conflict with this one and why.

- -

Example

- -
conflicts_with "imagemagick", because: "both install `convert` binaries"
-
- - -
-
-
- - -
- - - - -
-
-
-
-3912
-3913
-3914
-3915
-
-
# File 'formula.rb', line 3912
-
-def conflicts_with(*names)
-  opts = names.last.is_a?(Hash) ? names.pop : {}
-  names.each { |name| conflicts << FormulaConflict.new(name, opts[:because]) }
-end
-
-
- -
-

- - .core_alias_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all alias files of core Formula

- - -
-
-
- - -
- - - - -
-
-
-
-2167
-2168
-2169
-
-
# File 'formula.rb', line 2167
-
-def self.core_alias_files
-  CoreTap.instance.alias_files
-end
-
-
- -
-

- - .core_aliasesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all core aliases

- - -
-
-
- - -
- - - - -
-
-
-
-2172
-2173
-2174
-
-
# File 'formula.rb', line 2172
-
-def self.core_aliases
-  CoreTap.instance.aliases
-end
-
-
- -
-

- - .core_namesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all core Formula names

- - -
-
-
- - -
- - - - -
-
-
-
-2092
-2093
-2094
-
-
# File 'formula.rb', line 2092
-
-def self.core_names
-  CoreTap.instance.formula_names
-end
-
-
- -
-

- - .cxxstdlib_check(check_type) ⇒ Object - - - - - -

-
-

Pass :skip to this method to disable post-install stdlib checking.

- - -
-
-
- - -
- - - - -
-
-
-
-3973
-3974
-3975
-
-
# File 'formula.rb', line 3973
-
-def cxxstdlib_check(check_type)
-  define_method(:skip_cxxstdlib_check?) { true } if check_type == :skip
-end
-
-
- -
-

- - .depends_on(dep) ⇒ Object - - - - - -

-
-

The dependencies for this formula. Use strings for the names of other -formulae. Homebrew provides some :special Requirements for stuff -that needs extra handling (often changing some ENV vars or -deciding whether to use the system provided version).

- -

Examples

- -

:build means this dependency is only needed during build.

- -
depends_on "cmake" => :build
-
- -

:test means this dependency is only needed during testing.

- -
depends_on "node" => :test
-
- -

:recommended dependencies are built by default. -But a --without-... option is generated to opt-out.

- -
depends_on "readline" => :recommended
-
- -

:optional dependencies are NOT built by default unless the -auto-generated --with-... option is passed.

- -
depends_on "glib" => :optional
-
- -

If you need to specify that another formula has to be built with/out -certain options (note, no -- needed before the option):

- -
depends_on "zeromq" => "with-pgm"
-depends_on "qt" => ["with-qtdbus", "developer"] # Multiple options.
-
- -

Optional and enforce that "boost" is built using --with-c++11.

- -
depends_on "boost" => [:optional, "with-c++11"]
-
- -

If a dependency is only needed in certain cases:

- -
depends_on "sqlite" if MacOS.version >= :catalina
-depends_on xcode: :build # If the formula really needs full Xcode to compile.
-depends_on macos: :mojave # Needs at least macOS Mojave (10.14) to run.
-
- -

It is possible to only depend on something if -build.with? or build.without? "another_formula":

- -
depends_on "postgresql" if build.without? "sqlite"
-
- - -
-
-
- - -
- - - - -
-
-
-
-3782
-3783
-3784
-
-
# File 'formula.rb', line 3782
-
-def depends_on(dep)
-  specs.each { |spec| spec.depends_on(dep) }
-end
-
-
- -
-

- - .deprecate!(date:, because:) ⇒ Object - - - - - -

-
-

Deprecates a Formula (on the given date) so a warning is -shown on each installation. If the date has not yet passed the formula -will not be deprecated.

- -

Examples

- -
deprecate! date: "2020-08-27", because: :unmaintained
-
- -
deprecate! date: "2020-08-27", because: "has been replaced by foo"
-
- - -
-
- - - - - -
-
-
-
-4191
-4192
-4193
-4194
-4195
-4196
-4197
-
-
# File 'formula.rb', line 4191
-
-def deprecate!(date:, because:)
-  @deprecation_date = Date.parse(date)
-  return if @deprecation_date > Date.today
-
-  @deprecation_reason = because
-  @deprecated = true
-end
-
-
- -
-

- - .deprecated?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether this Formula is deprecated (i.e. warns on installation). -Defaults to false.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-4203
-4204
-4205
-
-
# File 'formula.rb', line 4203
-
-def deprecated?
-  @deprecated == true
-end
-
-
- -
-

- - .disable!(date:, because:) ⇒ Object - - - - - -

-
-

Disables a Formula (on the given date) so it cannot be -installed. If the date has not yet passed the formula -will be deprecated instead of disabled.

- -

Examples

- -
disable! date: "2020-08-27", because: :does_not_build
-
- -
disable! date: "2020-08-27", because: "has been replaced by foo"
-
- - -
-
- - - - - -
-
-
-
-4238
-4239
-4240
-4241
-4242
-4243
-4244
-4245
-4246
-4247
-4248
-4249
-
-
# File 'formula.rb', line 4238
-
-def disable!(date:, because:)
-  @disable_date = Date.parse(date)
-
-  if @disable_date > Date.today
-    @deprecation_reason = because
-    @deprecated = true
-    return
-  end
-
-  @disable_reason = because
-  @disabled = true
-end
-
-
- -
-

- - .disabled?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether this Formula is disabled (i.e. cannot be installed). -Defaults to false.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-4256
-4257
-4258
-
-
# File 'formula.rb', line 4256
-
-def disabled?
-  @disabled == true
-end
-
-
- -
-

- - .fails_with(compiler, &block) ⇒ Object - - - - - -

-
-

Marks the Formula as failing with a particular compiler so it will fall back to others.

- -

Examples

- -

For Apple compilers, this should be in the format:

- -
fails_with :clang do
-  build 600
-  cause "multiple configure and compile errors"
-end
-
- -

The block may be omitted and if present, the build may be omitted; -if so, then the compiler will not be allowed for all versions.

- -

major_version should be the major release number only, for instance -'7' for the GCC 7 series (7.0, 7.1, etc.). -If version or the block is omitted, then the compiler will -not be allowed for all compilers in that series.

- -

For example, if a bug is only triggered on GCC 7.1 but is not -encountered on 7.2:

- -
fails_with :gcc => '7' do
-  version '7.1'
-end
-
- - -
-
-
- - -
- - - - -
-
-
-
-4008
-4009
-4010
-
-
# File 'formula.rb', line 4008
-
-def fails_with(compiler, &block)
-  specs.each { |spec| spec.fails_with(compiler, &block) }
-end
-
-
- -
-

- - .freezeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-3254
-3255
-3256
-3257
-3258
-3259
-3260
-3261
-
-
# File 'formula.rb', line 3254
-
-def freeze
-  specs.each(&:freeze)
-  @livecheck.freeze
-  @conflicts.freeze
-  @skip_clean_paths.freeze
-  @link_overwrite_paths.freeze
-  super
-end
-
-
- -
-

- - .full_namesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all Formula names, which the tap formulae have the fully-qualified name

- - -
-
-
- - -
- - - - -
-
-
-
-2112
-2113
-2114
-
-
# File 'formula.rb', line 2112
-
-def self.full_names
-  @full_names ||= core_names + tap_names
-end
-
-
- -
-

- - .fuzzy_search(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a list of approximately matching formula names, but not the complete match

- - -
-
-
- - -
- - - - -
-
-
-
-2192
-2193
-2194
-2195
-
-
# File 'formula.rb', line 2192
-
-def self.fuzzy_search(name)
-  @spell_checker ||= DidYouMean::SpellChecker.new(dictionary: Set.new(names + full_names).to_a)
-  @spell_checker.correct(name)
-end
-
-
- -
-

- - .go_resource(name, &block) ⇒ Object - - - - - -

-
-
Deprecated.

Use Go modules instead.

-
-

Specify a Go resource.

- - -
-
-
- - -
- - - - -
-
-
-
-3714
-3715
-3716
-3717
-
-
# File 'formula.rb', line 3714
-
-def go_resource(name, &block)
-  odeprecated "`Formula.go_resource`", "Go modules"
-  specs.each { |spec| spec.go_resource(name, &block) }
-end
-
-
- -
-

- - .inherited(child) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Initialise instance variables for each subclass. These need to be initialised before the class is frozen, -and some DSL may never be called so it can't be done lazily.

- - -
-
-
- - -
- - - - -
-
-
-
-3226
-3227
-3228
-3229
-3230
-3231
-3232
-3233
-3234
-3235
-3236
-3237
-3238
-3239
-3240
-3241
-
-
# File 'formula.rb', line 3226
-
-def inherited(child)
-  super
-  child.instance_eval do
-    # Ensure this is synced with `freeze`
-    @stable = SoftwareSpec.new(flags: build_flags)
-    @head = HeadSoftwareSpec.new(flags: build_flags)
-    @livecheck = Livecheck.new(self)
-    @conflicts = []
-    @skip_clean_paths = Set.new
-    @link_overwrite_paths = Set.new
-    @loaded_from_api = false
-    @network_access_allowed = SUPPORTED_NETWORK_ACCESS_PHASES.to_h do |phase|
-      [phase, DEFAULT_NETWORK_ACCESS_ALLOWED]
-    end
-  end
-end
-
-
- -
-

- - .installedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all installed Formula

- - -
-
-
- - -
- - - - -
-
-
-
-2152
-2153
-2154
-2155
-2156
-2157
-2158
-
-
# File 'formula.rb', line 2152
-
-def self.installed
-  Formula.cache[:installed] ||= racks.flat_map do |rack|
-    Formulary.from_rack(rack)
-  rescue
-    []
-  end.uniq(&:name)
-end
-
-
- -
-

- - .installed_formula_namesArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all currently installed formula names.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-2147
-2148
-2149
-
-
# File 'formula.rb', line 2147
-
-def self.installed_formula_names
-  racks.map { |rack| rack.basename.to_s }
-end
-
-
- -
-

- - .installed_with_alias_path(alias_path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2160
-2161
-2162
-2163
-2164
-
-
# File 'formula.rb', line 2160
-
-def self.installed_with_alias_path(alias_path)
-  return [] if alias_path.nil?
-
-  installed.select { |f| f.installed_alias_path == alias_path }
-end
-
-
- -
-

- - .keg_only(reason, explanation = "") ⇒ Object - - - - - -

-
-

Software that will not be symlinked into the brew --prefix and will -only live in its Cellar. Other formulae can depend on it and Homebrew -will add the necessary includes, libraries and other paths while -building that other formula.

- -

Keg-only formulae are not in your PATH and are not seen by compilers -if you build your own software outside of Homebrew. This way, we -don't shadow software provided by macOS.

- -

Examples

- -
keg_only :provided_by_macos
-
- -
keg_only :versioned_formulae
-
- -
keg_only "because I want it so"
-
- - -
-
-
- - -
- - - - -
-
-
-
-3966
-3967
-3968
-
-
# File 'formula.rb', line 3966
-
-def keg_only(reason, explanation = "")
-  @keg_only_reason = KegOnlyReason.new(reason, explanation)
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Permit overwriting certain files while linking.

- -

Examples

- -

Sometimes we accidentally install files outside the prefix. Once we fix that, -users will get a link conflict error. Overwrite those files with:

- -
link_overwrite "bin/foo", "lib/bar"
-
- -
link_overwrite "share/man/man1/baz-*"
-
- - -
-
-
- - -
- - - - -
-
-
-
-4288
-4289
-4290
-4291
-
-
# File 'formula.rb', line 4288
-
-def link_overwrite(*paths)
-  paths.flatten!
-  link_overwrite_paths.merge(paths)
-end
-
-
- -
-

- - .livecheckable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks whether a livecheck specification is defined or not.

- -

It returns true when a livecheck block is present in the Formula -and false otherwise.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-3442
-3443
-3444
-
-
# File 'formula.rb', line 3442
-
-def livecheckable?
-  @livecheckable == true
-end
-
-
- -
-

- - .loaded_from_api?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-156
-
-
# File 'sorbet/rbi/parlour.rbi', line 156
-
-def self.loaded_from_api?; end
-
-
- -
-

- - .namesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all Formula names

- - -
-
-
- - -
- - - - -
-
-
-
-2107
-2108
-2109
-
-
# File 'formula.rb', line 2107
-
-def self.names
-  @names ||= (core_names + tap_names.map { |name| name.split("/").last }).uniq.sort
-end
-
-
- -
-

- - .needs(*standards) ⇒ Object - - - - - -

-
-

Marks the Formula as needing a certain standard, so Homebrew -will fall back to other compilers if the default compiler -does not implement that standard.

- -

We generally prefer to depends_on a desired compiler and to -explicitly use that compiler in a formula's #install block, -rather than implicitly finding a suitable compiler with needs.

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-4023
-4024
-4025
-
-
# File 'formula.rb', line 4023
-
-def needs(*standards)
-  specs.each { |spec| spec.needs(*standards) }
-end
-
-
- -
-

- - .network_access_allowed?(phase) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the specified phase should be forced offline.

- - -
-
-
-

Parameters:

-
    - -
  • - - phase - - - (Symbol) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-3415
-3416
-3417
-3418
-3419
-3420
-
-
# File 'formula.rb', line 3415
-
-def network_access_allowed?(phase)
-  raise ArgumentError, "Unknown phase: #{phase}" unless SUPPORTED_NETWORK_ACCESS_PHASES.include?(phase)
-
-  env_var = Homebrew::EnvConfig.send(:"formula_#{phase}_network")
-  env_var.nil? ? @network_access_allowed[phase] : env_var == "allow"
-end
-
-
- -
-

- - .on_macos(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method is included by OnSystem

- - -
-
-
- - -
- - - - -
-
-
-
-8
-
-
# File 'formula.rbi', line 8
-
-def self.on_macos(&block); end
-
-
- -
-

- - .on_system_blocks_exist?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-
-
# File 'formula.rbi', line 6
-
-def self.on_system_blocks_exist?; end
-
-
- -
-

- - .patch(strip = :p1, src = nil, &block) ⇒ Object - - - - - -

-
-

External patches can be declared using resource-style blocks.

- -

Examples

- -
patch do
-  url "https://example.com/example_patch.diff"
-  sha256 "c6bc3f48ce8e797854c4b865f6a8ff969867bbcaebd648ae6fd825683e59fef2"
-end
-
- -

A strip level of -p1 is assumed. It can be overridden using a symbol -argument:

- -
patch :p0 do
-  url "https://example.com/example_patch.diff"
-  sha256 "c6bc3f48ce8e797854c4b865f6a8ff969867bbcaebd648ae6fd825683e59fef2"
-end
-
- -

Patches can be declared in stable and head blocks. This form is -preferred over using conditionals.

- -
stable do
-  patch do
-    url "https://example.com/example_patch.diff"
-    sha256 "c6bc3f48ce8e797854c4b865f6a8ff969867bbcaebd648ae6fd825683e59fef2"
-  end
-end
-
- -

Embedded (__END__) patches are declared like so:

- -
patch :DATA
-patch :p0, :DATA
-
- -

Patches can also be embedded by passing a string. This makes it possible -to provide multiple embedded patches while making only some of them -conditional.

- -
patch :p0, "..."
-
- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-3899
-3900
-3901
-
-
# File 'formula.rb', line 3899
-
-def patch(strip = :p1, src = nil, &block)
-  specs.each { |spec| spec.patch(strip, src, &block) }
-end
-
-
- -
-

- - .pour_bottle?(only_if: nil, &block) ⇒ Boolean - - - - - -

-
-

Defines whether the Formula's bottle can be used on the given Homebrew -installation.

- -

Examples

- -

If the bottle requires the Xcode CLT to be installed a -Formula would declare:

- -
pour_bottle? do
-  reason "The bottle needs the Xcode CLT to be installed."
-  satisfy { MacOS::CLT.installed? }
-end
-
- -

If satisfy returns false then a bottle will not be used and instead -the Formula will be built from source and reason will be printed.

- -

Alternatively, a preset reason can be passed as a symbol:

- -
pour_bottle? only_if: :clt_installed
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-4138
-4139
-4140
-4141
-4142
-4143
-4144
-4145
-4146
-4147
-4148
-4149
-4150
-4151
-4152
-4153
-4154
-4155
-4156
-4157
-4158
-4159
-4160
-4161
-4162
-4163
-4164
-4165
-4166
-4167
-4168
-4169
-4170
-4171
-4172
-
-
# File 'formula.rb', line 4138
-
-def pour_bottle?(only_if: nil, &block)
-  @pour_bottle_check = PourBottleCheck.new(self)
-  @pour_bottle_only_if = only_if
-
-  if only_if.present? && block.present?
-    raise ArgumentError, "Do not pass both a preset condition and a block to `pour_bottle?`"
-  end
-
-  block ||= case only_if
-  when :clt_installed
-    lambda do |_|
-      on_macos do
-        T.bind(self, PourBottleCheck)
-        reason(+<<~EOS)
-          The bottle needs the Apple Command Line Tools to be installed.
-            You can install them, if desired, with:
-              xcode-select --install
-        EOS
-        satisfy { MacOS::CLT.installed? }
-      end
-    end
-  when :default_prefix
-    lambda do |_|
-      T.bind(self, PourBottleCheck)
-      reason(+<<~EOS)
-        The bottle (and many others) needs to be installed into #{Homebrew::DEFAULT_PREFIX}.
-      EOS
-      satisfy { HOMEBREW_PREFIX.to_s == Homebrew::DEFAULT_PREFIX }
-    end
-  else
-    raise ArgumentError, "Invalid preset `pour_bottle?` condition" if only_if.present?
-  end
-
-  @pour_bottle_check.instance_eval(&block)
-end
-
-
- -
-

- - .racksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all racks currently installed.

- - -
-
-
- - -
- - - - -
-
-
-
-2135
-2136
-2137
-2138
-2139
-2140
-2141
-2142
-2143
-
-
# File 'formula.rb', line 2135
-
-def self.racks
-  Formula.cache[:racks] ||= if HOMEBREW_CELLAR.directory?
-    HOMEBREW_CELLAR.subdirs.reject do |rack|
-      rack.symlink? || rack.basename.to_s.start_with?(".") || rack.subdirs.empty?
-    end
-  else
-    []
-  end
-end
-
-
- -
-

- - .resource(name, klass = Resource, &block) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Additional downloads can be defined as resources and accessed in the -install method. Resources can also be defined inside a stable or -head block. This mechanism replaces ad-hoc "subformula" classes.

- -

Example

- -
resource "additional_files" do
-  url "https://example.com/additional-stuff.tar.gz"
-  sha256 "c6bc3f48ce8e797854c4b865f6a8ff969867bbcaebd648ae6fd825683e59fef2"
-end
-
- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - klass - - - (T.class_of(Resource)) - - - (defaults to: Resource) - - -
  • - -
  • - - block - - - (T.proc.bind(Resource).void, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-3705
-3706
-3707
-3708
-3709
-
-
# File 'formula.rb', line 3705
-
-def resource(name, klass = Resource, &block)
-  specs.each do |spec|
-    spec.resource(name, klass, &block) unless spec.resource_defined?(name)
-  end
-end
-
-
- -
-

- - .service?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks whether a service specification is defined or not.

- -

It returns true when a service block is present in the Formula -and false otherwise.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-3451
-3452
-3453
-
-
# File 'formula.rb', line 3451
-
-def service?
-  @service_block.present?
-end
-
-
- -
-

- - .skip_clean(*paths) ⇒ Object - - - - - -

-
-

Skip cleaning paths in a formula.

- -

Sometimes the formula cleaner breaks things.

- -

Examples

- -

Preserve cleaned paths with:

- -
skip_clean "bin/foo", "lib/bar"
-
- -

Keep .la files with:

- -
skip_clean :la
-
- - -
-
-
- - -
- - - - -
-
-
-
-3936
-3937
-3938
-3939
-3940
-
-
# File 'formula.rb', line 3936
-
-def skip_clean(*paths)
-  paths.flatten!
-  # Specifying :all is deprecated and will become an error
-  skip_clean_paths.merge(paths)
-end
-
-
- -
-

- - .spec_symsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-3498
-3499
-3500
-
-
# File 'formula.rb', line 3498
-
-def spec_syms
-  [:stable, :head].freeze
-end
-
-
- -
-

- - .specsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A list of the stable and head SoftwareSpecs.

- - -
-
-
- - -
- - - - -
-
-
-
-3503
-3504
-3505
-3506
-3507
-
-
# File 'formula.rb', line 3503
-
-def specs
-  spec_syms.map do |sym|
-    send(sym)
-  end.freeze
-end
-
-
- -
-

- - .tap_aliasesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all tap aliases

- - -
-
-
- - -
- - - - -
-
-
-
-2177
-2178
-2179
-
-
# File 'formula.rb', line 2177
-
-def self.tap_aliases
-  @tap_aliases ||= Tap.reject(&:core_tap?).flat_map(&:aliases).sort
-end
-
-
- -
-

- - .tap_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all tap Formula files

- - -
-
-
- - -
- - - - -
-
-
-
-2102
-2103
-2104
-
-
# File 'formula.rb', line 2102
-
-def self.tap_files
-  @tap_files ||= Tap.reject(&:core_tap?).flat_map(&:formula_files)
-end
-
-
- -
-

- - .tap_namesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

an array of all tap Formula names

- - -
-
-
- - -
- - - - -
-
-
-
-2097
-2098
-2099
-
-
# File 'formula.rb', line 2097
-
-def self.tap_names
-  @tap_names ||= Tap.reject(&:core_tap?).flat_map(&:formula_names).sort
-end
-
-
- -
-

- - .test(&block) ⇒ Boolean - - - - - -

-
-

A test is required for new formulae and makes us happy.

- -

The block will create, run in and delete a temporary directory.

- -

We want tests that don't require any user input -and test the basic functionality of the application. -For example, foo build-foo input.foo is a good test -and foo --version or foo --help are bad tests. -However, a bad test is better than no test at all.

- -

Examples

- -
(testpath/"test.file").write <<~EOS
-  writing some test file, if you need to
-EOS
-assert_equal "OK", shell_output("test_command test.file").strip
-
- -

Need complete control over stdin, stdout?

- -
require "open3"
-Open3.popen3("#{bin}/example", "argument") do |stdin, stdout, _|
-  stdin.write("some text")
-  stdin.close
-  assert_equal "result", stdout.read
-end
-
- -

The test will fail if it returns false, or if an exception is raised. -Failed assertions and failed system commands will raise exceptions.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-4063
-4064
-4065
-
-
# File 'formula.rb', line 4063
-
-def test(&block)
-  define_method(:test, &block)
-end
-
-
- -
-

- - .uses_from_macos(dep, bounds = {}) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Indicates use of dependencies provided by macOS. -On macOS this is a no-op (as we use the provided system libraries) unless -:since specifies a minimum macOS version. -On Linux this will act as depends_on.

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-3798
-3799
-3800
-
-
# File 'formula.rb', line 3798
-
-def uses_from_macos(dep, bounds = {})
-  specs.each { |spec| spec.uses_from_macos(dep, bounds) }
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #active_log_prefixString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The prefix, if any, to use in filenames for logging current activity.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1176
-1177
-1178
-1179
-1180
-1181
-1182
-
-
# File 'formula.rb', line 1176
-
-def active_log_prefix
-  if active_log_type
-    "#{active_log_type}."
-  else
-    ""
-  end
-end
-
-
- -
-

- - #add_global_deps_to_spec(spec) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-
-
# File 'extend/os/linux/formula.rb', line 30
-
-def add_global_deps_to_spec(spec)
-  return unless DevelopmentTools.needs_build_formulae?
-
-  @global_deps ||= begin
-    dependency_collector = spec.dependency_collector
-    related_formula_names = Set.new([
-      name,
-      *aliases,
-      *versioned_formulae_names,
-    ])
-    [
-      dependency_collector.gcc_dep_if_needed(related_formula_names),
-      dependency_collector.glibc_dep_if_needed(related_formula_names),
-    ].compact.freeze
-  end
-  @global_deps.each { |dep| spec.dependency_collector.add(dep) }
-end
-
-
- -
-

- - #alias_changed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Has the alias used to install the formula changed, or are different -formulae already installed with this alias?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1700
-1701
-1702
-
-
# File 'formula.rb', line 1700
-
-def alias_changed?
-  installed_alias_target_changed? || supersedes_an_installed_formula?
-end
-
-
- -
-

- - #aliasesArray<String> - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

All aliases for the formula.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-584
-585
-586
-
-
# File 'formula.rb', line 584
-
-def aliases
-  @aliases ||= tap&.alias_reverse_table&.dig(full_name)&.map { _1.split("/").last } || []
-end
-
-
- -
-

- - #allow_network_access!(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-
-
# File 'sorbet/rbi/parlour.rbi', line 72
-
-def allow_network_access!(*args, **options, &block); end
-
-
- -
-

- - #any_installed_kegKeg? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a Keg for the opt_prefix or installed_prefix if they exist. -If not, return nil.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Keg, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-2260
-2261
-2262
-2263
-2264
-2265
-
-
# File 'formula.rb', line 2260
-
-def any_installed_keg
-  Formula.cache[:any_installed_keg] ||= {}
-  Formula.cache[:any_installed_keg][full_name] ||= if (installed_prefix = any_installed_prefix)
-    Keg.new(installed_prefix)
-  end
-end
-
-
- -
-

- - #any_installed_prefixPathname? - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get the path of any installed prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-2271
-2272
-2273
-2274
-2275
-2276
-2277
-
-
# File 'formula.rb', line 2271
-
-def any_installed_prefix
-  if optlinked? && opt_prefix.exist?
-    opt_prefix
-  elsif (latest_installed_prefix = installed_prefixes.last)
-    latest_installed_prefix
-  end
-end
-
-
- -
-

- - #any_installed_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the PkgVersion for this formula if it is installed. -If not, return nil.

- - -
-
-
- - -
- - - - -
-
-
-
-2281
-2282
-2283
-
-
# File 'formula.rb', line 2281
-
-def any_installed_version
-  any_installed_keg&.version
-end
-
-
- -
-

- - #any_version_installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If at least one version of Formula is installed.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-638
-639
-640
-
-
# File 'formula.rb', line 638
-
-def any_version_installed?
-  installed_prefixes.any? { |keg| (keg/Tab::FILENAME).file? }
-end
-
-
- -
-

- - #bash_completionPathname - - - - - -

-
-

The directory where the formula's Bash completion files should be -installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1134
-1135
-1136
-
-
# File 'formula.rb', line 1134
-
-def bash_completion
-  prefix/"etc/bash_completion.d"
-end
-
-
- -
-

- - #binPathname - - - - - -

-
-

The directory where the formula's binaries should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- -

Examples

- -

Need to install into the #bin but the makefile doesn't mkdir -p prefix/bin?

- -
bin.mkpath
-
- -

No make install available?

- -
bin.install "binary1"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-780
-781
-782
-
-
# File 'formula.rb', line 780
-
-def bin
-  prefix/"bin"
-end
-
-
- -
-

- - #bottleBottle? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The Bottle object for the currently active SoftwareSpec.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Bottle, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-419
-420
-421
-
-
# File 'formula.rb', line 419
-
-def bottle
-  @bottle ||= Bottle.new(self, bottle_specification) if bottled?
-end
-
-
- -
-

- - #bottle_defined?(*args, **options, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/parlour.rbi', line 36
-
-def bottle_defined?(*args, **options, &block); end
-
-
- -
-

- - #bottle_for_tag(tag = nil) ⇒ Bottle? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The Bottle object for given tag.

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Bottle, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-425
-426
-427
-
-
# File 'formula.rb', line 425
-
-def bottle_for_tag(tag = nil)
-  Bottle.new(self, bottle_specification, tag) if bottled?(tag)
-end
-
-
- -
-

- - #bottle_hash(compact_for_api: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the bottle information for a formula.

- - -
-
-
- - -
- - - - -
-
-
-
-2578
-2579
-2580
-2581
-2582
-2583
-2584
-2585
-2586
-2587
-2588
-2589
-2590
-2591
-2592
-2593
-2594
-2595
-2596
-2597
-2598
-2599
-2600
-2601
-2602
-2603
-2604
-2605
-2606
-2607
-2608
-
-
# File 'formula.rb', line 2578
-
-def bottle_hash(compact_for_api: false)
-  hash = {}
-  stable_spec = stable
-  return hash unless stable_spec
-  return hash unless bottle_defined?
-
-  bottle_spec = stable_spec.bottle_specification
-
-  hash["rebuild"] = bottle_spec.rebuild if !compact_for_api || !bottle_spec.rebuild.zero?
-  hash["root_url"] = bottle_spec.root_url unless compact_for_api
-  hash["files"] = {}
-
-  bottle_spec.collector.each_tag do |tag|
-    tag_spec = bottle_spec.collector.specification_for(tag, no_older_versions: true)
-    os_cellar = tag_spec.cellar
-    os_cellar = os_cellar.inspect if os_cellar.is_a?(Symbol)
-    checksum = tag_spec.checksum.hexdigest
-
-    file_hash = {}
-    file_hash["cellar"] = os_cellar
-    unless compact_for_api
-      filename = Bottle::Filename.create(self, tag, bottle_spec.rebuild)
-      path, = Utils::Bottles.path_resolved_basename(bottle_spec.root_url, name, checksum, filename)
-      file_hash["url"] = "#{bottle_spec.root_url}/#{path}"
-    end
-    file_hash["sha256"] = checksum
-
-    hash["files"][tag.to_sym] = file_hash
-  end
-  hash
-end
-
-
- -
-

- - #bottle_prefixPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The directory used for as the prefix for #etc and #var files on -installation so, despite not being in HOMEBREW_CELLAR, they are installed -there after pouring a bottle.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1164
-1165
-1166
-
-
# File 'formula.rb', line 1164
-
-def bottle_prefix
-  prefix/".bottle"
-end
-
-
- -
-

- - #bottle_specification(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/parlour.rbi', line 45
-
-def bottle_specification(*args, **options, &block); end
-
-
- -
-

- - #bottle_tab_attributesHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-3128
-3129
-3130
-3131
-3132
-
-
# File 'formula.rb', line 3128
-
-def bottle_tab_attributes
-  return {} unless bottled?
-
-  T.must(bottle).tab_attributes
-end
-
-
- -
-

- - #bottle_tag?(*args, **options, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/parlour.rbi', line 39
-
-def bottle_tag?(*args, **options, &block); end
-
-
- -
-

- - #bottled?(*args, **options, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/parlour.rbi', line 42
-
-def bottled?(*args, **options, &block); end
-
-
- -
-

- - #brew(fetch: true, keep_tmp: false, debug_symbols: false, interactive: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Yields |self,staging| with current working directory set to the uncompressed tarball -where staging is a Mktemp staging context.

- - -
-
-
- - -
- - - - -
-
-
-
-1568
-1569
-1570
-1571
-1572
-1573
-1574
-1575
-1576
-1577
-1578
-1579
-1580
-1581
-1582
-1583
-1584
-1585
-1586
-1587
-1588
-1589
-1590
-1591
-1592
-1593
-1594
-1595
-1596
-1597
-1598
-1599
-1600
-
-
# File 'formula.rb', line 1568
-
-def brew(fetch: true, keep_tmp: false, debug_symbols: false, interactive: false)
-  @prefix_returns_versioned_prefix = true
-  active_spec.fetch if fetch
-  stage(interactive:, debug_symbols:) do |staging|
-    staging.retain! if keep_tmp || debug_symbols
-
-    prepare_patches
-    fetch_patches if fetch
-
-    begin
-      yield self, staging
-    rescue
-      staging.retain! if interactive || debug?
-      raise
-    ensure
-      %w[
-        config.log
-        CMakeCache.txt
-        CMakeOutput.log
-        CMakeError.log
-        meson-log.txt
-      ].each do |logfile|
-        Dir["**/#{logfile}"].each do |logpath|
-          destdir = logs/File.dirname(logpath)
-          mkdir_p destdir
-          cp logpath, destdir
-        end
-      end
-    end
-  end
-ensure
-  @prefix_returns_versioned_prefix = false
-end
-
-
- -
-

- - #cached_download(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-93
-
-
# File 'sorbet/rbi/parlour.rbi', line 93
-
-def cached_download(*args, **options, &block); end
-
-
- -
-

- - #caveatsString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Warn the user about any Homebrew-specific issues or quirks for this package. -These should not contain setup instructions that would apply to installation -through a different package manager on a different OS.

- -

Example

- -
def caveats
-  <<~EOS
-    Are optional. Something the user must be warned about?
-  EOS
-end
-
- -
def caveats
-  s = <<~EOS
-    Print some important notice to the user when `brew info [formula]` is
-    called or when brewing a formula.
-    This is optional. You can use all the vars like #{version} here.
-  EOS
-  s += "Some issue only on older systems" if MacOS.version < :el_capitan
-  s
-end
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-1445
-1446
-1447
-
-
# File 'formula.rb', line 1445
-
-def caveats
-  nil
-end
-
-
- -
-

- - #caveats_with_placeholdersObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2660
-2661
-2662
-2663
-
-
# File 'formula.rb', line 2660
-
-def caveats_with_placeholders
-  caveats&.gsub(HOMEBREW_PREFIX, HOMEBREW_PREFIX_PLACEHOLDER)
-         &.gsub(HOMEBREW_CELLAR, HOMEBREW_CELLAR_PLACEHOLDER)
-end
-
-
- -
-

- - #clear_cache(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-
-
# File 'sorbet/rbi/parlour.rbi', line 96
-
-def clear_cache(*args, **options, &block); end
-
-
- -
-

- - #compiler_failures(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-111
-
-
# File 'sorbet/rbi/parlour.rbi', line 111
-
-def compiler_failures(*args, **options, &block); end
-
-
- -
-

- - #conflictsArray<FormulaConflict> - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

!attr[r] conflicts

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-2238
-
-
# File 'formula.rb', line 2238
-
-def conflicts = self.class.conflicts
-
-
- -
-

- - #core_formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if this formula is provided by Homebrew itself

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-2203
-2204
-2205
-
-
# File 'formula.rb', line 2203
-
-def core_formula?
-  !!tap&.core_tap?
-end
-
-
- -
-

- - #current_installed_alias_targetObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1677
-1678
-1679
-
-
# File 'formula.rb', line 1677
-
-def current_installed_alias_target
-  Formulary.factory(T.must(installed_alias_name)) if installed_alias_path
-end
-
-
- -
-

- - #declared_deps(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-87
-
-
# File 'sorbet/rbi/parlour.rbi', line 87
-
-def declared_deps(*args, **options, &block); end
-
-
- -
-

- - #deny_network_access!(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-
-
# File 'sorbet/rbi/parlour.rbi', line 75
-
-def deny_network_access!(*args, **options, &block); end
-
-
- -
-

- - #dependencies_hashObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2665
-2666
-2667
-2668
-2669
-2670
-2671
-2672
-2673
-2674
-2675
-2676
-2677
-2678
-2679
-2680
-2681
-2682
-2683
-2684
-2685
-2686
-2687
-2688
-2689
-2690
-2691
-2692
-2693
-2694
-2695
-2696
-2697
-2698
-2699
-2700
-2701
-2702
-2703
-2704
-2705
-2706
-2707
-2708
-2709
-2710
-2711
-2712
-2713
-2714
-2715
-2716
-2717
-2718
-2719
-2720
-2721
-2722
-2723
-2724
-2725
-2726
-2727
-
-
# File 'formula.rb', line 2665
-
-def dependencies_hash
-  # Create a hash of spec names (stable/head) to the list of dependencies under each
-  dependencies = self.class.spec_syms.to_h do |sym|
-    [sym, send(sym)&.declared_deps]
-  end
-
-  # Implicit dependencies are only needed when installing from source
-  # since they are only used to download and unpack source files.
-  # @see DependencyCollector
-  dependencies.transform_values! { |deps| deps&.reject(&:implicit?) }
-
-  hash = {}
-
-  dependencies.each do |spec_sym, spec_deps|
-    next if spec_deps.nil?
-
-    dep_hash = if spec_sym == :stable
-      hash
-    else
-      next if spec_deps == dependencies[:stable]
-
-      hash["#{spec_sym}_dependencies"] ||= {}
-    end
-
-    dep_hash["build_dependencies"] = spec_deps.select(&:build?)
-                                              .reject(&:uses_from_macos?)
-                                              .map(&:name)
-                                              .uniq
-    dep_hash["dependencies"] = spec_deps.reject(&:optional?)
-                                        .reject(&:recommended?)
-                                        .reject(&:build?)
-                                        .reject(&:test?)
-                                        .reject(&:uses_from_macos?)
-                                        .map(&:name)
-                                        .uniq
-    dep_hash["test_dependencies"] = spec_deps.select(&:test?)
-                                             .reject(&:uses_from_macos?)
-                                             .map(&:name)
-                                             .uniq
-    dep_hash["recommended_dependencies"] = spec_deps.select(&:recommended?)
-                                                    .reject(&:uses_from_macos?)
-                                                    .map(&:name)
-                                                    .uniq
-    dep_hash["optional_dependencies"] = spec_deps.select(&:optional?)
-                                                 .reject(&:uses_from_macos?)
-                                                 .map(&:name)
-                                                 .uniq
-
-    uses_from_macos_deps = spec_deps.select(&:uses_from_macos?).uniq
-    dep_hash["uses_from_macos"] = uses_from_macos_deps.map do |dep|
-      if dep.tags.length >= 2
-        { dep.name => dep.tags }
-      elsif dep.tags.present?
-        { dep.name => dep.tags.first }
-      else
-        dep.name
-      end
-    end
-    dep_hash["uses_from_macos_bounds"] = uses_from_macos_deps.map(&:bounds)
-  end
-
-  hash
-end
-
-
- -
-

- - #deprecated?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether this Formula is deprecated (i.e. warns on installation). -Defaults to false.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1512
-
-
# File 'formula.rb', line 1512
-
-delegate deprecated?: :"self.class"
-
-
- -
-

- - #deprecated_flags(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-
-
# File 'sorbet/rbi/parlour.rbi', line 105
-
-def deprecated_flags(*args, **options, &block); end
-
-
- -
-

- - #deprecated_options(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-102
-
-
# File 'sorbet/rbi/parlour.rbi', line 102
-
-def deprecated_options(*args, **options, &block); end
-
-
- -
-

- - #deprecation_dateT.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The date that this Formula was or becomes deprecated. -Returns nil if no date is specified.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - - — -

    Date

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1519
-
-
# File 'formula.rb', line 1519
-
-delegate deprecation_date: :"self.class"
-
-
- -
-

- - #deprecation_reasonT.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The reason this Formula is deprecated. -Returns nil if no reason is specified or the formula is not deprecated.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1526
-
-
# File 'formula.rb', line 1526
-
-delegate deprecation_reason: :"self.class"
-
-
- -
-

- - #deps(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-
-
# File 'sorbet/rbi/parlour.rbi', line 84
-
-def deps(*args, **options, &block); end
-
-
- -
-

- - #descT.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The description of the software.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-432
-
-
# File 'formula.rb', line 432
-
-delegate desc: :"self.class"
-
-
- -
-

- - #deuniversalize_machos(*targets) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Replaces a universal binary with its native slice.

- -

If called with no parameters, does this with all compatible -universal binaries in a Formula's Keg.

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-27
-
-
# File 'extend/os/linux/formula.rb', line 27
-
-def deuniversalize_machos(*targets); end
-
-
- -
-

- - #disable_dateT.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The date that this Formula was or becomes disabled. -Returns nil if no date is specified.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - - — -

    Date

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1540
-
-
# File 'formula.rb', line 1540
-
-delegate disable_date: :"self.class"
-
-
- -
-

- - #disable_reasonT.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The reason this Formula is disabled. -Returns nil if no reason is specified or the formula is not disabled.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1547
-
-
# File 'formula.rb', line 1547
-
-delegate disable_reason: :"self.class"
-
-
- -
-

- - #disabled?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether this Formula is disabled (i.e. cannot be installed). -Defaults to false.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1533
-
-
# File 'formula.rb', line 1533
-
-delegate disabled?: :"self.class"
-
-
- -
-

- - #docPathname - - - - - -

-
-

The directory where the formula's documentation should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-790
-791
-792
-
-
# File 'formula.rb', line 790
-
-def doc
-  share/"doc"/name
-end
-
-
- -
-

- - #downloader(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/parlour.rbi', line 48
-
-def downloader(*args, **options, &block); end
-
-
- -
-

- - #eligible_kegs_for_cleanup(quiet: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-3046
-3047
-3048
-3049
-3050
-3051
-3052
-3053
-3054
-3055
-3056
-3057
-3058
-3059
-3060
-3061
-3062
-3063
-3064
-3065
-3066
-3067
-3068
-3069
-3070
-3071
-3072
-3073
-3074
-3075
-3076
-3077
-3078
-3079
-3080
-3081
-3082
-3083
-3084
-3085
-
-
# File 'formula.rb', line 3046
-
-def eligible_kegs_for_cleanup(quiet: false)
-  eligible_for_cleanup = []
-  if latest_version_installed?
-    eligible_kegs = if head? && (head_prefix = latest_head_prefix)
-      head, stable = installed_kegs.partition { |keg| keg.version.head? }
-
-      # Remove newest head and stable kegs.
-      head - [Keg.new(head_prefix)] + T.must(stable.sort_by(&:scheme_and_version).slice(0...-1))
-    else
-      installed_kegs.select do |keg|
-        tab = keg.tab
-        if version_scheme > tab.version_scheme
-          true
-        elsif version_scheme == tab.version_scheme
-          pkg_version > keg.version
-        else
-          false
-        end
-      end
-    end
-
-    unless eligible_kegs.empty?
-      eligible_kegs.each do |keg|
-        if keg.linked?
-          opoo "Skipping (old) #{keg} due to it being linked" unless quiet
-        elsif pinned? && keg == Keg.new(@pin.path.resolved_path)
-          opoo "Skipping (old) #{keg} due to it being pinned" unless quiet
-        else
-          eligible_for_cleanup << keg
-        end
-      end
-    end
-  elsif !installed_prefixes.empty? && !pinned?
-    # If the cellar only has one version installed, don't complain
-    # that we can't tell which one to keep. Don't complain at all if the
-    # only installed version is a pinned formula.
-    opoo "Skipping #{full_name}: most recent version #{pkg_version} not installed" unless quiet
-  end
-  eligible_for_cleanup
-end
-
-
- -
-

- - #elispPathname - - - - - -

-
-

The directory where Emacs Lisp files should be installed, with the -formula name appended to avoid linking conflicts.

- -

Example

- -

To install an Emacs mode included with a software package:

- -
elisp.install "contrib/emacs/example-mode.el"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1046
-1047
-1048
-
-
# File 'formula.rb', line 1046
-
-def elisp
-  prefix/"share/emacs/site-lisp"/name
-end
-
-
- -
-

- - #env(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-153
-
-
# File 'sorbet/rbi/parlour.rbi', line 153
-
-def env(*args, **options, &block); end
-
-
- -
-

- - #etcPathname - - - - - -

-
-

The directory where the formula's configuration files should be installed. -Anything using etc.install will not overwrite other files on e.g. upgrades -but will write a new file named *.default. -This directory is not inside the HOMEBREW_CELLAR so it persists -across upgrades.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1080
-1081
-1082
-
-
# File 'formula.rb', line 1080
-
-def etc
-  (HOMEBREW_PREFIX/"etc").extend(InstallRenamed)
-end
-
-
- -
-

- - #fetch(verify_download_integrity: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2751
-2752
-2753
-
-
# File 'formula.rb', line 2751
-
-def fetch(verify_download_integrity: true)
-  active_spec.fetch(verify_download_integrity:)
-end
-
-
- -
-

- - #fetch_bottle_tabvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-3121
-3122
-3123
-3124
-3125
-
-
# File 'formula.rb', line 3121
-
-def fetch_bottle_tab
-  return unless bottled?
-
-  T.must(bottle).fetch_tab
-end
-
-
- -
-

- - #fetch_patchesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-3116
-3117
-3118
-
-
# File 'formula.rb', line 3116
-
-def fetch_patches
-  patchlist.select(&:external?).each(&:fetch)
-end
-
-
- -
-

- - #fish_completionPathname - - - - - -

-
-

The directory where the formula's fish completion files should be -installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1156
-1157
-1158
-
-
# File 'formula.rb', line 1156
-
-def fish_completion
-  share/"fish/vendor_completions.d"
-end
-
-
- -
-

- - #fish_functionPathname - - - - - -

-
-

The directory where the formula's fish function files should be -installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1123
-1124
-1125
-
-
# File 'formula.rb', line 1123
-
-def fish_function
-  share/"fish/vendor_functions.d"
-end
-
-
- -
-

- - #frameworksPathname - - - - - -

-
-

The directory where the formula's Frameworks should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only. -This is not symlinked into HOMEBREW_PREFIX.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1057
-1058
-1059
-
-
# File 'formula.rb', line 1057
-
-def frameworks
-  prefix/"Frameworks"
-end
-
-
- -
-

- - #full_installed_alias_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-355
-356
-357
-
-
# File 'formula.rb', line 355
-
-def full_installed_alias_name
-  full_name_with_optional_tap(installed_alias_name)
-end
-
-
- -
-

- - #full_installed_specified_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The name (including tap) specified to install this formula.

- - -
-
-
- - -
- - - - -
-
-
-
-386
-387
-388
-
-
# File 'formula.rb', line 386
-
-def full_installed_specified_name
-  full_installed_alias_name || full_name
-end
-
-
- -
-

- - #full_specified_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The name (including tap) specified to find this formula.

- - -
-
-
- - -
- - - - -
-
-
-
-376
-377
-378
-
-
# File 'formula.rb', line 376
-
-def full_specified_name
-  full_alias_name || full_name
-end
-
-
- -
-

- - #generate_completions_from_executable(*commands, base_name: name, shells: [:bash, :zsh, :fish], shell_parameter_format: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Generate shell completions for a formula for bash, zsh and fish, using the formula's executable.

- -

Examples

- -

Using default values for optional arguments.

- -
generate_completions_from_executable(bin/"foo", "completions")
-
-# translates to
-(bash_completion/"foo").write Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"foo", "completions", "bash")
-(zsh_completion/"_foo").write Utils.safe_popen_read({ "SHELL" => "zsh" }, bin/"foo", "completions", "zsh")
-(fish_completion/"foo.fish").write Utils.safe_popen_read({ "SHELL" => "fish" }, bin/"foo",
-                                                         "completions", "fish")
-
- -

Selecting shells and using a different base_name.

- -
generate_completions_from_executable(bin/"foo", "completions", shells: [:bash, :zsh], base_name: "bar")
-
-# translates to
-(bash_completion/"bar").write Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"foo", "completions", "bash")
-(zsh_completion/"_bar").write Utils.safe_popen_read({ "SHELL" => "zsh" }, bin/"foo", "completions", "zsh")
-
- -

Using predefined shell_parameter_format :flag.

- -
generate_completions_from_executable(bin/"foo", "completions", shell_parameter_format: :flag, shells: [:bash])
-
-# translates to
-(bash_completion/"foo").write Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"foo", "completions", "--bash")
-
- -

Using predefined shell_parameter_format :arg.

- -
generate_completions_from_executable(bin/"foo", "completions", shell_parameter_format: :arg, shells: [:bash])
-
-# translates to
-(bash_completion/"foo").write Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"foo",
-                                                    "completions", "--shell=bash")
-
- -

Using predefined shell_parameter_format :none.

- -
generate_completions_from_executable(bin/"foo", "completions", shell_parameter_format: :none, shells: [:bash])
-
-# translates to
-(bash_completion/"foo").write Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"foo", "completions")
-
- -

Using predefined shell_parameter_format :click.

- -
generate_completions_from_executable(bin/"foo", shell_parameter_format: :click, shells: [:zsh])
-
-# translates to
-(zsh_completion/"_foo").write Utils.safe_popen_read({ "SHELL" => "zsh", "_FOO_COMPLETE" => "zsh_source" },
-                                                    bin/"foo")
-
- -

Using custom shell_parameter_format.

- -
generate_completions_from_executable(bin/"foo", "completions", shell_parameter_format: "--selected-shell=",
-                                     shells: [:bash])
-
-# translates to
-(bash_completion/"foo").write Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"foo",
-                                                    "completions", "--selected-shell=bash")
-
- - -
-
-
-

Parameters:

-
    - -
  • - - commands - - - (Pathname, String) - - - - — -

    the path to the executable and any passed subcommand(s) to use for generating the completion scripts.

    -
    - -
  • - -
  • - - base_name - - - (String) - - - (defaults to: name) - - - — -

    the base name of the generated completion script. Defaults to the formula name.

    -
    - -
  • - -
  • - - shells - - - (Array<Symbol>) - - - (defaults to: [:bash, :zsh, :fish]) - - - — -

    the shells to generate completion scripts for. Defaults to [:bash, :zsh, :fish].

    -
    - -
  • - -
  • - - shell_parameter_format - - - (Symbol, String, nil) - - - (defaults to: nil) - - - — -

    specify how shells should each be passed to the executable. Takes either a String representing a -prefix, or one of [:flag, :arg, :none, :click]. Defaults to plainly passing the shell.

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-2049
-2050
-2051
-2052
-2053
-2054
-2055
-2056
-2057
-2058
-2059
-2060
-2061
-2062
-2063
-2064
-2065
-2066
-2067
-2068
-2069
-2070
-2071
-2072
-2073
-2074
-2075
-2076
-2077
-2078
-2079
-2080
-2081
-2082
-2083
-2084
-2085
-2086
-2087
-2088
-2089
-
-
# File 'formula.rb', line 2049
-
-def generate_completions_from_executable(*commands,
-                                         base_name: name,
-                                         shells: [:bash, :zsh, :fish],
-                                         shell_parameter_format: nil)
-  completion_script_path_map = {
-    bash: bash_completion/base_name,
-    zsh:  zsh_completion/"_#{base_name}",
-    fish: fish_completion/"#{base_name}.fish",
-  }
-
-  shells.each do |shell|
-    popen_read_env = { "SHELL" => shell.to_s }
-    script_path = completion_script_path_map[shell]
-    shell_parameter = if shell_parameter_format.nil?
-      shell.to_s
-    elsif shell_parameter_format == :flag
-      "--#{shell}"
-    elsif shell_parameter_format == :arg
-      "--shell=#{shell}"
-    elsif shell_parameter_format == :none
-      nil
-    elsif shell_parameter_format == :click
-      prog_name = File.basename(commands.first.to_s).upcase.tr("-", "_")
-      popen_read_env["_#{prog_name}_COMPLETE"] = "#{shell}_source"
-      nil
-    else
-      "#{shell_parameter_format}#{shell}"
-    end
-
-    popen_read_args = %w[]
-    popen_read_args << commands
-    popen_read_args << shell_parameter if shell_parameter.present?
-    popen_read_args.flatten!
-
-    popen_read_options = {}
-    popen_read_options[:err] = :err unless ENV["HOMEBREW_STDERR"]
-
-    script_path.dirname.mkpath
-    script_path.write Utils.safe_popen_read(popen_read_env, *popen_read_args, **popen_read_options)
-  end
-end
-
-
- -
-

- - #head?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Is the currently active SoftwareSpec a #head build?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-398
-399
-400
-
-
# File 'formula.rb', line 398
-
-def head?
-  active_spec == head
-end
-
-
- -
-

- - #head_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Is this formula HEAD-only?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-404
-405
-406
-
-
# File 'formula.rb', line 404
-
-def head_only?
-  !!head && !stable
-end
-
-
- -
-

- - #head_version_outdated?(version, fetch_head: false) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-670
-671
-672
-673
-674
-675
-676
-677
-678
-679
-680
-681
-682
-683
-
-
# File 'formula.rb', line 670
-
-def head_version_outdated?(version, fetch_head: false)
-  tab = Tab.for_keg(prefix(version))
-
-  return true if tab.version_scheme < version_scheme
-  return true if stable && tab.stable_version && tab.stable_version < T.must(stable).version
-  return false unless fetch_head
-  return false unless head&.downloader.is_a?(VCSDownloadStrategy)
-
-  downloader = T.must(head).downloader
-
-  with_context quiet: true do
-    downloader.commit_outdated?(version.version.commit)
-  end
-end
-
-
- -
-

- - #homepageT.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The homepage for the software.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-442
-
-
# File 'formula.rb', line 442
-
-delegate homepage: :"self.class"
-
-
- -
-

- - #includePathname - - - - - -

-
-

The directory where the formula's headers should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- -

Example

- -

No make install available?

- -
include.install "example.h"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-808
-809
-810
-
-
# File 'formula.rb', line 808
-
-def include
-  prefix/"include"
-end
-
-
- -
-

- - #infoPathname - - - - - -

-
-

The directory where the formula's info files should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-818
-819
-820
-
-
# File 'formula.rb', line 818
-
-def info
-  share/"info"
-end
-
-
- -
-

- - #inreplace(paths, before = nil, after = nil, audit_result = true, &block) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Sometimes we have to change a bit before we install. Mostly we -prefer a patch, but if you need the prefix of -this formula in the patch you have to resort to inreplace, -because in the patch you don't have access to any variables -defined by the formula, as only HOMEBREW_PREFIX is available -in the embedded patch.

- -

Examples

- -

inreplace supports regular expressions:

- -
inreplace "somefile.cfg", /look[for]what?/, "replace by #{bin}/tool"
-
- -

inreplace supports blocks:

- -
inreplace "Makefile" do |s|
-  s.gsub! "/usr/local", HOMEBREW_PREFIX.to_s
-end
-
- - -
-
-
-

Parameters:

- - - -

See Also:

- - -
- - - - -
-
-
-
-2856
-2857
-2858
-2859
-2860
-2861
-
-
# File 'formula.rb', line 2856
-
-def inreplace(paths, before = nil, after = nil, audit_result = true, &block) # rubocop:disable Style/OptionalBooleanParameter
-  Utils::Inreplace.inreplace(paths, before, after, audit_result:, &block)
-rescue Utils::Inreplace::Error => e
-  onoe e.to_s
-  raise BuildError.new(self, "inreplace", Array(paths), {})
-end
-
-
- -
-

- - #installObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method is overridden in Formula subclasses to provide the -installation instructions. The sources (from url) are downloaded, -hash-checked and then Homebrew changes into a temporary directory where the -archive is unpacked or repository cloned.

- -

Example

- -
def install
-  system "./configure", "--prefix=#{prefix}"
-  system "make", "install"
-end
-
- - -
-
-
- - -
- - - - -
-
-
-
-2820
-
-
# File 'formula.rb', line 2820
-
-def install; end
-
-
- -
-

- - #install_etc_varvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1379
-1380
-1381
-1382
-1383
-1384
-1385
-1386
-
-
# File 'formula.rb', line 1379
-
-def install_etc_var
-  etc_var_dirs = [bottle_prefix/"etc", bottle_prefix/"var"]
-  Find.find(*etc_var_dirs.select(&:directory?)) do |path|
-    path = Pathname.new(path)
-    path.extend(InstallRenamed)
-    path.cp_path_sub(bottle_prefix, HOMEBREW_PREFIX)
-  end
-end
-
-
- -
-

- - #installed_alias_nameString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-351
-352
-353
-
-
# File 'formula.rb', line 351
-
-def installed_alias_name
-  installed_alias_path&.basename&.to_s
-end
-
-
- -
-

- - #installed_alias_pathPathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The alias path that was used to install this formula, if it exists. -Can differ from #alias_path, which is the alias used to find the formula, -and is specified to this instance.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-
-
# File 'formula.rb', line 338
-
-def installed_alias_path
-  build_tab = build
-  path = build_tab.source["path"] if build_tab.is_a?(Tab)
-
-  return unless path&.match?(%r{#{HOMEBREW_TAP_DIR_REGEX}/Aliases}o)
-
-  path = Pathname(path)
-  return unless path.symlink?
-
-  path
-end
-
-
- -
-

- - #installed_alias_target_changed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Has the target of the alias used to install this formula changed? -Returns false if the formula wasn't installed with an alias.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1684
-1685
-1686
-1687
-1688
-1689
-
-
# File 'formula.rb', line 1684
-
-def installed_alias_target_changed?
-  target = current_installed_alias_target
-  return false unless target
-
-  target.name != name
-end
-
-
- -
-

- - #installed_kegsArray<Keg> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

All currently installed kegs.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-756
-757
-758
-
-
# File 'formula.rb', line 756
-
-def installed_kegs
-  installed_prefixes.map { |dir| Keg.new(dir) }
-end
-
-
- -
-

- - #installed_prefixesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

All currently installed prefix directories.

- - -
-
-
- - -
- - - - -
-
-
-
-747
-748
-749
-750
-751
-752
-
-
# File 'formula.rb', line 747
-
-def installed_prefixes
-  possible_names.map { |name| HOMEBREW_CELLAR/name }
-                .select(&:directory?)
-                .flat_map(&:subdirs)
-                .sort_by(&:basename)
-end
-
-
- -
-

- - #installed_specified_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The name specified to install this formula.

- - -
-
-
- - -
- - - - -
-
-
-
-381
-382
-383
-
-
# File 'formula.rb', line 381
-
-def installed_specified_name
-  installed_alias_name || name
-end
-
-
- -
-

- - #internal_dependencies_hash(spec_symbol) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-2729
-2730
-2731
-2732
-2733
-2734
-2735
-2736
-2737
-2738
-2739
-2740
-2741
-2742
-2743
-2744
-2745
-
-
# File 'formula.rb', line 2729
-
-def internal_dependencies_hash(spec_symbol)
-  raise ArgumentError, "Unsupported spec: #{spec_symbol}" unless [:stable, :head].include?(spec_symbol)
-  return unless (spec = public_send(spec_symbol))
-
-  spec.declared_deps.each_with_object({}) do |dep, dep_hash|
-    # Implicit dependencies are only needed when installing from source
-    # since they are only used to download and unpack source files.
-    # @see DependencyCollector
-    next if dep.implicit?
-
-     = {}
-    [:tags] = dep.tags if dep.tags.present?
-    [:uses_from_macos] = dep.bounds.presence if dep.uses_from_macos?
-
-    dep_hash[dep.name] = .presence
-  end
-end
-
-
- -
-

- - #keg_only?Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Rarely, you don't want your library symlinked into the main prefix. -See gettext.rb for an example.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1455
-1456
-1457
-1458
-1459
-
-
# File 'formula.rb', line 1455
-
-def keg_only?
-  return false unless keg_only_reason
-
-  keg_only_reason.applicable?
-end
-
-
- -
-

- - #keg_only_reason(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-117
-
-
# File 'sorbet/rbi/parlour.rbi', line 117
-
-def keg_only_reason(*args, **options, &block); end
-
-
- -
-

- - #kext_prefixPathname - - - - - -

-
-

The directory where the formula's kernel extensions should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only. -This is not symlinked into HOMEBREW_PREFIX.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1068
-1069
-1070
-
-
# File 'formula.rb', line 1068
-
-def kext_prefix
-  prefix/"Library/Extensions"
-end
-
-
- -
-

- - #latest_formulaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If the alias has changed value, return the new formula. -Otherwise, return self.

- - -
-
-
- - -
- - - - -
-
-
-
-1706
-1707
-1708
-
-
# File 'formula.rb', line 1706
-
-def latest_formula
-  installed_alias_target_changed? ? current_installed_alias_target : self
-end
-
-
- -
-

- - #latest_head_prefixObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-665
-666
-667
-668
-
-
# File 'formula.rb', line 665
-
-def latest_head_prefix
-  head_version = latest_head_version
-  prefix(head_version) if head_version
-end
-
-
- -
-

- - #latest_head_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-654
-655
-656
-657
-658
-659
-660
-661
-662
-663
-
-
# File 'formula.rb', line 654
-
-def latest_head_version
-  head_versions = installed_prefixes.filter_map do |pn|
-    pn_pkgversion = PkgVersion.parse(pn.basename.to_s)
-    pn_pkgversion if pn_pkgversion.head?
-  end
-
-  head_versions.max_by do |pn_pkgversion|
-    [Keg.new(prefix(pn_pkgversion)).tab.source_modified_time, pn_pkgversion.revision]
-  end
-end
-
-
- -
-

- - #latest_installed_prefixObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The latest prefix for this formula. Checks for #head and then #stable's #prefix

- - -
-
-
- - -
- - - - -
-
-
-
-686
-687
-688
-689
-690
-691
-692
-693
-694
-
-
# File 'formula.rb', line 686
-
-def latest_installed_prefix
-  if head && (head_version = latest_head_version) && !head_version_outdated?(head_version)
-    latest_head_prefix
-  elsif stable && (stable_prefix = prefix(PkgVersion.new(T.must(stable).version, revision))).directory?
-    stable_prefix
-  else
-    prefix
-  end
-end
-
-
- -
-

- - #latest_version_installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If this Formula is installed. -This is actually just a check for if the #latest_installed_prefix directory -exists and is not empty.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-632
-633
-634
-
-
# File 'formula.rb', line 632
-
-def latest_version_installed?
-  (dir = latest_installed_prefix).directory? && !dir.children.empty?
-end
-
-
- -
-

- - #launchd_service_pathPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The generated launchd service file path.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1244
-1245
-1246
-
-
# File 'formula.rb', line 1244
-
-def launchd_service_path
-  opt_prefix/"#{plist_name}.plist"
-end
-
-
- -
-

- - #libPathname - - - - - -

-
-

The directory where the formula's libraries should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- -

Example

- -

No make install available?

- -
lib.install "example.dylib"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-836
-837
-838
-
-
# File 'formula.rb', line 836
-
-def lib
-  prefix/"lib"
-end
-
-
- -
-

- - #libexecPathname - - - - - -

-
-

The directory where the formula's binaries should be installed. -This is not symlinked into HOMEBREW_PREFIX. -It is commonly used to install files that we do not wish to be -symlinked into HOMEBREW_PREFIX from one of the other directories and -instead manually create symlinks or wrapper scripts into e.g. #bin.

- -

Example

- -
libexec.install "foo.jar"
-bin.write_jar_script libexec/"foo.jar", "foo"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-855
-856
-857
-
-
# File 'formula.rb', line 855
-
-def libexec
-  prefix/"libexec"
-end
-
-
- -
-

- - #licenseT.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The SPDX ID of the software license.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-437
-
-
# File 'formula.rb', line 437
-
-delegate license: :"self.class"
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1473
-1474
-1475
-1476
-1477
-1478
-1479
-1480
-1481
-1482
-1483
-1484
-1485
-1486
-1487
-1488
-1489
-1490
-1491
-1492
-1493
-1494
-1495
-1496
-1497
-1498
-1499
-1500
-1501
-1502
-1503
-1504
-1505
-
-
# File 'formula.rb', line 1473
-
-def link_overwrite?(path)
-  # Don't overwrite files not created by Homebrew.
-  return false if path.stat.uid != HOMEBREW_BREW_FILE.stat.uid
-
-  # Don't overwrite files belong to other keg except when that
-  # keg's formula is deleted.
-  begin
-    keg = Keg.for(path)
-  rescue NotAKegError, Errno::ENOENT
-    # file doesn't belong to any keg.
-  else
-    tab_tap = keg.tab.tap
-    # this keg doesn't below to any core/tap formula, most likely coming from a DIY install.
-    return false if tab_tap.nil?
-
-    begin
-      f = Formulary.factory(keg.name)
-    rescue FormulaUnavailableError
-      # formula for this keg is deleted, so defer to allowlist
-    rescue TapFormulaAmbiguityError
-      return false # this keg belongs to another formula
-    else
-      # this keg belongs to another unrelated formula
-      return false unless f.possible_names.include?(keg.name)
-    end
-  end
-  to_check = path.relative_path_from(HOMEBREW_PREFIX).to_s
-  self.class.link_overwrite_paths.any? do |p|
-    p == to_check ||
-      to_check.start_with?("#{p.chomp("/")}/") ||
-      /^#{Regexp.escape(p).gsub('\*', ".*?")}$/.match?(to_check)
-  end
-end
-
-
- -
-

- - #linked?Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Is the formula linked?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-714
-715
-716
-
-
# File 'formula.rb', line 714
-
-def linked?
-  linked_keg.symlink?
-end
-
-
- -
-

- - #linked_kegObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The link status symlink directory for this Formula. -You probably want #opt_prefix instead.

- - -
-
-
- - -
- - - - -
-
-
-
-646
-647
-648
-649
-650
-651
-652
-
-
# File 'formula.rb', line 646
-
-def linked_keg
-  linked_keg = possible_names.map { |name| HOMEBREW_LINKED_KEGS/name }
-                             .find(&:directory?)
-  return linked_keg if linked_keg.present?
-
-  HOMEBREW_LINKED_KEGS/name
-end
-
-
- -
-

- - #linked_versionPkgVersion? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

PkgVersion of the linked keg for the formula.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-733
-734
-735
-736
-737
-
-
# File 'formula.rb', line 733
-
-def linked_version
-  return unless linked?
-
-  Keg.for(linked_keg).version
-end
-
-
- -
-

- - #livecheckT.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The livecheck specification for the software.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-447
-
-
# File 'formula.rb', line 447
-
-delegate livecheck: :"self.class"
-
-
- -
-

- - #livecheckable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Is a livecheck specification defined for the software?

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-452
-
-
# File 'formula.rb', line 452
-
-delegate livecheckable?: :"self.class"
-
-
- -
-

- - #loaded_from_api?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether this formula was loaded using the formulae.brew.sh API

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-476
-
-
# File 'formula.rb', line 476
-
-delegate loaded_from_api?: :"self.class"
-
-
- -
-

- - #loader_pathString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'extend/os/linux/formula.rb', line 22
-
-def loader_path
-  "$ORIGIN"
-end
-
-
- -
-

- - #lockObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1602
-1603
-1604
-1605
-1606
-1607
-1608
-1609
-1610
-1611
-1612
-1613
-1614
-
-
# File 'formula.rb', line 1602
-
-def lock
-  @lock = FormulaLock.new(name)
-  @lock.lock
-
-  oldnames.each do |oldname|
-    next unless (oldname_rack = HOMEBREW_CELLAR/oldname).exist?
-    next if oldname_rack.resolved_path != rack
-
-    oldname_lock = FormulaLock.new(oldname)
-    oldname_lock.lock
-    @oldname_locks << oldname_lock
-  end
-end
-
-
- -
-

- - #logsPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The directory where the formula's installation or test logs will be written.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1170
-1171
-1172
-
-
# File 'formula.rb', line 1170
-
-def logs
-  HOMEBREW_LOGS + name
-end
-
-
- -
-

- - #manPathname - - - - - -

-
-

The root directory where the formula's manual pages should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only. -Often one of the more specific man functions should be used instead, -e.g. #man1.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-867
-868
-869
-
-
# File 'formula.rb', line 867
-
-def man
-  share/"man"
-end
-
-
- -
-

- - #man1Pathname - - - - - -

-
-

The directory where the formula's man1 pages should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- -

Example

- -

No make install available?

- -
man1.install "example.1"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-885
-886
-887
-
-
# File 'formula.rb', line 885
-
-def man1
-  man/"man1"
-end
-
-
- -
-

- - #man2Pathname - - - - - -

-
-

The directory where the formula's man2 pages should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-895
-896
-897
-
-
# File 'formula.rb', line 895
-
-def man2
-  man/"man2"
-end
-
-
- -
-

- - #man3Pathname - - - - - -

-
-

The directory where the formula's man3 pages should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- -

Example

- -

No make install available?

- -
man3.install "man.3"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-913
-914
-915
-
-
# File 'formula.rb', line 913
-
-def man3
-  man/"man3"
-end
-
-
- -
-

- - #man4Pathname - - - - - -

-
-

The directory where the formula's man4 pages should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-923
-924
-925
-
-
# File 'formula.rb', line 923
-
-def man4
-  man/"man4"
-end
-
-
- -
-

- - #man5Pathname - - - - - -

-
-

The directory where the formula's man5 pages should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-933
-934
-935
-
-
# File 'formula.rb', line 933
-
-def man5
-  man/"man5"
-end
-
-
- -
-

- - #man6Pathname - - - - - -

-
-

The directory where the formula's man6 pages should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-943
-944
-945
-
-
# File 'formula.rb', line 943
-
-def man6
-  man/"man6"
-end
-
-
- -
-

- - #man7Pathname - - - - - -

-
-

The directory where the formula's man7 pages should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-953
-954
-955
-
-
# File 'formula.rb', line 953
-
-def man7
-  man/"man7"
-end
-
-
- -
-

- - #man8Pathname - - - - - -

-
-

The directory where the formula's man8 pages should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-963
-964
-965
-
-
# File 'formula.rb', line 963
-
-def man8
-  man/"man8"
-end
-
-
- -
-

- - #migration_needed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1633
-1634
-1635
-
-
# File 'formula.rb', line 1633
-
-def migration_needed?
-  !oldnames_to_migrate.empty? && !rack.exist?
-end
-
-
- -
-

- - #missing_dependencies(hide: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a list of formulae depended on by this formula that aren't -installed.

- - -
-
-
- - -
- - - - -
-
-
-
-2342
-2343
-2344
-2345
-2346
-2347
-2348
-2349
-2350
-2351
-
-
# File 'formula.rb', line 2342
-
-def missing_dependencies(hide: nil)
-  hide ||= []
-  runtime_formula_dependencies.select do |f|
-    hide.include?(f.name) || f.installed_prefixes.empty?
-  end
-# If we're still getting unavailable formulae at this stage the best we can
-# do is just return no results.
-rescue FormulaUnavailableError
-  []
-end
-
-
- -
-

- - #mkdir(name, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A version of FileUtils.mkdir that also changes to that folder in -a block.

- - -
-
-
- - -
- - - - -
-
-
-
-3097
-3098
-3099
-3100
-3101
-3102
-
-
# File 'formula.rb', line 3097
-
-def mkdir(name, &block)
-  result = FileUtils.mkdir_p(name)
-  return result unless block
-
-  FileUtils.chdir(name, &block)
-end
-
-
- -
-

- - #mktemp(prefix = name, opts = {}, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Create a temporary directory then yield. When the block returns, -recursively delete the temporary directory. Passing opts[:retain] -or calling do |staging| ... staging.retain! in the block will skip -the deletion and retain the temporary directory's contents.

- - -
-
-
- - -
- - - - -
-
-
-
-3091
-3092
-3093
-
-
# File 'formula.rb', line 3091
-
-def mktemp(prefix = name, opts = {}, &block)
-  Mktemp.new(prefix, opts).run(&block)
-end
-
-
- -
-

- - #network_access_allowed?(*args, **options, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-
-
# File 'sorbet/rbi/parlour.rbi', line 78
-
-def network_access_allowed?(*args, **options, &block); end
-
-
- -
-

- - #new_formula_available?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1673
-1674
-1675
-
-
# File 'formula.rb', line 1673
-
-def new_formula_available?
-  installed_alias_target_changed? && !latest_formula.latest_version_installed?
-end
-
-
- -
-

- - #old_installed_formulaeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1710
-1711
-1712
-1713
-1714
-1715
-1716
-1717
-
-
# File 'formula.rb', line 1710
-
-def old_installed_formulae
-  # If this formula isn't the current target of the alias,
-  # it doesn't make sense to say that other formulae are older versions of it
-  # because we don't know which came first.
-  return [] if alias_path.nil? || installed_alias_target_changed?
-
-  self.class.installed_with_alias_path(alias_path).reject { |f| f.name == name }
-end
-
-
- -
-

- - #oldnamesArray<String> - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Old names for the formula.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-571
-572
-573
-574
-575
-576
-577
-578
-
-
# File 'formula.rb', line 571
-
-def oldnames
-  @oldnames ||= if (tap = self.tap)
-    Tap.tap_migration_oldnames(tap, name) +
-      tap.formula_reverse_renames.fetch(name, [])
-  else
-    []
-  end
-end
-
-
- -
-

- - #oldnames_to_migrateArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1622
-1623
-1624
-1625
-1626
-1627
-1628
-1629
-1630
-
-
# File 'formula.rb', line 1622
-
-def oldnames_to_migrate
-  oldnames.select do |oldname|
-    old_rack = HOMEBREW_CELLAR/oldname
-    next false unless old_rack.directory?
-    next false if old_rack.subdirs.empty?
-
-    tap == Tab.for_keg(old_rack.subdirs.min).tap
-  end
-end
-
-
- -
-

- - #on_system_blocks_exist?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-2747
-2748
-2749
-
-
# File 'formula.rb', line 2747
-
-def on_system_blocks_exist?
-  self.class.on_system_blocks_exist? || @on_system_blocks_exist
-end
-
-
- -
-

- - #opt_binPathname - - - - - -

-
-

Same as #bin, but relative to #opt_prefix instead of #prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1288
-1289
-1290
-
-
# File 'formula.rb', line 1288
-
-def opt_bin
-  opt_prefix/"bin"
-end
-
-
- -
-

- - #opt_elispPathname - - - - - -

-
-

Same as #elisp, but relative to #opt_prefix instead of #prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1344
-1345
-1346
-
-
# File 'formula.rb', line 1344
-
-def opt_elisp
-  opt_prefix/"share/emacs/site-lisp"/name
-end
-
-
- -
-

- - #opt_frameworksPathname - - - - - -

-
-

Same as #frameworks, but relative to #opt_prefix instead of #prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1352
-1353
-1354
-
-
# File 'formula.rb', line 1352
-
-def opt_frameworks
-  opt_prefix/"Frameworks"
-end
-
-
- -
-

- - #opt_includePathname - - - - - -

-
-

Same as #include, but relative to #opt_prefix instead of #prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1296
-1297
-1298
-
-
# File 'formula.rb', line 1296
-
-def opt_include
-  opt_prefix/"include"
-end
-
-
- -
-

- - #opt_libPathname - - - - - -

-
-

Same as #lib, but relative to #opt_prefix instead of #prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1304
-1305
-1306
-
-
# File 'formula.rb', line 1304
-
-def opt_lib
-  opt_prefix/"lib"
-end
-
-
- -
-

- - #opt_libexecPathname - - - - - -

-
-

Same as #libexec, but relative to #opt_prefix instead of #prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1312
-1313
-1314
-
-
# File 'formula.rb', line 1312
-
-def opt_libexec
-  opt_prefix/"libexec"
-end
-
-
- -
-

- - #opt_pkgsharePathname - - - - - -

-
-

Same as #pkgshare, but relative to #opt_prefix instead of #prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1336
-1337
-1338
-
-
# File 'formula.rb', line 1336
-
-def opt_pkgshare
-  opt_prefix/"share"/name
-end
-
-
- -
-

- - #opt_prefixPathname - - - - - -

-
-

A stable path for this formula, when installed. Contains the formula name -but no version number. Only the active version will be linked here if -multiple versions are installed.

- -

This is the preferred way to refer to a formula in plists or from another -formula, as the path is stable even when the software is updated.

- -

Example

- -
args << "--with-readline=#{Formula["readline"].opt_prefix}" if build.with? "readline"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1280
-1281
-1282
-
-
# File 'formula.rb', line 1280
-
-def opt_prefix
-  HOMEBREW_PREFIX/"opt"/name
-end
-
-
- -
-

- - #opt_sbinPathname - - - - - -

-
-

Same as #sbin, but relative to #opt_prefix instead of #prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1320
-1321
-1322
-
-
# File 'formula.rb', line 1320
-
-def opt_sbin
-  opt_prefix/"sbin"
-end
-
-
- -
-

- - #opt_sharePathname - - - - - -

-
-

Same as #share, but relative to #opt_prefix instead of #prefix.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1328
-1329
-1330
-
-
# File 'formula.rb', line 1328
-
-def opt_share
-  opt_prefix/"share"
-end
-
-
- -
-

- - #option_defined?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If a named option is defined for the currently active SoftwareSpec.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-623
-
-
# File 'formula.rb', line 623
-
-delegate option_defined?: :active_spec
-
-
- -
-

- - #options(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-99
-
-
# File 'sorbet/rbi/parlour.rbi', line 99
-
-def options(*args, **options, &block); end
-
-
- -
-

- - #optlinked?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Is the formula linked to opt?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-720
-721
-722
-
-
# File 'formula.rb', line 720
-
-def optlinked?
-  opt_prefix.symlink?
-end
-
-
- -
-

- - #outdated?(fetch_head: false) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether the installed formula is outdated.

- - -
-
-
-

Parameters:

-
    - -
  • - - fetch_head - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1723
-1724
-1725
-1726
-1727
-
-
# File 'formula.rb', line 1723
-
-def outdated?(fetch_head: false)
-  !outdated_kegs(fetch_head:).empty?
-rescue Migrator::MigrationNeededError
-  true
-end
-
-
- -
-

- - #outdated_kegs(fetch_head: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-1637
-1638
-1639
-1640
-1641
-1642
-1643
-1644
-1645
-1646
-1647
-1648
-1649
-1650
-1651
-1652
-1653
-1654
-1655
-1656
-1657
-1658
-1659
-1660
-1661
-1662
-1663
-1664
-1665
-1666
-1667
-1668
-1669
-1670
-
-
# File 'formula.rb', line 1637
-
-def outdated_kegs(fetch_head: false)
-  raise Migrator::MigrationNeededError.new(oldnames_to_migrate.first, name) if migration_needed?
-
-  cache_key = "#{full_name}-#{fetch_head}"
-  Formula.cache[:outdated_kegs] ||= {}
-  Formula.cache[:outdated_kegs][cache_key] ||= begin
-    all_kegs = []
-    current_version = T.let(false, T::Boolean)
-
-    installed_kegs.each do |keg|
-      all_kegs << keg
-      version = keg.version
-      next if version.head?
-
-      next if version_scheme > keg.version_scheme && pkg_version != version
-      next if version_scheme == keg.version_scheme && pkg_version > version
-
-      # don't consider this keg current if there's a newer formula available
-      next if follow_installed_alias? && new_formula_available?
-
-      # this keg is the current version of the formula, so it's not outdated
-      current_version = true
-      break
-    end
-
-    if current_version ||
-       ((head_version = latest_head_version) && !head_version_outdated?(head_version, fetch_head:))
-      []
-    else
-      all_kegs += old_installed_formulae.flat_map(&:installed_kegs)
-      all_kegs.sort_by(&:scheme_and_version)
-    end
-  end
-end
-
-
- -
-

- - #patchObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1559
-1560
-1561
-1562
-1563
-1564
-
-
# File 'formula.rb', line 1559
-
-def patch
-  return if patchlist.empty?
-
-  ohai "Patching"
-  patchlist.each(&:apply)
-end
-
-
- -
-

- - #pin(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-147
-
-
# File 'sorbet/rbi/parlour.rbi', line 147
-
-def pin(*args, **options, &block); end
-
-
- -
-

- - #pinnable?(*args, **options, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-138
-
-
# File 'sorbet/rbi/parlour.rbi', line 138
-
-def pinnable?(*args, **options, &block); end
-
-
- -
-

- - #pinned?(*args, **options, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-141
-
-
# File 'sorbet/rbi/parlour.rbi', line 141
-
-def pinned?(*args, **options, &block); end
-
-
- -
-

- - #pinned_version(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-144
-
-
# File 'sorbet/rbi/parlour.rbi', line 144
-
-def pinned_version(*args, **options, &block); end
-
-
- -
-

- - #pkg_versionPkgVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The PkgVersion for this formula with version and #revision information.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-499
-500
-501
-
-
# File 'formula.rb', line 499
-
-def pkg_version
-  PkgVersion.new(version, revision)
-end
-
-
- -
-

- - #pkgetcPathname - - - - - -

-
-

A subdirectory of etc with the formula name suffixed. -e.g. $HOMEBREW_PREFIX/etc/openssl@1.1 -Anything using pkgetc.install will not overwrite other files on -e.g. upgrades but will write a new file named *.default.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1091
-1092
-1093
-
-
# File 'formula.rb', line 1091
-
-def pkgetc
-  (HOMEBREW_PREFIX/"etc"/name).extend(InstallRenamed)
-end
-
-
- -
-

- - #pkgsharePathname - - - - - -

-
-

The directory where the formula's shared files should be installed, -with the name of the formula appended to avoid linking conflicts. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- -

Example

- -

No make install available?

- -
pkgshare.install "examples"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1029
-1030
-1031
-
-
# File 'formula.rb', line 1029
-
-def pkgshare
-  prefix/"share"/name
-end
-
-
- -
-

- - #plistObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
Deprecated.

Use Homebrew::Service instead.

-
-

This method can be overridden to provide a plist.

- -

Example

- -
def plist; <<~EOS
-  <?xml version="1.0" encoding="UTF-8"?>
-  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-  <plist version="1.0">
-  <dict>
-    <key>Label</key>
-      <string>#{plist_name}</string>
-    <key>ProgramArguments</key>
-    <array>
-      <string>#{opt_bin}/example</string>
-      <string>--do-this</string>
-    </array>
-    <key>RunAtLoad</key>
-    <true/>
-    <key>KeepAlive</key>
-    <true/>
-    <key>StandardErrorPath</key>
-    <string>/dev/null</string>
-    <key>StandardOutPath</key>
-    <string>/dev/null</string>
-  </dict>
-  </plist>
-  EOS
-end
-
- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-1225
-1226
-1227
-1228
-
-
# File 'formula.rb', line 1225
-
-def plist
-  odeprecated "`Formula#plist`", "`Homebrew::Service`"
-  nil
-end
-
-
- -
-

- - #plist_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The generated launchd #plist service name.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1232
-1233
-1234
-
-
# File 'formula.rb', line 1232
-
-def plist_name
-  service.plist_name
-end
-
-
- -
-

- - #possible_namesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1758
-1759
-1760
-
-
# File 'formula.rb', line 1758
-
-def possible_names
-  [name, *oldnames, *aliases].compact
-end
-
-
- -
-

- - #post_installvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Can be overridden to run commands on both source and bottle installation.

- - -
-
-
- - -
- - - - -
-
-
-
-1371
-
-
# File 'formula.rb', line 1371
-
-def post_install; end
-
-
- -
-

- - #post_install_defined?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1374
-1375
-1376
-
-
# File 'formula.rb', line 1374
-
-def post_install_defined?
-  method(:post_install).owner != Formula
-end
-
-
- -
-

- - #pour_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Indicates that this formula supports bottles. (Not necessarily that one -should be used in the current installation run.) -Can be overridden to selectively disable bottles from formulae. -Defaults to true so overridden version does not have to check if bottles -are supported. -Replaced by pour_bottle?'s satisfy method if it is specified.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1363
-1364
-1365
-
-
# File 'formula.rb', line 1363
-
-def pour_bottle?
-  true
-end
-
-
- -
-

- - #pour_bottle_check_unsatisfied_reason(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-114
-
-
# File 'sorbet/rbi/parlour.rbi', line 114
-
-def pour_bottle_check_unsatisfied_reason(*args, **options, &block); end
-
-
- -
-

- - #prefix(version = pkg_version) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The directory in the cellar that the formula is installed to. -This directory points to #opt_prefix if it exists and if #prefix is not -called from within the same formula's #install or #post_install methods. -Otherwise, return the full path to the formula's versioned cellar.

- - -
-
-
- - -
- - - - -
-
-
-
-700
-701
-702
-703
-704
-705
-706
-707
-708
-
-
# File 'formula.rb', line 700
-
-def prefix(version = pkg_version)
-  versioned_prefix = versioned_prefix(version)
-  if !@prefix_returns_versioned_prefix && version == pkg_version &&
-     versioned_prefix.directory? && Keg.new(versioned_prefix).optlinked?
-    opt_prefix
-  else
-    versioned_prefix
-  end
-end
-
-
- -
-

- - #prefix_linked?(version = pkg_version) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If a formula's linked keg points to the prefix.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-725
-726
-727
-728
-729
-
-
# File 'formula.rb', line 725
-
-def prefix_linked?(version = pkg_version)
-  return false unless linked?
-
-  linked_keg.resolved_path == versioned_prefix(version)
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2222
-2223
-2224
-2225
-2226
-2227
-
-
# File 'formula.rb', line 2222
-
-def print_tap_action(options = {})
-  return unless tap?
-
-  verb = options[:verb] || "Installing"
-  ohai "#{verb} #{name} from #{tap}"
-end
-
-
- -
-

- - #rackPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The parent of the prefix; the named directory in the cellar containing all -installed versions of this software.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-742
-743
-744
-
-
# File 'formula.rb', line 742
-
-def rack
-  HOMEBREW_CELLAR/name
-end
-
-
- -
-

- - #recursive_dependencies(&block) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a list of Dependency objects in an installable order, which -means if a depends on b then b will be ordered before a in this list

- - -
-
-
- - -
- - - - -
-
-
-
-2244
-2245
-2246
-2247
-
-
# File 'formula.rb', line 2244
-
-def recursive_dependencies(&block)
-  cache_key = "Formula#recursive_dependencies" unless block
-  Dependency.expand(self, cache_key:, &block)
-end
-
-
- -
-

- - #recursive_requirements(&block) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The full set of Requirements for this formula's dependency tree.

- - -
-
-
- - -
- - - - -
-
-
-
-2252
-2253
-2254
-2255
-
-
# File 'formula.rb', line 2252
-
-def recursive_requirements(&block)
-  cache_key = "Formula#recursive_requirements" unless block
-  Requirement.expand(self, cache_key:, &block)
-end
-
-
- -
-

- - #require_universal_deps?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1555
-1556
-1557
-
-
# File 'formula.rb', line 1555
-
-def require_universal_deps?
-  false
-end
-
-
- -
-

- - #requirements(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-
-
# File 'sorbet/rbi/parlour.rbi', line 90
-
-def requirements(*args, **options, &block); end
-
-
- -
-

- - #resource(name, klass = Resource, &block) ⇒ Resource? - - - - - -

-
- -
- TODO: -

This should not actually take a block. All resources should be defined -at the top-level using resource instead -(see https://github.com/Homebrew/brew/issues/17203#issuecomment-2093654431).

-
-
- -

A named Resource for the currently active SoftwareSpec. -Additional downloads can be defined as #resources. -Resource#stage will create a temporary directory and yield to a block.

- -

Example

- -
resource("additional_files").stage { bin.install "my/extra/tool" }
-
- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - klass - - - (T.class_of(Resource)) - - - (defaults to: Resource) - - -
  • - -
  • - - block - - - (T.proc.bind(Resource).void, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-565
-
-
# File 'formula.rb', line 565
-
-def resource(name, klass = Resource, &block) = active_spec.resource(name, klass, &block)
-
-
- -
-

- - #resourcesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The Resources for the currently active SoftwareSpec.

- - -
-
-
- - -
- - - - -
-
-
-
-590
-
-
# File 'formula.rb', line 590
-
-def_delegator :"active_spec.resources", :values, :resources
-
-
- -
-

- - #rpath(source: bin, target: lib) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Executable/Library RPATH according to platform conventions.

- -

Optionally specify a source or target depending on the location -of the file containing the RPATH command and where its target is located.

- -

Example

- -
rpath #=> "@loader_path/../lib"
-rpath(target: frameworks) #=> "@loader_path/../Frameworks"
-rpath(source: libexec/"bin") #=> "@loader_path/../../lib"
-
- - -
-
-
-

Parameters:

-
    - -
  • - - source - - - (Pathname) - - - (defaults to: bin) - - -
  • - -
  • - - target - - - (Pathname) - - - (defaults to: lib) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1898
-1899
-1900
-1901
-1902
-1903
-1904
-
-
# File 'formula.rb', line 1898
-
-def rpath(source: bin, target: lib)
-  unless target.to_s.start_with?(HOMEBREW_PREFIX)
-    raise "rpath `target` should only be used for paths inside HOMEBREW_PREFIX!"
-  end
-
-  "#{loader_path}/#{target.relative_path_from(source)}"
-end
-
-
- -
-

- - #ruby_source_checksumChecksum? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-2359
-2360
-2361
-
-
# File 'formula.rb', line 2359
-
-def ruby_source_checksum
-  Checksum.new(Digest::SHA256.file(path).hexdigest) if path.exist?
-end
-
-
- -
-

- - #ruby_source_pathString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-2354
-2355
-2356
-
-
# File 'formula.rb', line 2354
-
-def ruby_source_path
-  path.relative_path_from(T.must(tap).path).to_s if tap && path.exist?
-end
-
-
- -
-

- - #run_post_installvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1389
-1390
-1391
-1392
-1393
-1394
-1395
-1396
-1397
-1398
-1399
-1400
-1401
-1402
-1403
-1404
-1405
-1406
-1407
-1408
-1409
-1410
-1411
-1412
-1413
-1414
-1415
-1416
-1417
-
-
# File 'formula.rb', line 1389
-
-def run_post_install
-  @prefix_returns_versioned_prefix = true
-  build = self.build
-
-  begin
-    self.build = Tab.for_formula(self)
-
-    new_env = {
-      TMPDIR:        HOMEBREW_TEMP,
-      TEMP:          HOMEBREW_TEMP,
-      TMP:           HOMEBREW_TEMP,
-      _JAVA_OPTIONS: "-Djava.io.tmpdir=#{HOMEBREW_TEMP}",
-      HOMEBREW_PATH: nil,
-      PATH:          PATH.new(ORIGINAL_PATHS),
-    }
-
-    with_env(new_env) do
-      ENV.clear_sensitive_environment!
-      ENV.activate_extensions!
-
-      with_logging("post_install") do
-        post_install
-      end
-    end
-  ensure
-    self.build = build
-    @prefix_returns_versioned_prefix = false
-  end
-end
-
-
- -
-

- - #run_test(keep_tmp: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2759
-2760
-2761
-2762
-2763
-2764
-2765
-2766
-2767
-2768
-2769
-2770
-2771
-2772
-2773
-2774
-2775
-2776
-2777
-2778
-2779
-2780
-2781
-2782
-2783
-2784
-2785
-2786
-2787
-2788
-2789
-2790
-2791
-2792
-2793
-2794
-
-
# File 'formula.rb', line 2759
-
-def run_test(keep_tmp: false)
-  @prefix_returns_versioned_prefix = true
-
-  test_env = {
-    TMPDIR:        HOMEBREW_TEMP,
-    TEMP:          HOMEBREW_TEMP,
-    TMP:           HOMEBREW_TEMP,
-    TERM:          "dumb",
-    PATH:          PATH.new(ENV.fetch("PATH"), HOMEBREW_PREFIX/"bin"),
-    HOMEBREW_PATH: nil,
-  }.merge(common_stage_test_env)
-  test_env[:_JAVA_OPTIONS] += " -Djava.io.tmpdir=#{HOMEBREW_TEMP}"
-
-  ENV.clear_sensitive_environment!
-  Utils::Git.set_name_email!
-
-  mktemp("#{name}-test") do |staging|
-    staging.retain! if keep_tmp
-    @testpath = staging.tmpdir
-    test_env[:HOME] = @testpath
-    setup_home @testpath
-    begin
-      with_logging("test") do
-        with_env(test_env) do
-          test
-        end
-      end
-    rescue Exception # rubocop:disable Lint/RescueException
-      staging.retain! if debug?
-      raise
-    end
-  end
-ensure
-  @prefix_returns_versioned_prefix = false
-  @testpath = nil
-end
-
-
- -
-

- - #runtime_dependencies(read_from_tab: true, undeclared: true) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a list of Dependency objects that are required at runtime.

- - -
-
-
- - -
- - - - -
-
-
-
-2288
-2289
-2290
-2291
-2292
-2293
-2294
-2295
-2296
-2297
-2298
-2299
-2300
-2301
-2302
-2303
-2304
-2305
-2306
-
-
# File 'formula.rb', line 2288
-
-def runtime_dependencies(read_from_tab: true, undeclared: true)
-  deps = if read_from_tab && undeclared &&
-            (tab_deps = any_installed_keg&.runtime_dependencies)
-    tab_deps.filter_map do |d|
-      full_name = d["full_name"]
-      next unless full_name
-
-      Dependency.new full_name
-    end
-  end
-  begin
-    deps ||= declared_runtime_dependencies unless undeclared
-    deps ||= (declared_runtime_dependencies | undeclared_runtime_dependencies)
-  rescue FormulaUnavailableError
-    onoe "Could not get runtime dependencies from #{path}!"
-    deps ||= []
-  end
-  deps
-end
-
-
- -
-

- - #runtime_formula_dependencies(read_from_tab: true, undeclared: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a list of Formula objects that are required at runtime.

- - -
-
-
- - -
- - - - -
-
-
-
-2309
-2310
-2311
-2312
-2313
-2314
-2315
-2316
-2317
-2318
-2319
-2320
-2321
-
-
# File 'formula.rb', line 2309
-
-def runtime_formula_dependencies(read_from_tab: true, undeclared: true)
-  cache_key = "#{full_name}-#{read_from_tab}-#{undeclared}"
-
-  Formula.cache[:runtime_formula_dependencies] ||= {}
-  Formula.cache[:runtime_formula_dependencies][cache_key] ||= runtime_dependencies(
-    read_from_tab:,
-    undeclared:,
-  ).filter_map do |d|
-    d.to_formula
-  rescue FormulaUnavailableError
-    nil
-  end
-end
-
-
- -
-

- - #runtime_installed_formula_dependentsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2323
-2324
-2325
-2326
-2327
-2328
-2329
-2330
-2331
-2332
-2333
-2334
-2335
-2336
-2337
-2338
-
-
# File 'formula.rb', line 2323
-
-def runtime_installed_formula_dependents
-  # `any_installed_keg` and `runtime_dependencies` `select`s ensure
-  # that we don't end up with something `Formula#runtime_dependencies` can't
-  # read from a `Tab`.
-  Formula.cache[:runtime_installed_formula_dependents] ||= {}
-  Formula.cache[:runtime_installed_formula_dependents][full_name] ||= Formula.installed
-                                                                             .select(&:any_installed_keg)
-                                                                             .select(&:runtime_dependencies)
-                                                                             .select do |f|
-    f.runtime_formula_dependencies.any? do |dep|
-      full_name == dep.full_name
-    rescue
-      name == dep.name
-    end
-  end
-end
-
-
- -
-

- - #sbinPathname - - - - - -

-
-

The directory where the formula's sbin binaries should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only. -Generally we try to migrate these to #bin instead.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-974
-975
-976
-
-
# File 'formula.rb', line 974
-
-def sbin
-  prefix/"sbin"
-end
-
-
- -
-

- - #serialized_requirementsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2635
-2636
-2637
-2638
-2639
-2640
-2641
-2642
-2643
-2644
-2645
-2646
-2647
-2648
-2649
-2650
-2651
-2652
-2653
-2654
-2655
-2656
-2657
-2658
-
-
# File 'formula.rb', line 2635
-
-def serialized_requirements
-  requirements = self.class.spec_syms.to_h do |sym|
-    [sym, send(sym)&.requirements]
-  end
-
-  merge_spec_dependables(requirements).map do |data|
-    req = data[:dependable]
-    req_name = req.name.dup
-    req_name.prepend("maximum_") if req.respond_to?(:comparator) && req.comparator == "<="
-    req_version = if req.respond_to?(:version)
-      req.version
-    elsif req.respond_to?(:arch)
-      req.arch
-    end
-    {
-      "name"     => req_name,
-      "cask"     => req.cask,
-      "download" => req.download,
-      "version"  => req_version,
-      "contexts" => req.tags,
-      "specs"    => data[:specs],
-    }
-  end
-end
-
-
- -
-

- - #serviceObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The service specification of the software.

- - -
-
-
- - -
- - - - -
-
-
-
-1261
-1262
-1263
-
-
# File 'formula.rb', line 1261
-
-def service
-  @service ||= Homebrew::Service.new(self, &self.class.service)
-end
-
-
- -
-

- - #service?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Is a service specification defined for the software?

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-457
-
-
# File 'formula.rb', line 457
-
-delegate service?: :"self.class"
-
-
- -
-

- - #service_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The generated service name.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1238
-1239
-1240
-
-
# File 'formula.rb', line 1238
-
-def service_name
-  service.service_name
-end
-
-
- -
-

- - #sharePathname - - - - - -

-
-

The directory where the formula's shared files should be installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- -

Examples

- -

Need a custom directory?

- -
(share/"concept").mkpath
-
- -

Installing something into another custom directory?

- -
(share/"concept2").install "ducks.txt"
-
- -

Install ./example_code/simple/ones to share/demos:

- -
(share/"demos").install "example_code/simple/ones"
-
- -

Install ./example_code/simple/ones to share/demos/examples:

- -
(share/"demos").install "example_code/simple/ones" => "examples"
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1010
-1011
-1012
-
-
# File 'formula.rb', line 1010
-
-def share
-  prefix/"share"
-end
-
-
- -
-

- - #shared_library(name, version = nil) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Shared library names according to platform conventions.

- -

Optionally specify a version to restrict the shared library to a specific -version. The special string "*" matches any version.

- -

If name is specified as "*", match any shared library of any version.

- -

Example

- -
shared_library("foo")      #=> foo.dylib
-shared_library("foo", 1)   #=> foo.1.dylib
-shared_library("foo", "*") #=> foo.2.dylib, foo.1.dylib, foo.dylib
-shared_library("*")        #=> foo.dylib, bar.dylib
-
- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - version - - - (String, Integer, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-19
-
-
# File 'extend/os/linux/formula.rb', line 12
-
-def shared_library(name, version = nil)
-  suffix = if version == "*" || (name == "*" && version.blank?)
-    "{,.*}"
-  elsif version.present?
-    ".#{version}"
-  end
-  "#{name}.so#{suffix}"
-end
-
-
- -
-

- - #skip_clean?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1465
-1466
-1467
-1468
-1469
-1470
-
-
# File 'formula.rb', line 1465
-
-def skip_clean?(path)
-  return true if path.extname == ".la" && self.class.skip_clean_paths.include?(:la)
-
-  to_check = path.relative_path_from(prefix).to_s
-  self.class.skip_clean_paths.include? to_check
-end
-
-
- -
-

- - #skip_cxxstdlib_check?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1550
-1551
-1552
-
-
# File 'formula.rb', line 1550
-
-def skip_cxxstdlib_check?
-  false
-end
-
-
- -
-

- - #specified_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The name specified to find this formula.

- - -
-
-
- - -
- - - - -
-
-
-
-371
-372
-373
-
-
# File 'formula.rb', line 371
-
-def specified_name
-  alias_name || name
-end
-
-
- -
-

- - #specified_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The path that was specified to find this formula.

- - -
-
-
- - -
- - - - -
-
-
-
-360
-361
-362
-363
-364
-365
-366
-367
-368
-
-
# File 'formula.rb', line 360
-
-def specified_path
-  return alias_path if alias_path&.exist?
-
-  return @unresolved_path if @unresolved_path.exist?
-
-  return local_bottle_path if local_bottle_path.presence&.exist?
-
-  alias_path || @unresolved_path
-end
-
-
- -
-

- - #stable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Is the currently active SoftwareSpec a #stable build?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-392
-393
-394
-
-
# File 'formula.rb', line 392
-
-def stable?
-  active_spec == stable
-end
-
-
- -
-

- - #std_cabal_v2_argsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Standard parameters for cabal-v2 builds.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1830
-1831
-1832
-1833
-1834
-1835
-1836
-1837
-1838
-
-
# File 'formula.rb', line 1830
-
-def std_cabal_v2_args
-  # cabal-install's dependency-resolution backtracking strategy can
-  # easily need more than the default 2,000 maximum number of
-  # "backjumps," since Hackage is a fast-moving, rolling-release
-  # target. The highest known needed value by a formula was 43,478
-  # for git-annex, so 100,000 should be enough to avoid most
-  # gratuitous backjumps build failures.
-  ["--jobs=#{ENV.make_jobs}", "--max-backjumps=100000", "--install-method=copy", "--installdir=#{bin}"]
-end
-
-
- -
-

- - #std_cargo_args(root: prefix, path: ".") ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Standard parameters for cargo builds.

- - -
-
-
-

Parameters:

-
    - -
  • - - root - - - (String, Pathname) - - - (defaults to: prefix) - - -
  • - -
  • - - path - - - (String, Pathname) - - - (defaults to: ".") - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1787
-1788
-1789
-
-
# File 'formula.rb', line 1787
-
-def std_cargo_args(root: prefix, path: ".")
-  ["--locked", "--root=#{root}", "--path=#{path}"]
-end
-
-
- -
-

- - #std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework: "LAST") ⇒ Array<String> - - - - Also known as: - generic_std_cmake_args - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Standard parameters for CMake builds.

- -

Setting CMAKE_FIND_FRAMEWORK to "LAST" tells CMake to search for our -libraries before trying to utilize Frameworks, many of which will be from -3rd party installs.

- - -
-
-
-

Parameters:

-
    - -
  • - - install_prefix - - - (String, Pathname) - - - (defaults to: prefix) - - -
  • - -
  • - - install_libdir - - - (String, Pathname) - - - (defaults to: "lib") - - -
  • - -
  • - - find_framework - - - (String) - - - (defaults to: "LAST") - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'extend/os/mac/formula.rb', line 20
-
-def std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework: "LAST")
-  args = generic_std_cmake_args(install_prefix:, install_libdir:,
-                                find_framework:)
-
-  # Avoid false positives for clock_gettime support on 10.11.
-  # CMake cache entries for other weak symbols may be added here as needed.
-  args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0"
-
-  # Ensure CMake is using the same SDK we are using.
-  args << "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_for_formula(self).path}" if MacOS.sdk_root_needed?
-
-  args
-end
-
-
- -
-

- - #std_configure_args(prefix: self.prefix, libdir: "lib") ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Standard parameters for configure builds.

- - -
-
-
-

Parameters:

-
    - -
  • - - prefix - - - (String, Pathname) - - - (defaults to: self.prefix) - - -
  • - -
  • - - libdir - - - (String, Pathname) - - - (defaults to: "lib") - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1778
-1779
-1780
-1781
-
-
# File 'formula.rb', line 1778
-
-def std_configure_args(prefix: self.prefix, libdir: "lib")
-  libdir = Pathname(libdir).expand_path(prefix)
-  ["--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--libdir=#{libdir}"]
-end
-
-
- -
-

- - #std_go_args(output: bin/name, ldflags: nil) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Standard parameters for Go builds.

- - -
-
-
-

Parameters:

-
    - -
  • - - output - - - (String, Pathname) - - - (defaults to: bin/name) - - -
  • - -
  • - - ldflags - - - (String, Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1822
-1823
-1824
-1825
-1826
-
-
# File 'formula.rb', line 1822
-
-def std_go_args(output: bin/name, ldflags: nil)
-  args = ["-trimpath", "-o=#{output}"]
-  args += ["-ldflags=#{Array(ldflags).join(" ")}"] if ldflags
-  args
-end
-
-
- -
-

- - #std_meson_argsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Standard parameters for meson builds.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1842
-1843
-1844
-
-
# File 'formula.rb', line 1842
-
-def std_meson_args
-  ["--prefix=#{prefix}", "--libdir=#{lib}", "--buildtype=release", "--wrap-mode=nofallback"]
-end
-
-
- -
-

- - #std_pip_args(prefix: self.prefix, build_isolation: false) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Standard parameters for pip builds.

- - -
-
-
-

Parameters:

-
    - -
  • - - prefix - - - (String, Pathname, false) - - - (defaults to: self.prefix) - - -
  • - -
  • - - build_isolation - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1851
-1852
-1853
-1854
-1855
-1856
-
-
# File 'formula.rb', line 1851
-
-def std_pip_args(prefix: self.prefix, build_isolation: false)
-  args = ["--verbose", "--no-deps", "--no-binary=:all:", "--ignore-installed", "--no-compile"]
-  args << "--prefix=#{prefix}" if prefix
-  args << "--no-build-isolation" unless build_isolation
-  args
-end
-
-
- -
-

- - #supersedes_an_installed_formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Is this formula the target of an alias used to install an old formula?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1693
-1694
-1695
-
-
# File 'formula.rb', line 1693
-
-def supersedes_an_installed_formula?
-  old_installed_formulae.any?
-end
-
-
- -
-

- - #synced_with_other_formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether this Formula is version-synced with other formulae.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-540
-541
-542
-543
-544
-
-
# File 'formula.rb', line 540
-
-def synced_with_other_formulae?
-  return false if @tap.nil?
-
-  @tap.synced_versions_formulae.any? { |synced_formulae| synced_formulae.include?(name) }
-end
-
-
- -
-

- - #system(cmd, *args) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

To call out to the system, we use the system method and we prefer -you give the args separately as in the line below, otherwise a subshell -has to be opened first.

- -

Examples

- -
system "./bootstrap.sh", "--arg1", "--prefix=#{prefix}"
-
- -

For CMake and other build systems we have some necessary defaults in e.g. -#std_cmake_args:

- -
system "cmake", ".", *std_cmake_args
-
- -

If the arguments given to configure (or make or cmake) are depending -on options defined above, we usually make a list first and then -use the args << if <condition> to append each:

- -
args = ["--with-option1", "--with-option2"]
-args << "--without-gcc" if ENV.compiler == :clang
-
- -

Most software still uses configure and make. -Check with ./configure --help for what our options are.

- -
system "./configure", "--disable-debug", "--disable-dependency-tracking",
-                      "--disable-silent-rules", "--prefix=#{prefix}",
-                      *args # our custom arg list (needs `*` to unpack)
-
- -

If there is a "make install" available, please use it!

- -
system "make", "install"
-
- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-2941
-2942
-2943
-2944
-2945
-2946
-2947
-2948
-2949
-2950
-2951
-2952
-2953
-2954
-2955
-2956
-2957
-2958
-2959
-2960
-2961
-2962
-2963
-2964
-2965
-2966
-2967
-2968
-2969
-2970
-2971
-2972
-2973
-2974
-2975
-2976
-2977
-2978
-2979
-2980
-2981
-2982
-2983
-2984
-2985
-2986
-2987
-2988
-2989
-2990
-2991
-2992
-2993
-2994
-2995
-2996
-2997
-2998
-2999
-3000
-3001
-3002
-3003
-3004
-3005
-3006
-3007
-3008
-3009
-3010
-3011
-3012
-3013
-3014
-3015
-3016
-3017
-3018
-3019
-3020
-3021
-3022
-3023
-3024
-3025
-3026
-3027
-3028
-3029
-3030
-3031
-3032
-3033
-3034
-3035
-3036
-3037
-3038
-3039
-3040
-3041
-3042
-3043
-3044
-
-
# File 'formula.rb', line 2941
-
-def system(cmd, *args)
-  verbose_using_dots = Homebrew::EnvConfig.verbose_using_dots?
-
-  # remove "boring" arguments so that the important ones are more likely to
-  # be shown considering that we trim long ohai lines to the terminal width
-  pretty_args = args.dup
-  unless verbose?
-    case cmd
-    when "./configure"
-      pretty_args -= std_configure_args
-    when "cabal"
-      pretty_args -= std_cabal_v2_args
-    when "cargo"
-      pretty_args -= std_cargo_args
-    when "cmake"
-      pretty_args -= std_cmake_args
-    when "go"
-      pretty_args -= std_go_args
-    when "meson"
-      pretty_args -= std_meson_args
-    when %r{(^|/)(pip|python)(?:[23](?:\.\d{1,2})?)?$}
-      pretty_args -= std_pip_args
-    end
-  end
-  pretty_args.each_index do |i|
-    pretty_args[i] = "import setuptools..." if pretty_args[i].to_s.start_with? "import setuptools"
-  end
-  ohai "#{cmd} #{pretty_args * " "}".strip
-
-  @exec_count ||= 0
-  @exec_count += 1
-  logfn = format("#{logs}/#{active_log_prefix}%02<exec_count>d.%<cmd_base>s",
-                 exec_count: @exec_count,
-                 cmd_base:   File.basename(cmd).split.first)
-  logs.mkpath
-
-  File.open(logfn, "w") do |log|
-    log.puts Time.now, "", cmd, args, ""
-    log.flush
-
-    if verbose?
-      rd, wr = IO.pipe
-      begin
-        pid = fork do
-          rd.close
-          log.close
-          exec_cmd(cmd, args, wr, logfn)
-        end
-        wr.close
-
-        if verbose_using_dots
-          last_dot = Time.at(0)
-          while (buf = rd.gets)
-            log.puts buf
-            # make sure dots printed with interval of at least 1 min.
-            next if (Time.now - last_dot) <= 60
-
-            print "."
-            $stdout.flush
-            last_dot = Time.now
-          end
-          puts
-        else
-          while (buf = rd.gets)
-            log.puts buf
-            puts buf
-          end
-        end
-      ensure
-        rd.close
-      end
-    else
-      pid = fork do
-        exec_cmd(cmd, args, log, logfn)
-      end
-    end
-
-    Process.wait(T.must(pid))
-
-    $stdout.flush
-
-    unless $CHILD_STATUS.success?
-      log_lines = Homebrew::EnvConfig.fail_log_lines
-
-      log.flush
-      if !verbose? || verbose_using_dots
-        puts "Last #{log_lines} lines from #{logfn}:"
-        Kernel.system "/usr/bin/tail", "-n", log_lines.to_s, logfn
-      end
-      log.puts
-
-      require "system_config"
-      require "build_environment"
-
-      env = ENV.to_hash
-
-      SystemConfig.dump_verbose_config(log)
-      log.puts
-      BuildEnvironment.dump env, log
-
-      raise BuildError.new(self, cmd, args, env)
-    end
-  end
-end
-
-
- -
-

- - #systemd_service_pathPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The generated systemd service file path.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1250
-1251
-1252
-
-
# File 'formula.rb', line 1250
-
-def systemd_service_path
-  opt_prefix/"#{service_name}.service"
-end
-
-
- -
-

- - #systemd_timer_pathPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The generated systemd timer file path.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1256
-1257
-1258
-
-
# File 'formula.rb', line 1256
-
-def systemd_timer_path
-  opt_prefix/"#{service_name}.timer"
-end
-
-
- -
-

- - #tap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if this formula is provided by external Tap

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-2209
-2210
-2211
-2212
-2213
-
-
# File 'formula.rb', line 2209
-
-def tap?
-  return false unless tap
-
-  !T.must(tap).core_tap?
-end
-
-
- -
-

- - #tap_git_headObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2229
-2230
-2231
-
-
# File 'formula.rb', line 2229
-
-def tap_git_head
-  tap&.git_head
-end
-
-
- -
-

- - #testObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2801
-
-
# File 'formula.rb', line 2801
-
-def test; end
-
-
- -
-

- - #test_defined?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-2797
-2798
-2799
-
-
# File 'formula.rb', line 2797
-
-def test_defined?
-  false
-end
-
-
- -
-

- - #test_fixtures(file) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2803
-2804
-2805
-
-
# File 'formula.rb', line 2803
-
-def test_fixtures(file)
-  HOMEBREW_LIBRARY_PATH/"test/support/fixtures"/file
-end
-
-
- -
-

- - #timeTime - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Creates a new Time object for use in the formula as the build time.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-1915
-1916
-1917
-1918
-1919
-1920
-1921
-
-
# File 'formula.rb', line 1915
-
-def time
-  if ENV["SOURCE_DATE_EPOCH"].present?
-    Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc
-  else
-    Time.now.utc
-  end
-end
-
-
- -
-

- - #to_hashObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2378
-2379
-2380
-2381
-2382
-2383
-2384
-2385
-2386
-2387
-2388
-2389
-2390
-2391
-2392
-2393
-2394
-2395
-2396
-2397
-2398
-2399
-2400
-2401
-2402
-2403
-2404
-2405
-2406
-2407
-2408
-2409
-2410
-2411
-2412
-2413
-2414
-2415
-2416
-2417
-2418
-2419
-2420
-2421
-2422
-2423
-2424
-2425
-2426
-2427
-2428
-2429
-2430
-2431
-2432
-2433
-2434
-2435
-2436
-2437
-2438
-2439
-2440
-2441
-2442
-2443
-2444
-2445
-2446
-2447
-2448
-2449
-2450
-2451
-2452
-2453
-2454
-2455
-2456
-2457
-2458
-2459
-2460
-
-
# File 'formula.rb', line 2378
-
-def to_hash
-  hsh = {
-    "name"                     => name,
-    "full_name"                => full_name,
-    "tap"                      => tap&.name,
-    "oldnames"                 => oldnames,
-    "aliases"                  => aliases.sort,
-    "versioned_formulae"       => versioned_formulae.map(&:name),
-    "desc"                     => desc,
-    "license"                  => SPDX.license_expression_to_string(license),
-    "homepage"                 => homepage,
-    "versions"                 => {
-      "stable" => stable&.version&.to_s,
-      "head"   => head&.version&.to_s,
-      "bottle" => bottle_defined?,
-    },
-    "urls"                     => urls_hash,
-    "revision"                 => revision,
-    "version_scheme"           => version_scheme,
-    "bottle"                   => {},
-    "pour_bottle_only_if"      => self.class.pour_bottle_only_if&.to_s,
-    "keg_only"                 => keg_only?,
-    "keg_only_reason"          => keg_only_reason&.to_hash,
-    "options"                  => [],
-    "build_dependencies"       => [],
-    "dependencies"             => [],
-    "test_dependencies"        => [],
-    "recommended_dependencies" => [],
-    "optional_dependencies"    => [],
-    "uses_from_macos"          => [],
-    "uses_from_macos_bounds"   => [],
-    "requirements"             => serialized_requirements,
-    "conflicts_with"           => conflicts.map(&:name),
-    "conflicts_with_reasons"   => conflicts.map(&:reason),
-    "link_overwrite"           => self.class.link_overwrite_paths.to_a,
-    "caveats"                  => caveats_with_placeholders,
-    "installed"                => T.let([], T::Array[T::Hash[String, T.untyped]]),
-    "linked_keg"               => linked_version&.to_s,
-    "pinned"                   => pinned?,
-    "outdated"                 => outdated?,
-    "deprecated"               => deprecated?,
-    "deprecation_date"         => deprecation_date,
-    "deprecation_reason"       => deprecation_reason,
-    "disabled"                 => disabled?,
-    "disable_date"             => disable_date,
-    "disable_reason"           => disable_reason,
-    "post_install_defined"     => post_install_defined?,
-    "service"                  => (service.to_hash if service?),
-    "tap_git_head"             => tap_git_head,
-    "ruby_source_path"         => ruby_source_path,
-    "ruby_source_checksum"     => {},
-  }
-
-  hsh["bottle"]["stable"] = bottle_hash if stable && bottle_defined?
-
-  hsh["options"] = options.map do |opt|
-    { "option" => opt.flag, "description" => opt.description }
-  end
-
-  hsh.merge!(dependencies_hash)
-
-  hsh["installed"] = installed_kegs.sort_by(&:scheme_and_version).map do |keg|
-    tab = keg.tab
-    {
-      "version"                 => keg.version.to_s,
-      "used_options"            => tab.used_options.as_flags,
-      "built_as_bottle"         => tab.built_as_bottle,
-      "poured_from_bottle"      => tab.poured_from_bottle,
-      "time"                    => tab.time,
-      "runtime_dependencies"    => tab.runtime_dependencies,
-      "installed_as_dependency" => tab.installed_as_dependency,
-      "installed_on_request"    => tab.installed_on_request,
-    }
-  end
-
-  if (source_checksum = ruby_source_checksum)
-    hsh["ruby_source_checksum"] = {
-      "sha256" => source_checksum.hexdigest,
-    }
-  end
-
-  hsh
-end
-
-
- -
-

- - #to_hash_with_variations(hash_method: :to_hash) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2524
-2525
-2526
-2527
-2528
-2529
-2530
-2531
-2532
-2533
-2534
-2535
-2536
-2537
-2538
-2539
-2540
-2541
-2542
-2543
-2544
-2545
-2546
-2547
-2548
-2549
-2550
-2551
-2552
-2553
-2554
-2555
-2556
-2557
-2558
-2559
-2560
-2561
-2562
-2563
-2564
-2565
-2566
-2567
-2568
-2569
-2570
-2571
-2572
-2573
-2574
-2575
-
-
# File 'formula.rb', line 2524
-
-def to_hash_with_variations(hash_method: :to_hash)
-  if loaded_from_api? && hash_method == :to_internal_api_hash
-    raise ArgumentError, "API Hash must be generated from Ruby source files"
-  end
-
-  namespace_prefix = case hash_method
-  when :to_hash
-    "Variations"
-  when :to_internal_api_hash
-    "APIVariations"
-  else
-    raise ArgumentError, "Unknown hash method #{hash_method.inspect}"
-  end
-
-  hash = public_send(hash_method)
-
-  # Take from API, merging in local install status.
-  if loaded_from_api? && !Homebrew::EnvConfig.no_install_from_api?
-    json_formula = Homebrew::API::Formula.all_formulae.fetch(name).dup
-    return json_formula.merge(
-      hash.slice("name", "installed", "linked_keg", "pinned", "outdated"),
-    )
-  end
-
-  variations = {}
-
-  if path.exist? && on_system_blocks_exist?
-    formula_contents = path.read
-    OnSystem::ALL_OS_ARCH_COMBINATIONS.each do |os, arch|
-      bottle_tag = Utils::Bottles::Tag.new(system: os, arch:)
-      next unless bottle_tag.valid_combination?
-
-      Homebrew::SimulateSystem.with(os:, arch:) do
-        variations_namespace = Formulary.class_s("#{namespace_prefix}#{bottle_tag.to_sym.capitalize}")
-        variations_formula_class = Formulary.load_formula(name, path, formula_contents, variations_namespace,
-                                                          flags: self.class.build_flags, ignore_errors: true)
-        variations_formula = variations_formula_class.new(name, path, :stable,
-                                                          alias_path:, force_bottle:)
-
-        variations_formula.public_send(hash_method).each do |key, value|
-          next if value.to_s == hash[key].to_s
-
-          variations[bottle_tag.to_sym] ||= {}
-          variations[bottle_tag.to_sym][key] = value
-        end
-      end
-    end
-  end
-
-  hash["variations"] = variations if hash_method != :to_internal_api_hash || variations.present?
-  hash
-end
-
-
- -
-

- - #to_internal_api_hashObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2462
-2463
-2464
-2465
-2466
-2467
-2468
-2469
-2470
-2471
-2472
-2473
-2474
-2475
-2476
-2477
-2478
-2479
-2480
-2481
-2482
-2483
-2484
-2485
-2486
-2487
-2488
-2489
-2490
-2491
-2492
-2493
-2494
-2495
-2496
-2497
-2498
-2499
-2500
-2501
-2502
-2503
-2504
-2505
-2506
-2507
-2508
-2509
-2510
-2511
-2512
-2513
-2514
-2515
-2516
-2517
-2518
-2519
-2520
-2521
-2522
-
-
# File 'formula.rb', line 2462
-
-def to_internal_api_hash
-  api_hash = {
-    "desc"                 => desc,
-    "license"              => SPDX.license_expression_to_string(license),
-    "homepage"             => homepage,
-    "urls"                 => urls_hash.transform_values(&:compact),
-    "post_install_defined" => post_install_defined?,
-    "ruby_source_path"     => ruby_source_path,
-    "ruby_source_sha256"   => ruby_source_checksum&.hexdigest,
-  }
-
-  # Exclude default values.
-  api_hash["revision"] = revision unless revision.zero?
-  api_hash["version_scheme"] = version_scheme unless version_scheme.zero?
-
-  # Optional values.
-  api_hash["keg_only_reason"] = keg_only_reason.to_hash if keg_only_reason
-  api_hash["pour_bottle_only_if"] = self.class.pour_bottle_only_if.to_s if self.class.pour_bottle_only_if
-  api_hash["link_overwrite"] = self.class.link_overwrite_paths.to_a if self.class.link_overwrite_paths.present?
-  api_hash["caveats"] = caveats_with_placeholders if caveats
-  api_hash["service"] = service.to_hash if service?
-
-  if stable
-    api_hash["version"] = stable&.version&.to_s
-    api_hash["bottle"] = bottle_hash(compact_for_api: true) if bottle_defined?
-  end
-
-  if (versioned_formulae_list = versioned_formulae.presence)
-    # Could we just use `versioned_formulae_names` here instead?
-    api_hash["versioned_formulae"] = versioned_formulae_list.map(&:name)
-  end
-
-  if (dependencies = internal_dependencies_hash(:stable).presence)
-    api_hash["dependencies"] = dependencies
-  end
-
-  if (head_dependencies = internal_dependencies_hash(:head).presence)
-    api_hash["head_dependencies"] = head_dependencies
-  end
-
-  if (requirements_array = serialized_requirements.presence)
-    api_hash["requirements"] = requirements_array
-  end
-
-  if conflicts.present?
-    api_hash["conflicts_with"] = conflicts.map(&:name)
-    api_hash["conflicts_with_reasons"] = conflicts.map(&:reason)
-  end
-
-  if deprecation_date
-    api_hash["deprecation_date"] = deprecation_date
-    api_hash["deprecation_reason"] = deprecation_reason
-  end
-
-  if disable_date
-    api_hash["disable_date"] = disable_date
-    api_hash["disable_reason"] = disable_reason
-  end
-
-  api_hash
-end
-
-
- -
-

- - #unlockObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1616
-1617
-1618
-1619
-
-
# File 'formula.rb', line 1616
-
-def unlock
-  @lock&.unlock
-  @oldname_locks.each(&:unlock)
-end
-
-
- -
-

- - #unpin(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-150
-
-
# File 'sorbet/rbi/parlour.rbi', line 150
-
-def unpin(*args, **options, &block); end
-
-
- -
-

- - #update_head_versionvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-493
-494
-495
-
-
# File 'formula.rb', line 479
-
-def update_head_version
-  return unless head?
-
-  head_spec = T.must(head)
-  return unless head_spec.downloader.is_a?(VCSDownloadStrategy)
-  return unless head_spec.downloader.cached_location.exist?
-
-  path = if ENV["HOMEBREW_ENV"]
-    ENV.fetch("PATH")
-  else
-    PATH.new(ORIGINAL_PATHS)
-  end
-
-  with_env(PATH: path) do
-    head_spec.version.update_commit(head_spec.downloader.last_commit)
-  end
-end
-
-
- -
-

- - #urls_hashObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2610
-2611
-2612
-2613
-2614
-2615
-2616
-2617
-2618
-2619
-2620
-2621
-2622
-2623
-2624
-2625
-2626
-2627
-2628
-2629
-2630
-2631
-2632
-2633
-
-
# File 'formula.rb', line 2610
-
-def urls_hash
-  hash = {}
-
-  if stable
-    stable_spec = T.must(stable)
-    hash["stable"] = {
-      "url"      => stable_spec.url,
-      "tag"      => stable_spec.specs[:tag],
-      "revision" => stable_spec.specs[:revision],
-      "using"    => (stable_spec.using if stable_spec.using.is_a?(Symbol)),
-      "checksum" => stable_spec.checksum&.to_s,
-    }
-  end
-
-  if head
-    hash["head"] = {
-      "url"    => T.must(head).url,
-      "branch" => T.must(head).specs[:branch],
-      "using"  => (T.must(head).using if T.must(head).using.is_a?(Symbol)),
-    }
-  end
-
-  hash
-end
-
-
- -
-

- - #valid_platform?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if this formula can be installed on this platform -Redefined in extend/os.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'extend/os/mac/formula.rb', line 9
-
-def valid_platform?
-  requirements.none?(LinuxRequirement)
-end
-
-
- -
-

- - #varPathname - - - - - -

-
-

The directory where the formula's variable files should be installed. -This directory is not inside the HOMEBREW_CELLAR so it persists -across upgrades.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1101
-1102
-1103
-
-
# File 'formula.rb', line 1101
-
-def var
-  HOMEBREW_PREFIX/"var"
-end
-
-
- -
-

- - #verify_download_integrity(filename) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-2755
-2756
-2757
-
-
# File 'formula.rb', line 2755
-
-def verify_download_integrity(filename)
-  active_spec.verify_download_integrity(filename)
-end
-
-
- -
-

- - #versionT.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The version for the currently active SoftwareSpec. -The version is autodetected from the URL and/or tag so only needs to be -declared if it cannot be autodetected correctly.

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-464
-
-
# File 'formula.rb', line 464
-
-delegate version: :active_spec
-
-
- -
-

- - #versioned_formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If this is a @-versioned formula.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-505
-506
-507
-
-
# File 'formula.rb', line 505
-
-def versioned_formula?
-  name.include?("@")
-end
-
-
- -
-

- - #versioned_formulaeArray<Formula> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns any @-versioned Formula objects for any Formula (including versioned formulae).

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-530
-531
-532
-533
-534
-535
-536
-
-
# File 'formula.rb', line 530
-
-def versioned_formulae
-  versioned_formulae_names.filter_map do |name|
-    Formula[name]
-  rescue FormulaUnavailableError
-    nil
-  end.sort_by(&:version).reverse
-end
-
-
- -
-

- - #versioned_formulae_namesArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns any other @-versioned formulae names for any formula (including versioned formulae).

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-511
-512
-513
-514
-515
-516
-517
-518
-519
-520
-521
-522
-523
-524
-525
-526
-
-
# File 'formula.rb', line 511
-
-def versioned_formulae_names
-  versioned_names = if tap
-    name_prefix = name.gsub(/(@[\d.]+)?$/, "")
-    T.must(tap).prefix_to_versioned_formulae_names.fetch(name_prefix, [])
-  elsif path.exist?
-    Pathname.glob(path.to_s.gsub(/(@[\d.]+)?\.rb$/, "@*.rb"))
-            .map { |path| path.basename(".rb").to_s }
-            .sort
-  else
-    raise "Either tap or path is required to list versioned formulae"
-  end
-
-  versioned_names.reject do |versioned_name|
-    versioned_name == name
-  end
-end
-
-
- -
-

- - #with_logging(log_type) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Runs a block with the given log type in effect for its duration.

- - -
-
-
- - -
- - - - -
-
-
-
-1185
-1186
-1187
-1188
-1189
-1190
-1191
-
-
# File 'formula.rb', line 1185
-
-def with_logging(log_type)
-  old_log_type = @active_log_type
-  @active_log_type = log_type
-  yield
-ensure
-  @active_log_type = old_log_type
-end
-
-
- -
-

- - #xcodebuild(*args) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Runs xcodebuild without Homebrew's compiler environment variables set.

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-3106
-3107
-3108
-3109
-3110
-3111
-3112
-3113
-3114
-
-
# File 'formula.rb', line 3106
-
-def xcodebuild(*args)
-  removed = ENV.remove_cc_etc
-
-  begin
-    T.unsafe(self).system("xcodebuild", *args)
-  ensure
-    ENV.update(removed)
-  end
-end
-
-
- -
-

- - #zsh_completionPathname - - - - - -

-
-

The directory where the formula's zsh completion files should be -installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1145
-1146
-1147
-
-
# File 'formula.rb', line 1145
-
-def zsh_completion
-  share/"zsh/site-functions"
-end
-
-
- -
-

- - #zsh_functionPathname - - - - - -

-
-

The directory where the formula's zsh function files should be -installed. -This is symlinked into HOMEBREW_PREFIX after installation or with -brew link for formulae that are not keg-only.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1112
-1113
-1114
-
-
# File 'formula.rb', line 1112
-
-def zsh_function
-  share/"zsh/site-functions"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaAmbiguousPythonError.html b/docs/FormulaAmbiguousPythonError.html deleted file mode 100644 index 490af5a7b..000000000 --- a/docs/FormulaAmbiguousPythonError.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - Exception: FormulaAmbiguousPythonError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaAmbiguousPythonError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raise when two Python versions are detected simultaneously.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula) ⇒ FormulaAmbiguousPythonError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaAmbiguousPythonError.

- - -
-
-
- - -
- - - - -
-
-
-
-445
-446
-447
-448
-449
-450
-451
-452
-453
-
-
# File 'exceptions.rb', line 445
-
-def initialize(formula)
-  super <<~EOS
-    The version of Python to use with the virtualenv in the `#{formula.full_name}` formula
-    cannot be guessed automatically.
-
-    If the simultaneous use of multiple Pythons is intentional, please add `:using => "python@x.y"`
-    to 'virtualenv_install_with_resources' to resolve the ambiguity manually.
-  EOS
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaCellarChecks.html b/docs/FormulaCellarChecks.html deleted file mode 100644 index d51a7915c..000000000 --- a/docs/FormulaCellarChecks.html +++ /dev/null @@ -1,3220 +0,0 @@ - - - - - - - Module: FormulaCellarChecks - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: FormulaCellarChecks - - - Private -

-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - -
-
Includes:
-
Kernel
-
- - - - -
-
Included in:
-
FormulaInstaller, Homebrew::FormulaAuditor
-
- - - -
-
Defined in:
-
extend/os/linux/formula_cellar_checks.rb,
- extend/os/mac/formula_cellar_checks.rb,
formula_cellar_checks.rb,
formula_cellar_checks.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
VALID_LIBRARY_EXTENSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[.a .jnilib .la .o .so .jar .prl .pm .sh].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Instance Method Details

- - -
-

- - #audit_installedvoid - - - - Also known as: - generic_audit_installed - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-122
-123
-124
-125
-126
-127
-128
-129
-
-
# File 'extend/os/mac/formula_cellar_checks.rb', line 122
-
-def audit_installed
-  generic_audit_installed
-  problem_if_output(check_shadowed_headers)
-  problem_if_output(check_openssl_links)
-  problem_if_output(check_python_framework_links(formula.lib))
-  check_linkage
-  problem_if_output(check_flat_namespace(formula))
-end
-
-
- -
-

- - #check_binary_arches(formula) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-
-
# File 'formula_cellar_checks.rb', line 351
-
-def check_binary_arches(formula)
-  return unless formula.prefix.directory?
-
-  keg = Keg.new(formula.prefix)
-  mismatches = {}
-  keg.binary_executable_or_library_files.each do |file|
-    farch = file.arch
-    mismatches[file] = farch if farch != Hardware::CPU.arch
-  end
-  return if mismatches.empty?
-
-  compatible_universal_binaries, mismatches = mismatches.partition do |file, arch|
-    arch == :universal && file.archs.include?(Hardware::CPU.arch)
-  end
-  # To prevent transformation into nested arrays
-  compatible_universal_binaries = compatible_universal_binaries.to_h
-  mismatches = mismatches.to_h
-
-  universal_binaries_expected = if (formula_tap = formula.tap).present? && formula_tap.core_tap?
-    formula_tap.audit_exception(:universal_binary_allowlist, formula.name)
-  else
-    true
-  end
-
-  mismatches_expected = (formula_tap = formula.tap).blank? ||
-                        formula_tap.audit_exception(:mismatched_binary_allowlist, formula.name)
-  mismatches_expected = [mismatches_expected] if mismatches_expected.is_a?(String)
-  if mismatches_expected.is_a?(Array)
-    glob_flags = File::FNM_DOTMATCH | File::FNM_EXTGLOB | File::FNM_PATHNAME
-    mismatches.delete_if do |file, _arch|
-      mismatches_expected.any? { |pattern| file.fnmatch?("#{formula.prefix.realpath}/#{pattern}", glob_flags) }
-    end
-    mismatches_expected = false
-    return if mismatches.empty? && compatible_universal_binaries.empty?
-  end
-
-  return if mismatches.empty? && universal_binaries_expected
-  return if compatible_universal_binaries.empty? && mismatches_expected
-  return if universal_binaries_expected && mismatches_expected
-
-  s = ""
-
-  if mismatches.present? && !mismatches_expected
-    s += <<~EOS
-      Binaries built for a non-native architecture were installed into #{formula}'s prefix.
-      The offending files are:
-        #{mismatches.map { |m| "#{m.first}\t(#{m.last})" } * "\n  "}
-    EOS
-  end
-
-  if compatible_universal_binaries.present? && !universal_binaries_expected
-    s += <<~EOS
-      Unexpected universal binaries were found.
-      The offending files are:
-        #{compatible_universal_binaries.keys * "\n  "}
-    EOS
-  end
-
-  s
-end
-
-
- -
-

- - #check_cpuid_instruction(formula) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-
-
# File 'formula_cellar_checks.rb', line 310
-
-def check_cpuid_instruction(formula)
-  # Checking for `cpuid` only makes sense on Intel:
-  # https://en.wikipedia.org/wiki/CPUID
-  return unless Hardware::CPU.intel?
-
-  dot_brew_formula = formula.prefix/".brew/#{formula.name}.rb"
-  return unless dot_brew_formula.exist?
-
-  return unless dot_brew_formula.read.include? "ENV.runtime_cpu_detection"
-
-  # macOS `objdump` is a bit slow, so we prioritise llvm's `llvm-objdump` (~5.7x faster)
-  # or binutils' `objdump` (~1.8x faster) if they are installed.
-  objdump   = Formula["llvm"].opt_bin/"llvm-objdump" if Formula["llvm"].any_version_installed?
-  objdump ||= Formula["binutils"].opt_bin/"objdump" if Formula["binutils"].any_version_installed?
-  objdump ||= which("objdump")
-  objdump ||= which("objdump", ORIGINAL_PATHS)
-
-  unless objdump
-    return <<~EOS
-      No `objdump` found, so cannot check for a `cpuid` instruction. Install `objdump` with
-        brew install binutils
-    EOS
-  end
-
-  keg = Keg.new(formula.prefix)
-  return if keg.binary_executable_or_library_files.any? do |file|
-    cpuid_instruction?(file, objdump)
-  end
-
-  hardlinks = Set.new
-  return if formula.lib.directory? && formula.lib.find.any? do |pn|
-    next false if pn.symlink? || pn.directory? || pn.extname != ".a"
-    next false unless hardlinks.add? [pn.stat.dev, pn.stat.ino]
-
-    cpuid_instruction?(pn, objdump)
-  end
-
-  "No `cpuid` instruction detected. #{formula} should not use `ENV.runtime_cpu_detection`."
-end
-
-
- -
-

- - #check_easy_install_pth(lib) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - lib - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-
-
# File 'formula_cellar_checks.rb', line 140
-
-def check_easy_install_pth(lib)
-  pth_found = Dir["#{lib}/python3*/site-packages/easy-install.pth"].map { |f| File.dirname(f) }
-  return if pth_found.empty?
-
-  <<~EOS
-    'easy-install.pth' files were found.
-    These '.pth' files are likely to cause link conflicts.
-    Easy install is now deprecated, do not use it.
-    The offending files are:
-      #{pth_found * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_elisp_dirname(share, name) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - share - - - (Pathname) - - - -
  • - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-
-
# File 'formula_cellar_checks.rb', line 154
-
-def check_elisp_dirname(share, name)
-  return unless (share/"emacs/site-lisp").directory?
-  # Emacs itself can do what it wants
-  return if name == "emacs"
-
-  bad_dir_name = (share/"emacs/site-lisp").children.any? do |child|
-    child.directory? && child.basename.to_s != name
-  end
-
-  return unless bad_dir_name
-
-  <<~EOS
-    Emacs Lisp files were installed into the wrong "site-lisp" subdirectory.
-    They should be installed into:
-      #{share}/emacs/site-lisp/#{name}
-  EOS
-end
-
-
- -
-

- - #check_elisp_root(share, name) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - share - - - (Pathname) - - - -
  • - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-
-
# File 'formula_cellar_checks.rb', line 173
-
-def check_elisp_root(share, name)
-  return unless (share/"emacs/site-lisp").directory?
-  # Emacs itself can do what it wants
-  return if name == "emacs"
-
-  elisps = (share/"emacs/site-lisp").children.select do |file|
-    Keg::ELISP_EXTENSIONS.include? file.extname
-  end
-  return if elisps.empty?
-
-  <<~EOS
-    Emacs Lisp files were linked directly to "#{HOMEBREW_PREFIX}/share/emacs/site-lisp".
-    This may cause conflicts with other packages.
-    They should instead be installed into:
-      #{share}/emacs/site-lisp/#{name}
-    The offending files are:
-      #{elisps * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_env_path(bin) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - bin - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'formula_cellar_checks.rb', line 19
-
-def check_env_path(bin)
-  return if Homebrew::EnvConfig.no_env_hints?
-
-  # warn the user if stuff was installed outside of their PATH
-  return unless bin.directory?
-  return if bin.children.empty?
-
-  prefix_bin = (HOMEBREW_PREFIX/bin.basename)
-  return unless prefix_bin.directory?
-
-  prefix_bin = prefix_bin.realpath
-  return if ORIGINAL_PATHS.include? prefix_bin
-
-  <<~EOS
-    "#{prefix_bin}" is not in your PATH.
-    You can amend this by altering your #{Utils::Shell.profile} file.
-  EOS
-end
-
-
- -
-

- - #check_flat_namespace(formula) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'extend/os/mac/formula_cellar_checks.rb', line 96
-
-def check_flat_namespace(formula)
-  return unless formula.prefix.directory?
-  return if formula.tap&.audit_exception(:flat_namespace_allowlist, formula.name)
-
-  keg = Keg.new(formula.prefix)
-  flat_namespace_files = keg.mach_o_files.reject do |file|
-    next true unless file.dylib?
-
-    macho = MachO.open(file)
-    if MachO::Utils.fat_magic?(macho.magic)
-      macho.machos.map(&:header).all? { |h| h.flag? :MH_TWOLEVEL }
-    else
-      macho.header.flag? :MH_TWOLEVEL
-    end
-  end
-  return if flat_namespace_files.empty?
-
-  <<~EOS
-    Libraries were compiled with a flat namespace.
-    This can cause linker errors due to name collisions and
-    is often due to a bug in detecting the macOS version.
-      #{flat_namespace_files * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_generic_executables(bin) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - bin - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-
-
# File 'formula_cellar_checks.rb', line 122
-
-def check_generic_executables(bin)
-  return unless bin.directory?
-
-  generic_names = %w[service start stop]
-  generics = bin.children.select { |g| generic_names.include? g.basename.to_s }
-  return if generics.empty?
-
-  <<~EOS
-    Generic binaries were installed to "#{bin}".
-    Binaries with generic names are likely to conflict with other software.
-    Homebrew suggests that this software is installed to "libexec" and then
-    symlinked as needed.
-    The offending files are:
-      #{generics * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_infopagesString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'formula_cellar_checks.rb', line 51
-
-def check_infopages
-  # Check for info pages that aren't in share/info
-  return unless (formula.prefix/"info").directory?
-
-  <<~EOS
-    A top-level "info" directory was found.
-    Homebrew suggests that info pages live under "share".
-    This can often be fixed by passing `--infodir=\#{info}` to `configure`.
-  EOS
-end
-
-
- -
-

- - #check_jarsString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'formula_cellar_checks.rb', line 63
-
-def check_jars
-  return unless formula.lib.directory?
-
-  jars = formula.lib.children.select { |g| g.extname == ".jar" }
-  return if jars.empty?
-
-  <<~EOS
-    JARs were installed to "#{formula.lib}".
-    Installing JARs to "lib" can cause conflicts between packages.
-    For Java software, it is typically better for the formula to
-    install to "libexec" and then symlink or wrap binaries into "bin".
-    See formulae 'activemq', 'jruby', etc. for examples.
-    The offending files are:
-      #{jars * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_linkagevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-
-
# File 'extend/os/mac/formula_cellar_checks.rb', line 69
-
-def check_linkage
-  return unless formula.prefix.directory?
-
-  keg = Keg.new(formula.prefix)
-
-  CacheStoreDatabase.use(:linkage) do |db|
-    checker = LinkageChecker.new(keg, formula, cache_db: db)
-    next unless checker.broken_library_linkage?
-
-    output = <<~EOS
-      #{formula} has broken dynamic library links:
-        #{checker.display_test_output}
-    EOS
-
-    tab = keg.tab
-    if tab.poured_from_bottle
-      output += <<~EOS
-        Rebuild this from source with:
-          brew reinstall --build-from-source #{formula}
-        If that's successful, file an issue#{formula.tap ? " here:\n  #{T.must(formula.tap).issues_url}" : "."}
-      EOS
-    end
-    problem_if_output output
-  end
-end
-
-
- -
-

- - #check_manpagesString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-
-
# File 'formula_cellar_checks.rb', line 39
-
-def check_manpages
-  # Check for man pages that aren't in share/man
-  return unless (formula.prefix/"man").directory?
-
-  <<~EOS
-    A top-level "man" directory was found.
-    Homebrew requires that man pages live under "share".
-    This can often be fixed by passing `--mandir=\#{man}` to `configure`.
-  EOS
-end
-
-
- -
-

- - #check_non_executables(bin) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - bin - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'formula_cellar_checks.rb', line 108
-
-def check_non_executables(bin)
-  return unless bin.directory?
-
-  non_exes = bin.children.select { |g| g.directory? || !g.executable? }
-  return if non_exes.empty?
-
-  <<~EOS
-    Non-executables were installed to "#{bin}".
-    The offending files are:
-      #{non_exes * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_non_librariesString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'formula_cellar_checks.rb', line 89
-
-def check_non_libraries
-  return unless formula.lib.directory?
-
-  non_libraries = formula.lib.children.reject do |g|
-    next true if g.directory?
-
-    valid_library_extension? g
-  end
-  return if non_libraries.empty?
-
-  <<~EOS
-    Non-libraries were installed to "#{formula.lib}".
-    Installing non-libraries to "lib" is discouraged.
-    The offending files are:
-      #{non_libraries * "\n  "}
-  EOS
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-
-
# File 'extend/os/mac/formula_cellar_checks.rb', line 31
-
-def check_openssl_links
-  return unless formula.prefix.directory?
-
-  keg = Keg.new(formula.prefix)
-  system_openssl = keg.mach_o_files.select do |obj|
-    dlls = obj.dynamically_linked_libraries
-    dlls.any? { |dll| %r{/usr/lib/lib(crypto|ssl|tls)\..*dylib}.match? dll }
-  end
-  return if system_openssl.empty?
-
-  <<~EOS
-    object files were linked against system openssl
-    These object files were linked against the deprecated system OpenSSL or
-    the system's private LibreSSL.
-    Adding `depends_on "openssl"` to the formula may help.
-      #{system_openssl * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_plist(prefix, plist) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-
-
# File 'formula_cellar_checks.rb', line 252
-
-def check_plist(prefix, plist)
-  return unless prefix.directory?
-
-  plist = begin
-    Plist.parse_xml(plist, marshal: false)
-  rescue
-    nil
-  end
-  return if plist.blank?
-
-  program_location = plist["ProgramArguments"]&.first
-  key = "first ProgramArguments value"
-  if program_location.blank?
-    program_location = plist["Program"]
-    key = "Program"
-  end
-  return if program_location.blank?
-
-  Dir.chdir("/") do
-    unless File.exist?(program_location)
-      return <<~EOS
-        The plist "#{key}" does not exist:
-          #{program_location}
-      EOS
-    end
-
-    return if File.executable?(program_location)
-  end
-
-  <<~EOS
-    The plist "#{key}" is not executable:
-      #{program_location}
-  EOS
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - lib - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'extend/os/mac/formula_cellar_checks.rb', line 51
-
-def check_python_framework_links(lib)
-  python_modules = Pathname.glob lib/"python*/site-packages/**/*.so"
-  framework_links = python_modules.select do |obj|
-    dlls = obj.dynamically_linked_libraries
-    dlls.any? { |dll| dll.include?("Python.framework") }
-  end
-  return if framework_links.empty?
-
-  <<~EOS
-    python modules have explicit framework links
-    These python extension modules were linked directly to a Python
-    framework binary. They should be linked with -undefined dynamic_lookup
-    instead of -lpython or -framework Python.
-      #{framework_links * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_python_packages(lib, deps) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-
-
# File 'formula_cellar_checks.rb', line 193
-
-def check_python_packages(lib, deps)
-  return unless lib.directory?
-
-  lib_subdirs = lib.children
-                   .select(&:directory?)
-                   .map(&:basename)
-
-  pythons = lib_subdirs.filter_map do |p|
-    match = p.to_s.match(/^python(\d+\.\d+)$/)
-    next if match.blank?
-    next if match.captures.blank?
-
-    match.captures.first
-  end
-
-  return if pythons.blank?
-
-  python_deps = deps.map(&:name)
-                    .grep(/^python(@.*)?$/)
-                    .filter_map { |d| Formula[d].version.to_s[/^\d+\.\d+/] }
-
-  return if python_deps.blank?
-  return if pythons.any? { |v| python_deps.include? v }
-
-  pythons = pythons.map { |v| "Python #{v}" }
-  python_deps = python_deps.map { |v| "Python #{v}" }
-
-  <<~EOS
-    Packages have been installed for:
-      #{pythons * "\n  "}
-    but this formula depends on:
-      #{python_deps * "\n  "}
-  EOS
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - keg_only - - - (Boolean) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-
-
# File 'formula_cellar_checks.rb', line 288
-
-def check_python_symlinks(name, keg_only)
-  return unless keg_only
-  return unless name.start_with? "python"
-
-  return if %w[pip3 wheel3].none? do |l|
-    link = HOMEBREW_PREFIX/"bin"/l
-    link.exist? && File.realpath(link).start_with?(HOMEBREW_CELLAR/name)
-  end
-
-  "Python formulae that are keg-only should not create `pip3` and `wheel3` symlinks."
-end
-
-
- -
-

- - #check_service_command(formula) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-301
-302
-303
-304
-305
-306
-307
-
-
# File 'formula_cellar_checks.rb', line 301
-
-def check_service_command(formula)
-  return unless formula.prefix.directory?
-  return unless formula.service?
-  return unless formula.service.command?
-
-  "Service command does not exist" unless File.exist?(formula.service.command.first)
-end
-
-
- -
-

- - #check_shadowed_headersString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-
-
# File 'extend/os/mac/formula_cellar_checks.rb', line 9
-
-def check_shadowed_headers
-  return if ["libtool", "subversion", "berkeley-db"].any? do |formula_name|
-    formula.name.start_with?(formula_name)
-  end
-
-  return if formula.name.match?(Version.formula_optionally_versioned_regex(:php))
-  return if formula.keg_only? || !formula.include.directory?
-
-  files  = relative_glob(formula.include, "**/*.h")
-  files &= relative_glob("#{MacOS.sdk_path}/usr/include", "**/*.h")
-  files.map! { |p| File.join(formula.include, p) }
-
-  return if files.empty?
-
-  <<~EOS
-    Header files that shadow system header files were installed to "#{formula.include}"
-    The offending files are:
-      #{files * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_shim_references(prefix) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - prefix - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-
-
# File 'formula_cellar_checks.rb', line 229
-
-def check_shim_references(prefix)
-  return unless prefix.directory?
-
-  keg = Keg.new(prefix)
-
-  matches = []
-  keg.each_unique_file_matching(HOMEBREW_SHIMS_PATH) do |f|
-    match = f.relative_path_from(keg.to_path)
-
-    next if match.to_s.match? %r{^share/doc/.+?/INFO_BIN$}
-
-    matches << match
-  end
-
-  return if matches.empty?
-
-  <<~EOS
-    Files were found with references to the Homebrew shims directory.
-    The offending files are:
-      #{matches * "\n  "}
-  EOS
-end
-
-
- -
-

- - #formulaFormula - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-13
-
-
# File 'formula_cellar_checks.rb', line 13
-
-def formula; end
-
-
- -
-

- - #problem_if_output(output) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - output - - - (String, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-16
-
-
# File 'formula_cellar_checks.rb', line 16
-
-def problem_if_output(output); end
-
-
- -
-

- - #valid_library_extension?(filename) ⇒ Boolean - - - - Also known as: - generic_valid_library_extension? - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - filename - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-132
-133
-134
-135
-
-
# File 'extend/os/mac/formula_cellar_checks.rb', line 132
-
-def valid_library_extension?(filename)
-  macos_lib_extensions = %w[.dylib .framework]
-  generic_valid_library_extension?(filename) || macos_lib_extensions.include?(filename.extname)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaClassUnavailableError.html b/docs/FormulaClassUnavailableError.html deleted file mode 100644 index efcdde59f..000000000 --- a/docs/FormulaClassUnavailableError.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - Exception: FormulaClassUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaClassUnavailableError - - - Private -

-
- -
-
Inherits:
-
- FormulaUnavailableError - - - show all - -
-
- - - - - - -
-
Includes:
-
FormulaClassUnavailableErrorModule
-
- - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula does not contain a formula class.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from FormulaClassUnavailableErrorModule

-

#class_list, #class_name, #path

- - - -

Attributes inherited from FormulaUnavailableError

-

#dependent

- - - -

Attributes inherited from FormulaOrCaskUnavailableError

-

#name

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - -

Methods inherited from FormulaUnavailableError

-

#dependent_s

- - - - - - - - - -

Methods inherited from FormulaOrCaskUnavailableError

-

#did_you_mean

- -
-

Constructor Details

- -
-

- - #initialize(name, path, class_name, class_list) ⇒ FormulaClassUnavailableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaClassUnavailableError.

- - -
-
-
- - -
- - - - -
-
-
-
-190
-191
-192
-193
-194
-195
-
-
# File 'exceptions.rb', line 190
-
-def initialize(name, path, class_name, class_list)
-  @path = path
-  @class_name = class_name
-  @class_list = class_list
-  super name
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaClassUnavailableErrorModule.html b/docs/FormulaClassUnavailableErrorModule.html deleted file mode 100644 index c2748788a..000000000 --- a/docs/FormulaClassUnavailableErrorModule.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Module: FormulaClassUnavailableErrorModule - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: FormulaClassUnavailableErrorModule - - - Private -

-
- - - - - - - - - -
-
Included in:
-
FormulaClassUnavailableError, TapFormulaClassUnavailableError
-
- - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Shared methods for formula class errors.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #class_listObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-157
-158
-159
-
-
# File 'exceptions.rb', line 157
-
-def class_list
-  @class_list
-end
-
-
- - - -
-

- - #class_nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-157
-158
-159
-
-
# File 'exceptions.rb', line 157
-
-def class_name
-  @class_name
-end
-
-
- - - -
-

- - #pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-157
-158
-159
-
-
# File 'exceptions.rb', line 157
-
-def path
-  @path
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaConflict.html b/docs/FormulaConflict.html deleted file mode 100644 index 6647bdd00..000000000 --- a/docs/FormulaConflict.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - - Class: FormulaConflict - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: FormulaConflict - - - Private -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formula_support.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Used to track formulae that cannot be installed at the same time.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #name ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute name.

    -
    - -
  • - - - -
  • - - - #reason ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute reason.

    -
    - -
  • - - -
- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute name

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of name

    -
    - -
  • - -
- -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'formula_support.rb', line 5
-
-def name
-  @name
-end
-
-
- - - -
-

- - #reasonObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute reason

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of reason

    -
    - -
  • - -
- -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'formula_support.rb', line 5
-
-def reason
-  @reason
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaConflictError.html b/docs/FormulaConflictError.html deleted file mode 100644 index 5952da591..000000000 --- a/docs/FormulaConflictError.html +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - - Exception: FormulaConflictError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaConflictError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula conflicts with another one.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula, conflicts) ⇒ FormulaConflictError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaConflictError.

- - -
-
-
- - -
- - - - -
-
-
-
-400
-401
-402
-403
-404
-
-
# File 'exceptions.rb', line 400
-
-def initialize(formula, conflicts)
-  @formula = formula
-  @conflicts = conflicts
-  super message
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #conflictsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-398
-399
-400
-
-
# File 'exceptions.rb', line 398
-
-def conflicts
-  @conflicts
-end
-
-
- - - -
-

- - #formulaObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-398
-399
-400
-
-
# File 'exceptions.rb', line 398
-
-def formula
-  @formula
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #conflict_message(conflict) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-406
-407
-408
-409
-410
-411
-
-
# File 'exceptions.rb', line 406
-
-def conflict_message(conflict)
-  message = []
-  message << "  #{conflict.name}"
-  message << ": because #{conflict.reason}" if conflict.reason
-  message.join
-end
-
-
- -
-

- - #messageString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-
-
# File 'exceptions.rb', line 414
-
-def message
-  message = []
-  message << "Cannot install #{formula.full_name} because conflicting formulae are installed."
-  message.concat conflicts.map { |c| conflict_message(c) } << ""
-  message << <<~EOS
-    Please `brew unlink #{conflicts.map(&:name) * " "}` before continuing.
-
-    Unlinking removes a formula's symlinks from #{HOMEBREW_PREFIX}. You can
-    link the formula again after the install finishes. You can `--force` this
-    install, but the build may fail or cause obscure side effects in the
-    resulting software.
-  EOS
-  message.join("\n")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaInfo.html b/docs/FormulaInfo.html deleted file mode 100644 index 34adbbfd0..000000000 --- a/docs/FormulaInfo.html +++ /dev/null @@ -1,953 +0,0 @@ - - - - - - - Class: FormulaInfo - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: FormulaInfo - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formula_info.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Formula information drawn from an external brew info --json call.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #info ⇒ Object - - - - - - - - - - - - - private - -

    The whole info structure parsed from the JSON.

    -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(info) ⇒ FormulaInfo - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaInfo.

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'formula_info.rb', line 9
-
-def initialize(info)
-  @info = info
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #infoObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The whole info structure parsed from the JSON.

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'formula_info.rb', line 7
-
-def info
-  @info
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .force_utf8!(str) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'formula_info.rb', line 69
-
-def self.force_utf8!(str)
-  str.force_encoding("UTF-8") if str.respond_to?(:force_encoding)
-end
-
-
- -
-

- - .lookup(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Looks up formula on disk and reads its info. -Returns nil if formula is absent or if there was an error reading it.

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-
-
# File 'formula_info.rb', line 15
-
-def self.lookup(name)
-  json = Utils.popen_read(
-    *HOMEBREW_RUBY_EXEC_ARGS,
-    HOMEBREW_LIBRARY_PATH/"brew.rb",
-    "info",
-    "--json=v1",
-    name,
-  )
-
-  return unless $CHILD_STATUS.success?
-
-  force_utf8!(json)
-  FormulaInfo.new(JSON.parse(json)[0])
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #any_bottle_tagObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-
-
# File 'formula_info.rb', line 50
-
-def any_bottle_tag
-  tag = Utils::Bottles.tag.to_s
-  # Prefer native bottles as a convenience for download caching
-  bottle_tags.include?(tag) ? tag : bottle_tags.first
-end
-
-
- -
-

- - #bottle_info(my_bottle_tag = Utils::Bottles.tag) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'formula_info.rb', line 36
-
-def bottle_info(my_bottle_tag = Utils::Bottles.tag)
-  tag_s = my_bottle_tag.to_s
-  return unless info["bottle"]["stable"]
-
-  btl_info = info["bottle"]["stable"]["files"][tag_s]
-  return unless btl_info
-
-  { "url" => btl_info["url"], "sha256" => btl_info["sha256"] }
-end
-
-
- -
-

- - #bottle_info_anyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-
-
# File 'formula_info.rb', line 46
-
-def bottle_info_any
-  bottle_info(any_bottle_tag)
-end
-
-
- -
-

- - #bottle_tagsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-
-
# File 'formula_info.rb', line 30
-
-def bottle_tags
-  return [] unless info["bottle"]["stable"]
-
-  info["bottle"]["stable"]["files"].keys
-end
-
-
- -
-

- - #pkg_version(spec_type = :stable) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-61
-62
-63
-
-
# File 'formula_info.rb', line 61
-
-def pkg_version(spec_type = :stable)
-  PkgVersion.new(version(spec_type), revision)
-end
-
-
- -
-

- - #revisionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-65
-66
-67
-
-
# File 'formula_info.rb', line 65
-
-def revision
-  info["revision"]
-end
-
-
- -
-

- - #version(spec_type) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-56
-57
-58
-59
-
-
# File 'formula_info.rb', line 56
-
-def version(spec_type)
-  version_str = info["versions"][spec_type.to_s]
-  version_str && Version.new(version_str)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaInstallationAlreadyAttemptedError.html b/docs/FormulaInstallationAlreadyAttemptedError.html deleted file mode 100644 index 71b87bb20..000000000 --- a/docs/FormulaInstallationAlreadyAttemptedError.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Exception: FormulaInstallationAlreadyAttemptedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaInstallationAlreadyAttemptedError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula installation was already attempted.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula) ⇒ FormulaInstallationAlreadyAttemptedError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaInstallationAlreadyAttemptedError.

- - -
-
-
- - -
- - - - -
-
-
-
-380
-381
-382
-
-
# File 'exceptions.rb', line 380
-
-def initialize(formula)
-  super "Formula installation already attempted: #{formula.full_name}"
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaInstaller.html b/docs/FormulaInstaller.html deleted file mode 100644 index 2bdbed1d8..000000000 --- a/docs/FormulaInstaller.html +++ /dev/null @@ -1,8559 +0,0 @@ - - - - - - - Class: FormulaInstaller - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: FormulaInstaller - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Attrable
-
- - - -
-
Includes:
-
FormulaCellarChecks
-
- - - - - - -
-
Defined in:
-
extend/os/mac/formula_installer.rb,
- extend/os/linux/formula_installer.rb,
formula_installer.rb,
sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Installer for a formula.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from FormulaCellarChecks

-

FormulaCellarChecks::VALID_LIBRARY_EXTENSIONS

- - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- - - - - - - - - -

Methods included from FormulaCellarChecks

-

#check_binary_arches, #check_cpuid_instruction, #check_easy_install_pth, #check_elisp_dirname, #check_elisp_root, #check_env_path, #check_flat_namespace, #check_generic_executables, #check_infopages, #check_jars, #check_linkage, #check_manpages, #check_non_executables, #check_non_libraries, #check_openssl_links, #check_plist, #check_python_framework_links, #check_python_packages, #check_python_symlinks, #check_service_command, #check_shadowed_headers, #check_shim_references, #valid_library_extension?

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

-
-

Constructor Details

- -
-

- - #initialize(formula, link_keg: false, installed_as_dependency: false, installed_on_request: true, show_header: false, build_bottle: false, skip_post_install: false, force_bottle: false, bottle_arch: nil, ignore_deps: false, only_deps: false, include_test_formulae: [], build_from_source_formulae: [], env: nil, git: false, interactive: false, keep_tmp: false, debug_symbols: false, cc: nil, options: Options.new, force: false, overwrite: false, debug: false, quiet: false, verbose: false) ⇒ FormulaInstaller - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaInstaller.

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-
-
# File 'formula_installer.rb', line 43
-
-def initialize(
-  formula,
-  link_keg: false,
-  installed_as_dependency: false,
-  installed_on_request: true,
-  show_header: false,
-  build_bottle: false,
-  skip_post_install: false,
-  force_bottle: false,
-  bottle_arch: nil,
-  ignore_deps: false,
-  only_deps: false,
-  include_test_formulae: [],
-  build_from_source_formulae: [],
-  env: nil,
-  git: false,
-  interactive: false,
-  keep_tmp: false,
-  debug_symbols: false,
-  cc: nil,
-  options: Options.new,
-  force: false,
-  overwrite: false,
-  debug: false,
-  quiet: false,
-  verbose: false
-)
-  @formula = formula
-  @env = env
-  @force = force
-  @overwrite = overwrite
-  @keep_tmp = keep_tmp
-  @debug_symbols = debug_symbols
-  @link_keg = !formula.keg_only? || link_keg
-  @show_header = show_header
-  @ignore_deps = ignore_deps
-  @only_deps = only_deps
-  @build_from_source_formulae = build_from_source_formulae
-  @build_bottle = build_bottle
-  @skip_post_install = skip_post_install
-  @bottle_arch = bottle_arch
-  @formula.force_bottle ||= force_bottle
-  @force_bottle = @formula.force_bottle
-  @include_test_formulae = include_test_formulae
-  @interactive = interactive
-  @git = git
-  @cc = cc
-  @verbose = verbose
-  @quiet = quiet
-  @debug = debug
-  @installed_as_dependency = installed_as_dependency
-  @installed_on_request = installed_on_request
-  @options = options
-  @requirement_messages = []
-  @poured_bottle = false
-  @start_time = nil
-  @bottle_tab_runtime_dependencies = {}.freeze
-
-  # Take the original formula instance, which might have been swapped from an API instance to a source instance
-  @formula = previously_fetched_formula if previously_fetched_formula
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #bottle_tab_runtime_dependenciesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'formula_installer.rb', line 33
-
-def bottle_tab_runtime_dependencies
-  @bottle_tab_runtime_dependencies
-end
-
-
- - - -
-

- - #formulaObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'formula_installer.rb', line 33
-
-def formula
-  @formula
-end
-
-
- - - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'formula_installer.rb', line 35
-
-def link_keg
-  @link_keg
-end
-
-
- - - -
-

- - #optionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'formula_installer.rb', line 35
-
-def options
-  @options
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .attemptedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-105
-106
-107
-
-
# File 'formula_installer.rb', line 105
-
-def self.attempted
-  @attempted ||= Set.new
-end
-
-
- -
-

- - .clear_attemptedvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-110
-111
-112
-
-
# File 'formula_installer.rb', line 110
-
-def self.clear_attempted
-  @attempted = Set.new
-end
-
-
- -
-

- - .clear_fetchedvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-128
-129
-130
-
-
# File 'formula_installer.rb', line 128
-
-def self.clear_fetched
-  @fetched = Set.new
-end
-
-
- -
-

- - .clear_installedvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-119
-120
-121
-
-
# File 'formula_installer.rb', line 119
-
-def self.clear_installed
-  @installed = Set.new
-end
-
-
- -
-

- - .fetchedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-123
-124
-125
-
-
# File 'formula_installer.rb', line 123
-
-def self.fetched
-  @fetched ||= Set.new
-end
-
-
- -
-

- - .installedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-114
-115
-116
-
-
# File 'formula_installer.rb', line 114
-
-def self.installed
-  @installed ||= Set.new
-end
-
-
- -
-

- - .lockedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1346
-1347
-1348
-
-
# File 'formula_installer.rb', line 1346
-
-def self.locked
-  @locked ||= []
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #audit_installedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1338
-1339
-1340
-1341
-1342
-1343
-1344
-
-
# File 'formula_installer.rb', line 1338
-
-def audit_installed
-  unless formula.keg_only?
-    problem_if_output(check_env_path(formula.bin))
-    problem_if_output(check_env_path(formula.sbin))
-  end
-  super
-end
-
-
- -
-

- - #buildvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-917
-918
-919
-920
-921
-922
-923
-924
-925
-926
-927
-928
-929
-930
-931
-932
-933
-934
-935
-936
-937
-938
-939
-940
-941
-942
-943
-944
-945
-946
-947
-948
-949
-950
-951
-952
-953
-954
-955
-956
-957
-958
-959
-960
-961
-962
-963
-964
-965
-966
-967
-968
-
-
# File 'formula_installer.rb', line 917
-
-def build
-  FileUtils.rm_rf(formula.logs)
-
-  @start_time = Time.now
-
-  # 1. formulae can modify ENV, so we must ensure that each
-  #    installation has a pristine ENV when it starts, forking now is
-  #    the easiest way to do this
-  args = [
-    "nice",
-    *HOMEBREW_RUBY_EXEC_ARGS,
-    "--",
-    HOMEBREW_LIBRARY_PATH/"build.rb",
-    formula.specified_path,
-  ].concat(build_argv)
-
-  Utils.safe_fork do |error_pipe|
-    if Sandbox.available?
-      sandbox = Sandbox.new
-      formula.logs.mkpath
-      sandbox.record_log(formula.logs/"build.sandbox.log")
-      sandbox.allow_write_path(Dir.home) if interactive?
-      sandbox.allow_write_temp_and_cache
-      sandbox.allow_write_log(formula)
-      sandbox.allow_cvs
-      sandbox.allow_fossil
-      sandbox.allow_write_xcode
-      sandbox.allow_write_cellar(formula)
-      sandbox.deny_all_network_except_pipe(error_pipe) unless formula.network_access_allowed?(:build)
-      sandbox.exec(*args)
-    else
-      exec(*args)
-    end
-  end
-
-  formula.update_head_version
-
-  raise "Empty installation" if !formula.prefix.directory? || Keg.new(formula.prefix).empty_installation?
-rescue Exception => e # rubocop:disable Lint/RescueException
-  if e.is_a? BuildError
-    e.formula = formula
-    e.options = display_options(formula)
-  end
-
-  ignore_interrupts do
-    # any exceptions must leave us with nothing installed
-    formula.update_head_version
-    formula.prefix.rmtree if formula.prefix.directory?
-    formula.rack.rmdir_if_possible
-  end
-  raise e
-end
-
-
- -
-

- - #build_argvArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-912
-913
-914
-
-
# File 'formula_installer.rb', line 912
-
-def build_argv
-  sanitized_argv_options + options.as_flags
-end
-
-
- -
-

- - #build_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-143
-144
-145
-
-
# File 'formula_installer.rb', line 143
-
-def build_bottle?
-  @build_bottle.present?
-end
-
-
- -
-

- - #build_bottle_postinstallObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-375
-376
-377
-378
-379
-380
-
-
# File 'formula_installer.rb', line 375
-
-def build_bottle_postinstall
-  @etc_var_postinstall = Find.find(*@etc_var_dirs.select(&:directory?)).to_a
-  (@etc_var_postinstall - @etc_var_preinstall).each do |file|
-    Pathname.new(file).cp_path_sub(HOMEBREW_PREFIX, formula.bottle_prefix)
-  end
-end
-
-
- -
-

- - #build_bottle_preinstallObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-370
-371
-372
-373
-
-
# File 'formula_installer.rb', line 370
-
-def build_bottle_preinstall
-  @etc_var_dirs ||= [HOMEBREW_PREFIX/"etc", HOMEBREW_PREFIX/"var"]
-  @etc_var_preinstall = Find.find(*@etc_var_dirs.select(&:directory?)).to_a
-end
-
-
- -
-

- - #build_from_source?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-133
-134
-135
-
-
# File 'formula_installer.rb', line 133
-
-def build_from_source?
-  @build_from_source_formulae.include?(formula.full_name)
-end
-
-
- -
-

- - #build_timeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-874
-875
-876
-
-
# File 'formula_installer.rb', line 874
-
-def build_time
-  @build_time ||= Time.now - @start_time if @start_time && !interactive?
-end
-
-
- -
-

- - #caveatsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-772
-773
-774
-775
-776
-777
-778
-779
-780
-781
-782
-783
-784
-785
-786
-
-
# File 'formula_installer.rb', line 772
-
-def caveats
-  return if only_deps?
-
-  audit_installed if Homebrew::EnvConfig.developer?
-
-  return if !installed_on_request? || installed_as_dependency?
-
-  caveats = Caveats.new(formula)
-
-  return if caveats.empty?
-
-  @show_summary_heading = true
-  ohai "Caveats", caveats.to_s
-  Homebrew.messages.record_caveats(formula.name, caveats)
-end
-
-
- -
-

- - #check_conflictsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-515
-
-
# File 'formula_installer.rb', line 487
-
-def check_conflicts
-  return if force?
-
-  conflicts = formula.conflicts.select do |c|
-    f = Formulary.factory(c.name)
-  rescue TapFormulaUnavailableError
-    # If the formula name is a fully-qualified name let's silently
-    # ignore it as we don't care about things used in taps that aren't
-    # currently tapped.
-    false
-  rescue FormulaUnavailableError => e
-    # If the formula name doesn't exist any more then complain but don't
-    # stop installation from continuing.
-    opoo <<~EOS
-      #{formula}: #{e.message}
-      'conflicts_with "#{c.name}"' should be removed from #{formula.path.basename}.
-    EOS
-
-    raise if Homebrew::EnvConfig.developer?
-
-    $stderr.puts "Please report this issue to the #{formula.tap&.full_name} tap".squeeze(" ")
-    $stderr.puts " (not Homebrew/brew or Homebrew/homebrew-core)!" unless formula.core_formula?
-    false
-  else
-    f.linked_keg.exist? && f.opt_prefix.exist?
-  end
-
-  raise FormulaConflictError.new(formula, conflicts) unless conflicts.empty?
-end
-
-
- -
-

- - #check_install_sanityObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-
-
# File 'formula_installer.rb', line 247
-
-def check_install_sanity
-  check_installation_already_attempted
-
-  if force_bottle? && !pour_bottle?
-    raise CannotInstallFormulaError, "--force-bottle passed but #{formula.full_name} has no bottle!"
-  end
-
-  if Homebrew.default_prefix? &&
-     !build_from_source? && !build_bottle? && !formula.head? && formula.tap&.core_tap? &&
-     # Integration tests override homebrew-core locations
-     ENV["HOMEBREW_INTEGRATION_TEST"].nil? &&
-     !pour_bottle?
-    message = if !formula.pour_bottle? && formula.pour_bottle_check_unsatisfied_reason
-      formula_message = formula.pour_bottle_check_unsatisfied_reason
-      formula_message[0] = formula_message[0].downcase
-
-      <<~EOS
-        #{formula}: #{formula_message}
-      EOS
-    # don't want to complain about no bottle available if doing an
-    # upgrade/reinstall/dependency install (but do in the case the bottle
-    # check fails)
-    elsif fresh_install?(formula)
-      <<~EOS
-        #{formula}: no bottle available!
-      EOS
-    end
-
-    if message
-      message += <<~EOS
-        If you're feeling brave, you can try to install from source with:
-          brew install --build-from-source #{formula}
-
-        It is expected behaviour that most formulae will fail to build from source.
-        It is expected behaviour that Homebrew will be buggy and slow when building from source.
-        Do not create any issues about failures building from source on Homebrew's GitHub repositories.
-        Do not create any issues building from source even if you think this message is unrelated.
-        Any opened issues will be immediately closed without response.
-        Do not ask for help from Homebrew or its maintainers on social media.
-        You may ask for help building from source in Homebrew's discussions but are unlikely to receive a response.
-        If building from source fails, try to figure out the problem yourself and submit a fix as a pull request.
-        We will review it but may or may not accept it.
-      EOS
-      raise CannotInstallFormulaError, message
-    end
-  end
-
-  return if ignore_deps?
-
-  if Homebrew::EnvConfig.developer?
-    # `recursive_dependencies` trims cyclic dependencies, so we do one level and take the recursive deps of that.
-    # Mapping direct dependencies to deeper dependencies in a hash is also useful for the cyclic output below.
-    recursive_dep_map = formula.deps.to_h { |dep| [dep, dep.to_formula.recursive_dependencies] }
-
-    cyclic_dependencies = []
-    recursive_dep_map.each do |dep, recursive_deps|
-      if [formula.name, formula.full_name].include?(dep.name)
-        cyclic_dependencies << "#{formula.full_name} depends on itself directly"
-      elsif recursive_deps.any? { |rdep| [formula.name, formula.full_name].include?(rdep.name) }
-        cyclic_dependencies << "#{formula.full_name} depends on itself via #{dep.name}"
-      end
-    end
-
-    if cyclic_dependencies.present?
-      raise CannotInstallFormulaError, <<~EOS
-        #{formula.full_name} contains a recursive dependency on itself:
-          #{cyclic_dependencies.join("\n  ")}
-      EOS
-    end
-
-    # Merge into one list
-    recursive_deps = recursive_dep_map.flat_map { |dep, rdeps| [dep] + rdeps }
-    Dependency.merge_repeats(recursive_deps)
-  else
-    recursive_deps = formula.recursive_dependencies
-  end
-
-  invalid_arch_dependencies = []
-  pinned_unsatisfied_deps = []
-  recursive_deps.each do |dep|
-    if (tab = Tab.for_formula(dep.to_formula)) && tab.arch.present? && tab.arch.to_s != Hardware::CPU.arch.to_s
-      invalid_arch_dependencies << "#{dep} was built for #{tab.arch}"
-    end
-
-    next unless dep.to_formula.pinned?
-    next if dep.satisfied?(inherited_options_for(dep))
-    next if dep.build? && pour_bottle?
-
-    pinned_unsatisfied_deps << dep
-  end
-
-  if invalid_arch_dependencies.present?
-    raise CannotInstallFormulaError, <<~EOS
-      #{formula.full_name} dependencies not built for the #{Hardware::CPU.arch} CPU architecture:
-        #{invalid_arch_dependencies.join("\n  ")}
-    EOS
-  end
-
-  return if pinned_unsatisfied_deps.empty?
-
-  raise CannotInstallFormulaError,
-        "You must `brew unpin #{pinned_unsatisfied_deps * " "}` as installing " \
-        "#{formula.full_name} requires the latest version of pinned dependencies"
-end
-
-
- -
-

- - #check_installation_already_attemptedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-243
-244
-245
-
-
# File 'formula_installer.rb', line 243
-
-def check_installation_already_attempted
-  raise FormulaInstallationAlreadyAttemptedError, formula if self.class.attempted.include?(formula)
-end
-
-
- -
-

- - #check_requirements(req_map) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-560
-
-
# File 'formula_installer.rb', line 543
-
-def check_requirements(req_map)
-  @requirement_messages = []
-  fatals = []
-
-  req_map.each_pair do |dependent, reqs|
-    reqs.each do |req|
-      next if dependent.latest_version_installed? && req.name == "macos" && req.comparator == "<="
-
-      @requirement_messages << "#{dependent}: #{req.message}"
-      fatals << req if req.fatal?
-    end
-  end
-
-  return if fatals.empty?
-
-  puts_requirement_messages
-  raise UnsatisfiedRequirements, fatals
-end
-
-
- -
-

- - #cleanvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1097
-1098
-1099
-1100
-1101
-1102
-1103
-1104
-1105
-1106
-
-
# File 'formula_installer.rb', line 1097
-
-def clean
-  ohai "Cleaning" if verbose?
-  Cleaner.new(formula).clean
-rescue Exception => e # rubocop:disable Lint/RescueException
-  opoo "The cleaning step did not complete successfully"
-  puts "Still, the installation was successful, so we will link it into your prefix."
-  odebug e, Utils::Backtrace.clean(e)
-  Homebrew.failed = true
-  @show_summary_heading = true
-end
-
-
- -
-

- - #compute_and_install_dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-538
-539
-540
-541
-
-
# File 'formula_installer.rb', line 538
-
-def compute_and_install_dependencies
-  deps = compute_dependencies
-  install_dependencies(deps)
-end
-
-
- -
-

- - #compute_dependencies(use_cache: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Compute and collect the dependencies needed by the formula currently -being installed.

- - -
-
-
- - -
- - - - -
-
-
-
-519
-520
-521
-522
-523
-524
-525
-526
-527
-528
-
-
# File 'formula_installer.rb', line 519
-
-def compute_dependencies(use_cache: true)
-  @compute_dependencies = nil unless use_cache
-  @compute_dependencies ||= begin
-    # Needs to be done before expand_dependencies
-    fetch_bottle_tab if pour_bottle?
-
-    check_requirements(expand_requirements)
-    expand_dependencies
-  end
-end
-
-
- -
-

- - #debug?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-218
-
-
# File 'sorbet/rbi/parlour.rbi', line 218
-
-def debug?; end
-
-
- -
-

- - #debug_symbols?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-212
-
-
# File 'sorbet/rbi/parlour.rbi', line 212
-
-def debug_symbols?; end
-
-
- -
-

- - #display_options(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-646
-647
-648
-649
-650
-651
-652
-653
-654
-
-
# File 'formula_installer.rb', line 646
-
-def display_options(formula)
-  options = if formula.head?
-    ["--HEAD"]
-  else
-    []
-  end
-  options += effective_build_options_for(formula).used_options.to_a
-  options
-end
-
-
- -
-

- - #downloaderObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1247
-1248
-1249
-1250
-1251
-1252
-1253
-1254
-1255
-
-
# File 'formula_installer.rb', line 1247
-
-def downloader
-  if (bottle_path = formula.local_bottle_path)
-    LocalBottleDownloadStrategy.new(bottle_path)
-  elsif pour_bottle?
-    formula.bottle
-  else
-    formula
-  end
-end
-
-
- -
-

- - #effective_build_options_for(dependent, inherited_options = []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-638
-639
-640
-641
-642
-643
-644
-
-
# File 'formula_installer.rb', line 638
-
-def effective_build_options_for(dependent, inherited_options = [])
-  args  = dependent.build.used_options
-  args |= (dependent == formula) ? options : inherited_options
-  args |= Tab.for_formula(dependent).used_options
-  args &= dependent.options
-  BuildOptions.new(args, dependent.options)
-end
-
-
- -
-

- - #expand_dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-630
-631
-632
-633
-634
-635
-636
-
-
# File 'formula_installer.rb', line 630
-
-def expand_dependencies
-  inherited_options = Hash.new { |hash, key| hash[key] = Options.new }
-
-  expanded_deps = expand_dependencies_for_formula(formula, inherited_options)
-
-  expanded_deps.map { |dep| [dep, inherited_options[dep.name]] }
-end
-
-
- -
-

- - #expand_dependencies_for_formula(formula, inherited_options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-
-
# File 'formula_installer.rb', line 602
-
-def expand_dependencies_for_formula(formula, inherited_options)
-  # Cache for this expansion only. FormulaInstaller has a lot of inputs which can alter expansion.
-  cache_key = "FormulaInstaller-#{formula.full_name}-#{Time.now.to_f}"
-  Dependency.expand(formula, cache_key:) do |dependent, dep|
-    inherited_options[dep.name] |= inherited_options_for(dep)
-    build = effective_build_options_for(
-      dependent,
-      inherited_options.fetch(dependent.name, []),
-    )
-
-    keep_build_test = false
-    keep_build_test ||= dep.test? && include_test? && @include_test_formulae.include?(dependent.full_name)
-    keep_build_test ||= dep.build? && !install_bottle_for?(dependent, build) &&
-                        (formula.head? || !dependent.latest_version_installed?)
-
-    bottle_runtime_version = @bottle_tab_runtime_dependencies.dig(dep.name, "version").presence
-    bottle_runtime_version = Version.new(bottle_runtime_version) if bottle_runtime_version
-    bottle_runtime_revision = @bottle_tab_runtime_dependencies.dig(dep.name, "revision")
-
-    if dep.prune_from_option?(build) || ((dep.build? || dep.test?) && !keep_build_test)
-      Dependency.prune
-    elsif dep.satisfied?(inherited_options[dep.name], minimum_version:  bottle_runtime_version,
-                                                      minimum_revision: bottle_runtime_revision)
-      Dependency.skip
-    end
-  end
-end
-
-
- -
-

- - #expand_requirementsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-592
-593
-594
-595
-596
-597
-598
-599
-600
-
-
# File 'formula_installer.rb', line 570
-
-def expand_requirements
-  unsatisfied_reqs = Hash.new { |h, k| h[k] = [] }
-  formulae = [formula]
-  formula_deps_map = formula.recursive_dependencies
-                            .each_with_object({}) { |dep, h| h[dep.name] = dep }
-
-  while (f = formulae.pop)
-    runtime_requirements = runtime_requirements(f)
-    f.recursive_requirements do |dependent, req|
-      build = effective_build_options_for(dependent)
-      install_bottle_for_dependent = install_bottle_for?(dependent, build)
-
-      keep_build_test = false
-      keep_build_test ||= runtime_requirements.include?(req)
-      keep_build_test ||= req.test? && include_test? && dependent == f
-      keep_build_test ||= req.build? && !install_bottle_for_dependent && !dependent.latest_version_installed?
-
-      if req.prune_from_option?(build) ||
-         req.satisfied?(env: @env, cc: @cc, build_bottle: @build_bottle, bottle_arch: @bottle_arch) ||
-         ((req.build? || req.test?) && !keep_build_test) ||
-         formula_deps_map[dependent.name]&.build? ||
-         (only_deps? && f == dependent)
-        Requirement.prune
-      else
-        unsatisfied_reqs[dependent] << req
-      end
-    end
-  end
-
-  unsatisfied_reqs
-end
-
-
- -
-

- - #fetchvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1223
-1224
-1225
-1226
-1227
-1228
-1229
-1230
-1231
-1232
-1233
-1234
-1235
-1236
-1237
-1238
-1239
-1240
-1241
-1242
-1243
-1244
-1245
-
-
# File 'formula_installer.rb', line 1223
-
-def fetch
-  return if previously_fetched_formula
-
-  SBOM.fetch_schema! if Homebrew::EnvConfig.developer?
-
-  fetch_dependencies
-
-  return if only_deps?
-
-  oh1 "Fetching #{Formatter.identifier(formula.full_name)}".strip
-
-  if pour_bottle?(output_warning: true)
-    fetch_bottle_tab
-  else
-    @formula = Homebrew::API::Formula.source_download(formula) if formula.loaded_from_api?
-
-    formula.fetch_patches
-    formula.resources.each(&:fetch)
-  end
-  downloader.fetch
-
-  self.class.fetched << formula
-end
-
-
- -
-

- - #fetch_bottle_tabvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1209
-1210
-1211
-1212
-1213
-1214
-1215
-1216
-1217
-1218
-1219
-1220
-
-
# File 'formula_installer.rb', line 1209
-
-def fetch_bottle_tab
-  @fetch_bottle_tab ||= begin
-    formula.fetch_bottle_tab
-    @bottle_tab_runtime_dependencies = formula.bottle_tab_attributes
-                                              .fetch("runtime_dependencies", []).then { |deps| deps || [] }
-                                              .each_with_object({}) { |dep, h| h[dep["full_name"]] = dep }
-                                              .freeze
-    true
-  rescue DownloadError, ArgumentError
-    @fetch_bottle_tab = true
-  end
-end
-
-
- -
-

- - #fetch_dependenciesvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1179
-1180
-1181
-1182
-1183
-1184
-1185
-1186
-1187
-1188
-1189
-1190
-1191
-1192
-1193
-1194
-
-
# File 'formula_installer.rb', line 1179
-
-def fetch_dependencies
-  return if ignore_deps?
-
-  # Don't output dependencies if we're explicitly installing them.
-  deps = compute_dependencies.reject do |(dep, _options)|
-    self.class.fetched.include?(dep.to_formula)
-  end
-
-  return if deps.empty?
-
-  oh1 "Fetching dependencies for #{formula.full_name}: " \
-      "#{deps.map(&:first).map { Formatter.identifier(_1) }.to_sentence}",
-      truncate: false
-
-  deps.each { |(dep, _options)| fetch_dependency(dep) }
-end
-
-
- -
-

- - #fetch_dependency(dep) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-700
-701
-702
-703
-
-
# File 'formula_installer.rb', line 681
-
-def fetch_dependency(dep)
-  df = dep.to_formula
-  fi = FormulaInstaller.new(
-    df,
-    force_bottle:               false,
-    # When fetching we don't need to recurse the dependency tree as it's already
-    # been done for us in `compute_dependencies` and there's no requirement to
-    # fetch in a particular order.
-    # Note, this tree can vary when pouring bottles so we need to check it then.
-    ignore_deps:                !pour_bottle?,
-    installed_as_dependency:    true,
-    include_test_formulae:      @include_test_formulae,
-    build_from_source_formulae: @build_from_source_formulae,
-    keep_tmp:                   keep_tmp?,
-    debug_symbols:              debug_symbols?,
-    force:                      force?,
-    debug:                      debug?,
-    quiet:                      quiet?,
-    verbose:                    verbose?,
-  )
-  fi.prelude
-  fi.fetch
-end
-
-
- -
-

- - #finishvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-789
-790
-791
-792
-793
-794
-795
-796
-797
-798
-799
-800
-801
-802
-803
-804
-805
-806
-807
-808
-809
-810
-811
-812
-813
-814
-815
-816
-817
-818
-819
-820
-821
-822
-823
-824
-825
-826
-827
-828
-829
-830
-831
-832
-833
-834
-835
-836
-837
-838
-839
-840
-841
-842
-843
-844
-845
-846
-847
-848
-849
-850
-851
-852
-853
-854
-855
-856
-857
-858
-859
-860
-861
-862
-863
-
-
# File 'formula_installer.rb', line 789
-
-def finish
-  return if only_deps?
-
-  ohai "Finishing up" if verbose?
-
-  keg = Keg.new(formula.prefix)
-  link(keg)
-
-  install_service
-
-  fix_dynamic_linkage(keg) if !@poured_bottle || !formula.bottle_specification.skip_relocation?
-
-  Homebrew::Install.global_post_install
-
-  if build_bottle? || skip_post_install?
-    if build_bottle?
-      ohai "Not running 'post_install' as we're building a bottle"
-    elsif skip_post_install?
-      ohai "Skipping 'post_install' on request"
-    end
-    puts "You can run it manually using:"
-    puts "  brew postinstall #{formula.full_name}"
-  else
-    formula.install_etc_var
-    post_install if formula.post_install_defined?
-  end
-
-  keg.prepare_debug_symbols if debug_symbols?
-
-  # Updates the cache for a particular formula after doing an install
-  CacheStoreDatabase.use(:linkage) do |db|
-    break unless db.created?
-
-    LinkageChecker.new(keg, formula, cache_db: db, rebuild_cache: true)
-  end
-
-  # Update tab with actual runtime dependencies
-  tab = keg.tab
-  Tab.clear_cache
-  f_runtime_deps = formula.runtime_dependencies(read_from_tab: false)
-  tab.runtime_dependencies = Tab.runtime_deps_hash(formula, f_runtime_deps)
-  tab.write
-
-  # write/update a SBOM file (if we aren't bottling)
-  unless build_bottle?
-    sbom = SBOM.create(formula, tab)
-    sbom.write(validate: Homebrew::EnvConfig.developer?)
-  end
-
-  # let's reset Utils::Git.available? if we just installed git
-  Utils::Git.clear_available_cache if formula.name == "git"
-
-  # use installed ca-certificates when it's needed and available
-  if formula.name == "ca-certificates" &&
-     !DevelopmentTools.ca_file_handles_most_https_certificates?
-    ENV["SSL_CERT_FILE"] = ENV["GIT_SSL_CAINFO"] = formula.pkgetc/"cert.pem"
-    ENV["GIT_SSL_CAPATH"] = formula.pkgetc
-  end
-
-  # use installed curl when it's needed and available
-  if formula.name == "curl" &&
-     !DevelopmentTools.curl_handles_most_https_certificates?
-    ENV["HOMEBREW_CURL"] = formula.opt_bin/"curl"
-    Utils::Curl.clear_path_cache
-  end
-
-  caveats
-
-  ohai "Summary" if verbose? || show_summary_heading?
-  puts summary
-
-  self.class.installed << formula
-ensure
-  unlock
-end
-
-
- -
-

- - #fix_dynamic_linkage(keg) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - keg - - - (Keg) - - - -
  • - -
- - -
- - - - -
-
-
-
-1086
-1087
-1088
-1089
-1090
-1091
-1092
-1093
-1094
-
-
# File 'formula_installer.rb', line 1086
-
-def fix_dynamic_linkage(keg)
-  keg.fix_dynamic_linkage
-rescue Exception => e # rubocop:disable Lint/RescueException
-  ofail "Failed to fix install linkage"
-  puts "The formula built, but you may encounter issues using it or linking other"
-  puts "formulae against it."
-  odebug e, Utils::Backtrace.clean(e)
-  @show_summary_heading = true
-end
-
-
- -
-

- - #forbidden_formula_checkvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-1432
-1433
-1434
-1435
-1436
-1437
-1438
-1439
-1440
-1441
-1442
-1443
-1444
-1445
-1446
-1447
-1448
-1449
-1450
-1451
-1452
-1453
-1454
-1455
-1456
-1457
-1458
-1459
-1460
-1461
-1462
-1463
-1464
-1465
-1466
-1467
-1468
-1469
-1470
-1471
-1472
-1473
-1474
-
-
# File 'formula_installer.rb', line 1432
-
-def forbidden_formula_check
-  forbidden_formulae = Set.new(Homebrew::EnvConfig.forbidden_formulae.to_s.split)
-  return if forbidden_formulae.blank?
-
-  owner = Homebrew::EnvConfig.forbidden_owner
-  owner_contact = if (contact = Homebrew::EnvConfig.forbidden_owner_contact.presence)
-    "\n#{contact}"
-  end
-
-  unless ignore_deps?
-    compute_dependencies.each do |(dep, _options)|
-      dep_name = if forbidden_formulae.include?(dep.name)
-        dep.name
-      elsif dep.tap.present? &&
-            (dep_full_name = "#{dep.tap}/#{dep.name}") &&
-            forbidden_formulae.include?(dep_full_name)
-        dep_full_name
-      else
-        next
-      end
-
-      raise CannotInstallFormulaError, <<~EOS
-        The installation of #{formula.name} has a dependency #{dep_name}
-        but the #{dep_name} formula was forbidden by #{owner} in `HOMEBREW_FORBIDDEN_FORMULAE`.#{owner_contact}
-      EOS
-    end
-  end
-
-  return if only_deps?
-
-  formula_name = if forbidden_formulae.include?(formula.name)
-    formula.name
-  elsif forbidden_formulae.include?(formula.full_name)
-    formula.full_name
-  else
-    return
-  end
-
-  raise CannotInstallFormulaError, <<~EOS
-    The installation of #{formula_name} was forbidden by #{owner}
-    in `HOMEBREW_FORBIDDEN_FORMULAE`.#{owner_contact}
-  EOS
-end
-
-
- -
-

- - #forbidden_license_checkvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-1351
-1352
-1353
-1354
-1355
-1356
-1357
-1358
-1359
-1360
-1361
-1362
-1363
-1364
-1365
-1366
-1367
-1368
-1369
-1370
-1371
-1372
-1373
-1374
-1375
-1376
-1377
-1378
-1379
-1380
-1381
-1382
-1383
-1384
-1385
-1386
-1387
-1388
-1389
-
-
# File 'formula_installer.rb', line 1351
-
-def forbidden_license_check
-  forbidden_licenses = Homebrew::EnvConfig.forbidden_licenses.to_s.dup
-  SPDX::ALLOWED_LICENSE_SYMBOLS.each do |s|
-    pattern = /#{s.to_s.tr("_", " ")}/i
-    forbidden_licenses.sub!(pattern, s.to_s)
-  end
-  forbidden_licenses = forbidden_licenses.split.to_h do |license|
-    [license, SPDX.license_version_info(license)]
-  end
-
-  return if forbidden_licenses.blank?
-
-  owner = Homebrew::EnvConfig.forbidden_owner
-  owner_contact = if (contact = Homebrew::EnvConfig.forbidden_owner_contact.presence)
-    "\n#{contact}"
-  end
-
-  unless ignore_deps?
-    compute_dependencies.each do |(dep, _options)|
-      dep_f = dep.to_formula
-      next unless SPDX.licenses_forbid_installation? dep_f.license, forbidden_licenses
-
-      raise CannotInstallFormulaError, <<~EOS
-        The installation of #{formula.name} has a dependency on #{dep.name} where all
-        its licenses were forbidden by #{owner} in `HOMEBREW_FORBIDDEN_LICENSES`:
-          #{SPDX.license_expression_to_string dep_f.license}.#{owner_contact}
-      EOS
-    end
-  end
-
-  return if only_deps?
-
-  return unless SPDX.licenses_forbid_installation? formula.license, forbidden_licenses
-
-  raise CannotInstallFormulaError, <<~EOS
-    #{formula.name}'s licenses are all forbidden by #{owner} in `HOMEBREW_FORBIDDEN_LICENSES`:
-      #{SPDX.license_expression_to_string formula.license}.#{owner_contact}
-  EOS
-end
-
-
- -
-

- - #forbidden_tap_checkvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-1392
-1393
-1394
-1395
-1396
-1397
-1398
-1399
-1400
-1401
-1402
-1403
-1404
-1405
-1406
-1407
-1408
-1409
-1410
-1411
-1412
-1413
-1414
-1415
-1416
-1417
-1418
-1419
-1420
-1421
-1422
-1423
-1424
-1425
-1426
-1427
-1428
-1429
-
-
# File 'formula_installer.rb', line 1392
-
-def forbidden_tap_check
-  return if Tap.allowed_taps.blank? && Tap.forbidden_taps.blank?
-
-  owner = Homebrew::EnvConfig.forbidden_owner
-  owner_contact = if (contact = Homebrew::EnvConfig.forbidden_owner_contact.presence)
-    "\n#{contact}"
-  end
-
-  unless ignore_deps?
-    compute_dependencies.each do |(dep, _options)|
-      dep_tap = dep.tap
-      next if dep_tap.blank? || (dep_tap.allowed_by_env? && !dep_tap.forbidden_by_env?)
-
-      error_message = +"The installation of #{formula.name} has a dependency #{dep.name}\n" \
-                       "from the #{dep_tap} tap but #{owner} "
-      error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless dep_tap.allowed_by_env?
-      error_message << " and\n" if !dep_tap.allowed_by_env? && dep_tap.forbidden_by_env?
-      error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if dep_tap.forbidden_by_env?
-      error_message << ".#{owner_contact}"
-
-      raise CannotInstallFormulaError, error_message
-    end
-  end
-
-  return if only_deps?
-
-  formula_tap = formula.tap
-  return if formula_tap.blank? || (formula_tap.allowed_by_env? && !formula_tap.forbidden_by_env?)
-
-  error_message = +"The installation of #{formula.full_name} has the tap #{formula_tap}\n" \
-                   "but #{owner} "
-  error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless formula_tap.allowed_by_env?
-  error_message << " and\n" if !formula_tap.allowed_by_env? && formula_tap.forbidden_by_env?
-  error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if formula_tap.forbidden_by_env?
-  error_message << ".#{owner_contact}"
-
-  raise CannotInstallFormulaError, error_message
-end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-203
-
-
# File 'sorbet/rbi/parlour.rbi', line 203
-
-def force?; end
-
-
- -
-

- - #force_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-188
-
-
# File 'sorbet/rbi/parlour.rbi', line 188
-
-def force_bottle?; end
-
-
- -
-

- - #fresh_install?(formula) ⇒ Boolean? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - _formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-11
-
-
# File 'extend/os/mac/formula_installer.rb', line 8
-
-def fresh_install?(formula)
-  !Homebrew::EnvConfig.developer? && !OS::Mac.version.outdated_release? &&
-    (!installed_as_dependency? || !formula.any_version_installed?)
-end
-
-
- -
-

- - #git?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-200
-
-
# File 'sorbet/rbi/parlour.rbi', line 200
-
-def git?; end
-
-
- -
-

- - #hold_locks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-224
-
-
# File 'sorbet/rbi/parlour.rbi', line 224
-
-def hold_locks?; end
-
-
- -
-

- - #ignore_deps?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-191
-
-
# File 'sorbet/rbi/parlour.rbi', line 191
-
-def ignore_deps?; end
-
-
- -
-

- - #include_test?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-138
-139
-140
-
-
# File 'formula_installer.rb', line 138
-
-def include_test?
-  @include_test_formulae.include?(formula.full_name)
-end
-
-
- -
-

- - #inherited_options_for(dep) ⇒ Options - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-657
-658
-659
-660
-661
-662
-663
-664
-
-
# File 'formula_installer.rb', line 657
-
-def inherited_options_for(dep)
-  inherited_options = Options.new
-  u = Option.new("universal")
-  if (options.include?(u) || formula.require_universal_deps?) && !dep.build? && dep.to_formula.option_defined?(u)
-    inherited_options << u
-  end
-  inherited_options
-end
-
-
- -
-

- - #installvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-
-
# File 'formula_installer.rb', line 383
-
-def install
-  lock
-
-  start_time = Time.now
-  Homebrew::Install.perform_build_from_source_checks if !pour_bottle? && DevelopmentTools.installed?
-
-  # Warn if a more recent version of this formula is available in the tap.
-  begin
-    if formula.pkg_version < (v = Formulary.factory(formula.full_name, force_bottle: force_bottle?).pkg_version)
-      opoo "#{formula.full_name} #{v} is available and more recent than version #{formula.pkg_version}."
-    end
-  rescue FormulaUnavailableError
-    nil
-  end
-
-  check_conflicts
-
-  raise UnbottledError, [formula] if !pour_bottle? && !DevelopmentTools.installed?
-
-  unless ignore_deps?
-    deps = compute_dependencies(use_cache: false)
-    if ((pour_bottle? && !DevelopmentTools.installed?) || build_bottle?) &&
-       (unbottled = unbottled_dependencies(deps)).presence
-      # Check that each dependency in deps has a bottle available, terminating
-      # abnormally with a UnbottledError if one or more don't.
-      raise UnbottledError, unbottled
-    end
-
-    install_dependencies(deps)
-  end
-
-  return if only_deps?
-
-  formula.deprecated_flags.each do |deprecated_option|
-    old_flag = deprecated_option.old_flag
-    new_flag = deprecated_option.current_flag
-    opoo "#{formula.full_name}: #{old_flag} was deprecated; using #{new_flag} instead!"
-  end
-
-  options = display_options(formula).join(" ")
-  oh1 "Installing #{Formatter.identifier(formula.full_name)} #{options}".strip if show_header?
-
-  if (tap = formula.tap) && tap.should_report_analytics?
-    Utils::Analytics.report_package_event(:formula_install, package_name: formula.name, tap_name: tap.name,
-on_request: installed_on_request?, options:)
-  end
-
-  self.class.attempted << formula
-
-  if pour_bottle?
-    begin
-      pour
-    rescue Exception # rubocop:disable Lint/RescueException
-      # any exceptions must leave us with nothing installed
-      ignore_interrupts do
-        begin
-          formula.prefix.rmtree if formula.prefix.directory?
-        rescue Errno::EACCES, Errno::ENOTEMPTY
-          odie <<~EOS
-            Could not remove #{formula.prefix.basename} keg! Do so manually:
-              sudo rm -rf #{formula.prefix}
-          EOS
-        end
-        formula.rack.rmdir_if_possible
-      end
-      raise
-    else
-      @poured_bottle = true
-    end
-  end
-
-  puts_requirement_messages
-
-  build_bottle_preinstall if build_bottle?
-
-  unless @poured_bottle
-    build
-    clean
-
-    # Store the formula used to build the keg in the keg.
-    formula_contents = if formula.local_bottle_path
-      Utils::Bottles.formula_contents formula.local_bottle_path, name: formula.name
-    else
-      formula.path.read
-    end
-    s = formula_contents.gsub(/  bottle do.+?end\n\n?/m, "")
-    brew_prefix = formula.prefix/".brew"
-    brew_prefix.mkpath
-    Pathname(brew_prefix/"#{formula.name}.rb").atomic_write(s)
-
-    keg = Keg.new(formula.prefix)
-    tab = keg.tab
-    tab.installed_as_dependency = installed_as_dependency?
-    tab.installed_on_request = installed_on_request?
-    tab.write
-  end
-
-  build_bottle_postinstall if build_bottle?
-
-  opoo "Nothing was installed to #{formula.prefix}" unless formula.latest_version_installed?
-  end_time = Time.now
-  Homebrew.messages.package_installed(formula.name, end_time - start_time)
-end
-
-
- -
-

- - #install_bottle_for?(dep, build) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-191
-192
-193
-194
-195
-196
-197
-198
-199
-
-
# File 'formula_installer.rb', line 191
-
-def install_bottle_for?(dep, build)
-  return pour_bottle? if dep == formula
-
-  @build_from_source_formulae.exclude?(dep.full_name) &&
-    dep.bottle.present? &&
-    dep.pour_bottle? &&
-    build.used_options.empty? &&
-    dep.bottle&.compatible_locations?
-end
-
-
- -
-

- - #install_dependencies(deps) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-667
-668
-669
-670
-671
-672
-673
-674
-675
-676
-677
-678
-
-
# File 'formula_installer.rb', line 667
-
-def install_dependencies(deps)
-  if deps.empty? && only_deps?
-    puts "All dependencies for #{formula.full_name} are satisfied."
-  elsif !deps.empty?
-    oh1 "Installing dependencies for #{formula.full_name}: " \
-        "#{deps.map(&:first).map { Formatter.identifier(_1) }.to_sentence}",
-        truncate: false
-    deps.each { |dep, options| install_dependency(dep, options) }
-  end
-
-  @show_header = true unless deps.empty?
-end
-
-
- -
-

- - #install_dependency(dep, inherited_options) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - dep - - - (Dependency) - - - -
  • - -
  • - - inherited_options - - - (Options) - - - -
  • - -
- - -
- - - - -
-
-
-
-706
-707
-708
-709
-710
-711
-712
-713
-714
-715
-716
-717
-718
-719
-720
-721
-722
-723
-724
-725
-726
-727
-728
-729
-730
-731
-732
-733
-734
-735
-736
-737
-738
-739
-740
-741
-742
-743
-744
-745
-746
-747
-748
-749
-750
-751
-752
-753
-754
-755
-756
-757
-758
-759
-760
-761
-762
-763
-764
-765
-766
-767
-768
-769
-
-
# File 'formula_installer.rb', line 706
-
-def install_dependency(dep, inherited_options)
-  df = dep.to_formula
-
-  if df.linked_keg.directory?
-    linked_keg = Keg.new(df.linked_keg.resolved_path)
-    tab = linked_keg.tab
-    keg_had_linked_keg = true
-    keg_was_linked = linked_keg.linked?
-    linked_keg.unlink
-  end
-
-  if df.latest_version_installed?
-    installed_keg = Keg.new(df.prefix)
-    tab ||= installed_keg.tab
-    tmp_keg = Pathname.new("#{installed_keg}.tmp")
-    installed_keg.rename(tmp_keg)
-  end
-
-  if df.tap.present? && tab.present? && (tab_tap = tab.source["tap"].presence) &&
-     df.tap.to_s != tab_tap.to_s
-    odie <<~EOS
-      #{df} is already installed from #{tab_tap}!
-      Please `brew uninstall #{df}` first."
-    EOS
-  end
-
-  options = Options.new
-  options |= tab.used_options if tab.present?
-  options |= Tab.remap_deprecated_options(df.deprecated_options, dep.options)
-  options |= inherited_options
-  options &= df.options
-
-  fi = FormulaInstaller.new(
-    df,
-    options:,
-    link_keg:                   keg_had_linked_keg ? keg_was_linked : nil,
-    installed_as_dependency:    true,
-    installed_on_request:       df.any_version_installed? && tab.present? && tab.installed_on_request,
-    force_bottle:               false,
-    include_test_formulae:      @include_test_formulae,
-    build_from_source_formulae: @build_from_source_formulae,
-    keep_tmp:                   keep_tmp?,
-    debug_symbols:              debug_symbols?,
-    force:                      force?,
-    debug:                      debug?,
-    quiet:                      quiet?,
-    verbose:                    verbose?,
-  )
-  oh1 "Installing #{formula.full_name} dependency: #{Formatter.identifier(dep.name)}"
-  fi.install
-  fi.finish
-rescue Exception => e # rubocop:disable Lint/RescueException
-  ignore_interrupts do
-    tmp_keg.rename(installed_keg.to_path) if tmp_keg && !installed_keg.directory?
-    linked_keg.link(verbose: verbose?) if keg_was_linked
-  end
-  raise unless e.is_a? FormulaInstallationAlreadyAttemptedError
-
-  # We already attempted to install f as part of another formula's
-  # dependency tree. In that case, don't generate an error, just move on.
-  nil
-else
-  ignore_interrupts { tmp_keg.rmtree if tmp_keg&.directory? }
-end
-
-
- -
-

- - #install_fetch_depsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-
-
# File 'formula_installer.rb', line 358
-
-def install_fetch_deps
-  return if @compute_dependencies.blank?
-
-  compute_dependencies(use_cache: false) if @compute_dependencies.any? do |dep, options|
-    next false unless dep.implicit?
-
-    fetch_dependencies
-    install_dependency(dep, options)
-    true
-  end
-end
-
-
- -
-

- - #install_servicevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1058
-1059
-1060
-1061
-1062
-1063
-1064
-1065
-1066
-1067
-1068
-1069
-1070
-1071
-1072
-1073
-1074
-1075
-1076
-1077
-1078
-1079
-1080
-1081
-1082
-1083
-
-
# File 'formula_installer.rb', line 1058
-
-def install_service
-  service = if formula.service? && formula.service.command?
-    service_path = formula.systemd_service_path
-    service_path.atomic_write(formula.service.to_systemd_unit)
-    service_path.chmod 0644
-
-    if formula.service.timed?
-      timer_path = formula.systemd_timer_path
-      timer_path.atomic_write(formula.service.to_systemd_timer)
-      timer_path.chmod 0644
-    end
-
-    formula.service.to_plist
-  end
-  return unless service
-
-  launchd_service_path = formula.launchd_service_path
-  launchd_service_path.atomic_write(service)
-  launchd_service_path.chmod 0644
-  log = formula.var/"log"
-  log.mkpath if service.include? log.to_s
-rescue Exception => e # rubocop:disable Lint/RescueException
-  puts e
-  ofail "Failed to install service files"
-  odebug e, Utils::Backtrace.clean(e)
-end
-
-
- -
-

- - #installed_as_dependency?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-176
-
-
# File 'sorbet/rbi/parlour.rbi', line 176
-
-def installed_as_dependency?; end
-
-
- -
-

- - #installed_on_request?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-179
-
-
# File 'sorbet/rbi/parlour.rbi', line 179
-
-def installed_on_request?; end
-
-
- -
-

- - #interactive?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-197
-
-
# File 'sorbet/rbi/parlour.rbi', line 197
-
-def interactive?; end
-
-
- -
-

- - #keep_tmp?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-209
-
-
# File 'sorbet/rbi/parlour.rbi', line 209
-
-def keep_tmp?; end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - keg - - - (Keg) - - - -
  • - -
- - -
- - - - -
-
-
-
-971
-972
-973
-974
-975
-976
-977
-978
-979
-980
-981
-982
-983
-984
-985
-986
-987
-988
-989
-990
-991
-992
-993
-994
-995
-996
-997
-998
-999
-1000
-1001
-1002
-1003
-1004
-1005
-1006
-1007
-1008
-1009
-1010
-1011
-1012
-1013
-1014
-1015
-1016
-1017
-1018
-1019
-1020
-1021
-1022
-1023
-1024
-1025
-1026
-1027
-1028
-1029
-1030
-1031
-1032
-1033
-1034
-1035
-1036
-1037
-1038
-1039
-1040
-1041
-1042
-1043
-1044
-1045
-1046
-1047
-1048
-1049
-1050
-1051
-1052
-1053
-1054
-1055
-
-
# File 'formula_installer.rb', line 971
-
-def link(keg)
-  Formula.clear_cache
-
-  unless link_keg
-    begin
-      keg.optlink(verbose: verbose?, overwrite: overwrite?)
-    rescue Keg::LinkError => e
-      ofail "Failed to create #{formula.opt_prefix}"
-      puts "Things that depend on #{formula.full_name} will probably not build."
-      puts e
-    end
-    return
-  end
-
-  cask_installed_with_formula_name = begin
-    Cask::CaskLoader.load(formula.name, warn: false).installed?
-  rescue Cask::CaskUnavailableError, Cask::CaskInvalidError
-    false
-  end
-
-  if cask_installed_with_formula_name
-    ohai "#{formula.name} cask is installed, skipping link."
-    return
-  end
-
-  if keg.linked?
-    opoo "This keg was marked linked already, continuing anyway"
-    keg.remove_linked_keg_record
-  end
-
-  Homebrew::Unlink.unlink_versioned_formulae(formula, verbose: verbose?)
-
-  link_overwrite_backup = {} # Hash: conflict file -> backup file
-  backup_dir = HOMEBREW_CACHE/"Backup"
-
-  begin
-    keg.link(verbose: verbose?, overwrite: overwrite?)
-  rescue Keg::ConflictError => e
-    conflict_file = e.dst
-    if formula.link_overwrite?(conflict_file) && !link_overwrite_backup.key?(conflict_file)
-      backup_file = backup_dir/conflict_file.relative_path_from(HOMEBREW_PREFIX).to_s
-      backup_file.parent.mkpath
-      FileUtils.mv conflict_file, backup_file
-      link_overwrite_backup[conflict_file] = backup_file
-      retry
-    end
-    ofail "The `brew link` step did not complete successfully"
-    puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
-    puts e
-    puts
-    puts "Possible conflicting files are:"
-    keg.link(dry_run: true, overwrite: true, verbose: verbose?)
-    @show_summary_heading = true
-  rescue Keg::LinkError => e
-    ofail "The `brew link` step did not complete successfully"
-    puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
-    puts e
-    puts
-    puts "You can try again using:"
-    puts "  brew link #{formula.name}"
-    @show_summary_heading = true
-  rescue Exception => e # rubocop:disable Lint/RescueException
-    ofail "An unexpected error occurred during the `brew link` step"
-    puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
-    puts e
-    puts Utils::Backtrace.clean(e) if debug?
-    @show_summary_heading = true
-    ignore_interrupts do
-      keg.unlink
-      link_overwrite_backup.each do |origin, backup|
-        origin.parent.mkpath
-        FileUtils.mv backup, origin
-      end
-    end
-    raise
-  end
-
-  return if link_overwrite_backup.empty?
-
-  opoo "These files were overwritten during the `brew link` step:"
-  puts link_overwrite_backup.keys
-  puts
-  puts "They have been backed up to: #{backup_dir}"
-  @show_summary_heading = true
-end
-
-
- -
-

- - #only_deps?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-194
-
-
# File 'sorbet/rbi/parlour.rbi', line 194
-
-def only_deps?; end
-
-
- -
-

- - #overwrite?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-206
-
-
# File 'sorbet/rbi/parlour.rbi', line 206
-
-def overwrite?; end
-
-
- -
-

- - #post_installvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1139
-1140
-1141
-1142
-1143
-1144
-1145
-1146
-1147
-1148
-1149
-1150
-1151
-1152
-1153
-1154
-1155
-1156
-1157
-1158
-1159
-1160
-1161
-1162
-1163
-1164
-1165
-1166
-1167
-1168
-1169
-1170
-1171
-1172
-1173
-1174
-1175
-1176
-
-
# File 'formula_installer.rb', line 1139
-
-def post_install
-  args = [
-    "nice",
-    *HOMEBREW_RUBY_EXEC_ARGS,
-    "-I", $LOAD_PATH.join(File::PATH_SEPARATOR),
-    "--",
-    HOMEBREW_LIBRARY_PATH/"postinstall.rb"
-  ]
-
-  args << post_install_formula_path
-
-  Utils.safe_fork do |error_pipe|
-    if Sandbox.available?
-      sandbox = Sandbox.new
-      formula.logs.mkpath
-      sandbox.record_log(formula.logs/"postinstall.sandbox.log")
-      sandbox.allow_write_temp_and_cache
-      sandbox.allow_write_log(formula)
-      sandbox.allow_write_xcode
-      sandbox.deny_write_homebrew_repository
-      sandbox.allow_write_cellar(formula)
-      sandbox.deny_all_network_except_pipe(error_pipe) unless formula.network_access_allowed?(:postinstall)
-      Keg::KEG_LINK_DIRECTORIES.each do |dir|
-        sandbox.allow_write_path "#{HOMEBREW_PREFIX}/#{dir}"
-      end
-      sandbox.exec(*args)
-    else
-      exec(*args)
-    end
-  end
-rescue Exception => e # rubocop:disable Lint/RescueException
-  opoo "The post-install step did not complete successfully"
-  puts "You can try again using:"
-  puts "  brew postinstall #{formula.full_name}"
-  odebug e, Utils::Backtrace.clean(e), always_display: Homebrew::EnvConfig.developer?
-  Homebrew.failed = true
-  @show_summary_heading = true
-end
-
-
- -
-

- - #post_install_formula_pathPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1109
-1110
-1111
-1112
-1113
-1114
-1115
-1116
-1117
-1118
-1119
-1120
-1121
-1122
-1123
-1124
-1125
-1126
-1127
-1128
-1129
-1130
-1131
-1132
-1133
-1134
-1135
-1136
-
-
# File 'formula_installer.rb', line 1109
-
-def post_install_formula_path
-  # Use the formula from the keg when any of the following is true:
-  # * We're installing from the JSON API
-  # * We're installing a local bottle file
-  # * The formula doesn't exist in the tap (or the tap isn't installed)
-  # * The formula in the tap has a different `pkg_version``.
-  #
-  # In all other cases, including if the formula from the keg is unreadable
-  # (third-party taps may `require` some of their own libraries) or if there
-  # is no formula present in the keg (as is the case with very old bottles),
-  # use the formula from the tap.
-  keg_formula_path = formula.opt_prefix/".brew/#{formula.name}.rb"
-  return keg_formula_path if formula.loaded_from_api?
-  return keg_formula_path if formula.local_bottle_path.present?
-
-  tap_formula_path = formula.specified_path
-  return keg_formula_path unless tap_formula_path.exist?
-
-  begin
-    keg_formula = Formulary.factory(keg_formula_path)
-    tap_formula = Formulary.factory(tap_formula_path)
-    return keg_formula_path if keg_formula.pkg_version != tap_formula.pkg_version
-
-    tap_formula_path
-  rescue FormulaUnavailableError, FormulaUnreadableError
-    tap_formula_path
-  end
-end
-
-
- -
-

- - #pourvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-1258
-1259
-1260
-1261
-1262
-1263
-1264
-1265
-1266
-1267
-1268
-1269
-1270
-1271
-1272
-1273
-1274
-1275
-1276
-1277
-1278
-1279
-1280
-1281
-1282
-1283
-1284
-1285
-1286
-1287
-1288
-1289
-1290
-1291
-1292
-1293
-1294
-1295
-1296
-1297
-1298
-1299
-1300
-1301
-1302
-1303
-1304
-1305
-1306
-1307
-1308
-1309
-1310
-1311
-1312
-1313
-1314
-1315
-1316
-1317
-1318
-1319
-1320
-1321
-1322
-1323
-1324
-1325
-1326
-1327
-1328
-
-
# File 'formula_installer.rb', line 1258
-
-def pour
-  if Homebrew::EnvConfig.verify_attestations? && formula.tap&.core_tap?
-    ohai "Verifying attestation for #{formula.name}"
-    begin
-      Homebrew::Attestation.check_core_attestation formula.bottle
-    rescue Homebrew::Attestation::GhAuthNeeded
-      raise CannotInstallFormulaError, <<~EOS
-        The bottle for #{formula.name} could not be verified.
-
-        This typically indicates a missing GitHub API token, which you
-        can resolve either by setting `HOMEBREW_GITHUB_API_TOKEN` or
-        by running:
-
-          gh auth login
-      EOS
-    rescue Homebrew::Attestation::InvalidAttestationError => e
-      raise CannotInstallFormulaError, <<~EOS
-        The bottle for #{formula.name} has an invalid build provenance attestation.
-
-        This may indicate that the bottle was not produced by the expected
-        tap, or was maliciously inserted into the expected tap's bottle
-        storage.
-
-        Additional context:
-
-        #{e}
-      EOS
-    end
-  end
-
-  HOMEBREW_CELLAR.cd do
-    downloader.stage
-  end
-
-  Tab.clear_cache
-
-  tab = Utils::Bottles.load_tab(formula)
-
-  # fill in missing/outdated parts of the tab
-  # keep in sync with Tab#to_bottle_hash
-  tab.used_options = []
-  tab.unused_options = []
-  tab.built_as_bottle = true
-  tab.poured_from_bottle = true
-  tab.loaded_from_api = formula.loaded_from_api?
-  tab.installed_as_dependency = installed_as_dependency?
-  tab.installed_on_request = installed_on_request?
-  tab.time = Time.now.to_i
-  tab.aliases = formula.aliases
-  tab.arch = Hardware::CPU.arch
-  tab.source["versions"]["stable"] = formula.stable.version&.to_s
-  tab.source["versions"]["version_scheme"] = formula.version_scheme
-  tab.source["path"] = formula.specified_path.to_s
-  tab.source["tap_git_head"] = formula.tap&.installed? ? formula.tap&.git_head : nil
-  tab.tap = formula.tap
-  tab.write
-
-  keg = Keg.new(formula.prefix)
-  skip_linkage = formula.bottle_specification.skip_relocation?
-  keg.replace_placeholders_with_locations(tab.changed_files, skip_linkage:)
-
-  cellar = formula.bottle_specification.tag_to_cellar(Utils::Bottles.tag)
-  return if [:any, :any_skip_relocation].include?(cellar)
-
-  prefix = Pathname(cellar).parent.to_s
-  return if cellar == HOMEBREW_CELLAR.to_s && prefix == HOMEBREW_PREFIX.to_s
-
-  return unless ENV["HOMEBREW_RELOCATE_BUILD_PREFIX"]
-
-  keg.relocate_build_prefix(keg, prefix, HOMEBREW_PREFIX)
-end
-
-
- -
-

- - #pour_bottle?(output_warning: false) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - output_warning - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-
-
# File 'formula_installer.rb', line 153
-
-def pour_bottle?(output_warning: false)
-  return false if !formula.bottle_tag? && !formula.local_bottle_path
-  return true  if force_bottle?
-  return false if build_from_source? || build_bottle? || interactive?
-  return false if @cc
-  return false unless options.empty?
-
-  unless formula.pour_bottle?
-    if output_warning && formula.pour_bottle_check_unsatisfied_reason
-      opoo <<~EOS
-        Building #{formula.full_name} from source:
-          #{formula.pour_bottle_check_unsatisfied_reason}
-      EOS
-    end
-    return false
-  end
-
-  return true if formula.local_bottle_path.present?
-
-  bottle = formula.bottle_for_tag(Utils::Bottles.tag)
-  return false if bottle.nil?
-
-  unless bottle.compatible_locations?
-    if output_warning
-      prefix = Pathname(bottle.cellar.to_s).parent
-      opoo <<~EOS
-        Building #{formula.full_name} from source as the bottle needs:
-        - HOMEBREW_CELLAR: #{bottle.cellar} (yours is #{HOMEBREW_CELLAR})
-        - HOMEBREW_PREFIX: #{prefix} (yours is #{HOMEBREW_PREFIX})
-      EOS
-    end
-    return false
-  end
-
-  true
-end
-
-
- -
-

- - #preludevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-
-
# File 'formula_installer.rb', line 202
-
-def prelude
-  deprecate_disable_type = DeprecateDisable.type(formula)
-  if deprecate_disable_type.present?
-    message = "#{formula.full_name} has been #{DeprecateDisable.message(formula)}"
-
-    case deprecate_disable_type
-    when :deprecated
-      opoo message
-    when :disabled
-      GitHub::Actions.puts_annotation_if_env_set(:error, message)
-      raise CannotInstallFormulaError, message
-    end
-  end
-
-  Tab.clear_cache
-
-  verify_deps_exist unless ignore_deps?
-
-  forbidden_license_check
-  forbidden_tap_check
-  forbidden_formula_check
-
-  check_install_sanity
-  install_fetch_deps unless ignore_deps?
-end
-
-
- -
-

- - #previously_fetched_formulaFormula? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Formula, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-1197
-1198
-1199
-1200
-1201
-1202
-1203
-1204
-1205
-1206
-
-
# File 'formula_installer.rb', line 1197
-
-def previously_fetched_formula
-  # We intentionally don't compare classes here:
-  # from-API-JSON and from-source formula classes are not equal but we
-  # want to equate them to be the same thing here given mixing bottle and
-  # from-source installs of the same formula within the same operation
-  # doesn't make sense.
-  self.class.fetched.find do |fetched_formula|
-    fetched_formula.full_name == formula.full_name && fetched_formula.active_spec_sym == formula.active_spec_sym
-  end
-end
-
-
- -
-

- - #problem_if_output(output) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - output - - - (String, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-1331
-1332
-1333
-1334
-1335
-1336
-
-
# File 'formula_installer.rb', line 1331
-
-def problem_if_output(output)
-  return unless output
-
-  opoo output
-  @show_summary_heading = true
-end
-
-
- -
-

- - #quiet?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-221
-
-
# File 'sorbet/rbi/parlour.rbi', line 221
-
-def quiet?; end
-
-
- -
-

- - #runtime_requirements(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-562
-563
-564
-565
-566
-567
-568
-
-
# File 'formula_installer.rb', line 562
-
-def runtime_requirements(formula)
-  runtime_deps = formula.runtime_formula_dependencies(undeclared: false)
-  recursive_requirements = formula.recursive_requirements do |dependent, _|
-    Requirement.prune unless runtime_deps.include?(dependent)
-  end
-  (recursive_requirements.to_a + formula.requirements.to_a).reject(&:build?).uniq
-end
-
-
- -
-

- - #sanitized_argv_optionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-879
-880
-881
-882
-883
-884
-885
-886
-887
-888
-889
-890
-891
-892
-893
-894
-895
-896
-897
-898
-899
-900
-901
-902
-903
-904
-905
-906
-907
-908
-909
-
-
# File 'formula_installer.rb', line 879
-
-def sanitized_argv_options
-  args = []
-  args << "--ignore-dependencies" if ignore_deps?
-
-  if build_bottle?
-    args << "--build-bottle"
-    args << "--bottle-arch=#{@bottle_arch}" if @bottle_arch
-  end
-
-  args << "--git" if git?
-  args << "--interactive" if interactive?
-  args << "--verbose" if verbose?
-  args << "--debug" if debug?
-  args << "--cc=#{@cc}" if @cc
-  args << "--keep-tmp" if keep_tmp?
-
-  if debug_symbols?
-    args << "--debug-symbols"
-    args << "--build-from-source"
-  end
-
-  if @env.present?
-    args << "--env=#{@env}"
-  elsif formula.env.std? || formula.deps.select(&:build?).any? { |d| d.name == "scons" }
-    args << "--env=std"
-  end
-
-  args << "--HEAD" if formula.head?
-
-  args
-end
-
-
- -
-

- - #show_header?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-185
-
-
# File 'sorbet/rbi/parlour.rbi', line 185
-
-def show_header?; end
-
-
- -
-

- - #show_summary_heading?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-182
-
-
# File 'sorbet/rbi/parlour.rbi', line 182
-
-def show_summary_heading?; end
-
-
- -
-

- - #skip_post_install?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-148
-149
-150
-
-
# File 'formula_installer.rb', line 148
-
-def skip_post_install?
-  @skip_post_install.present?
-end
-
-
- -
-

- - #summaryString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-866
-867
-868
-869
-870
-871
-872
-
-
# File 'formula_installer.rb', line 866
-
-def summary
-  s = +""
-  s << "#{Homebrew::EnvConfig.install_badge}  " unless Homebrew::EnvConfig.no_emoji?
-  s << "#{formula.prefix.resolved_path}: #{formula.prefix.abv}"
-  s << ", built in #{pretty_duration build_time}" if build_time
-  s.freeze
-end
-
-
- -
-

- - #unbottled_dependencies(deps) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-530
-531
-532
-533
-534
-535
-536
-
-
# File 'formula_installer.rb', line 530
-
-def unbottled_dependencies(deps)
-  deps.map { |(dep, _options)| dep.to_formula }.reject do |dep_f|
-    next false unless dep_f.pour_bottle?
-
-    dep_f.bottled?
-  end
-end
-
-
- -
-

- - #verbose?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-215
-
-
# File 'sorbet/rbi/parlour.rbi', line 215
-
-def verbose?; end
-
-
- -
-

- - #verify_deps_existvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-
-
# File 'formula_installer.rb', line 229
-
-def verify_deps_exist
-  begin
-    compute_dependencies
-  rescue TapFormulaUnavailableError => e
-    raise if e.tap.installed?
-
-    e.tap.ensure_installed!
-    retry if e.tap.installed? # It may have not installed if it's a core tap.
-  end
-rescue FormulaUnavailableError => e
-  e.dependent = formula.full_name
-  raise
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaLock.html b/docs/FormulaLock.html deleted file mode 100644 index 00f23d699..000000000 --- a/docs/FormulaLock.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - Class: FormulaLock - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: FormulaLock - - - Private -

-
- -
-
Inherits:
-
- LockFile - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lock_file.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A lock file for a formula.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from LockFile

-

#path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from LockFile

-

#lock, #unlock, #with_lock

-
-

Constructor Details

- -
-

- - #initialize(name) ⇒ FormulaLock - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaLock.

- - -
-
-
- - -
- - - - -
-
-
-
-54
-55
-56
-
-
# File 'lock_file.rb', line 54
-
-def initialize(name)
-  super("#{name}.formula")
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaOrCaskUnavailableError.html b/docs/FormulaOrCaskUnavailableError.html deleted file mode 100644 index cebb8a303..000000000 --- a/docs/FormulaOrCaskUnavailableError.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - Exception: FormulaOrCaskUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaOrCaskUnavailableError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when neither a formula nor a cask with the given name is available.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #name ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name) ⇒ FormulaOrCaskUnavailableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaOrCaskUnavailableError.

- - -
-
-
- - -
- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-
-
# File 'exceptions.rb', line 89
-
-def initialize(name)
-  super()
-
-  @name = name
-
-  # Store the state of these envs at the time the exception is thrown.
-  # This is so we do the fuzzy search for "did you mean" etc under that same mode,
-  # in case the list of formulae are different.
-  @without_api = Homebrew::EnvConfig.no_install_from_api?
-  @auto_without_api = Homebrew::EnvConfig.automatically_set_no_install_from_api?
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-87
-88
-89
-
-
# File 'exceptions.rb', line 87
-
-def name
-  @name
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #did_you_meanString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-102
-103
-104
-105
-106
-107
-108
-109
-
-
# File 'exceptions.rb', line 102
-
-def did_you_mean
-  require "formula"
-
-  similar_formula_names = Homebrew.with_no_api_env_if_needed(@without_api) { Formula.fuzzy_search(name) }
-  return "" if similar_formula_names.blank?
-
-  "Did you mean #{similar_formula_names.to_sentence two_words_connector: " or ", last_word_connector: " or "}?"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaOrCaskUnspecifiedError.html b/docs/FormulaOrCaskUnspecifiedError.html deleted file mode 100644 index c23df0ce8..000000000 --- a/docs/FormulaOrCaskUnspecifiedError.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - Exception: FormulaOrCaskUnspecifiedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaOrCaskUnspecifiedError - - - Private -

-
- -
-
Inherits:
-
- UsageError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a command expects a formula or cask and none was specified.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from UsageError

-

#reason

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initializeFormulaOrCaskUnspecifiedError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaOrCaskUnspecifiedError.

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-
-
# File 'exceptions.rb', line 36
-
-def initialize
-  super "this command requires a formula or cask argument"
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaPin.html b/docs/FormulaPin.html deleted file mode 100644 index b5ae3f5b5..000000000 --- a/docs/FormulaPin.html +++ /dev/null @@ -1,717 +0,0 @@ - - - - - - - Class: FormulaPin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: FormulaPin - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formula_pin.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper functions for pinning a formula.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(formula) ⇒ FormulaPin - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaPin.

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'formula_pin.rb', line 8
-
-def initialize(formula)
-  @formula = formula
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'formula_pin.rb', line 12
-
-def path
-  HOMEBREW_PINNED_KEGS/@formula.name
-end
-
-
- -
-

- - #pinObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-
-
# File 'formula_pin.rb', line 22
-
-def pin
-  latest_keg = @formula.installed_kegs.max_by(&:scheme_and_version)
-  return if latest_keg.nil?
-
-  pin_at(latest_keg.version)
-end
-
-
- -
-

- - #pin_at(version) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-
-
# File 'formula_pin.rb', line 16
-
-def pin_at(version)
-  HOMEBREW_PINNED_KEGS.mkpath
-  version_path = @formula.rack/version
-  path.make_relative_symlink(version_path) if !pinned? && version_path.exist?
-end
-
-
- -
-

- - #pinnable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'formula_pin.rb', line 38
-
-def pinnable?
-  !@formula.installed_prefixes.empty?
-end
-
-
- -
-

- - #pinned?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'formula_pin.rb', line 34
-
-def pinned?
-  path.symlink?
-end
-
-
- -
-

- - #pinned_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'formula_pin.rb', line 42
-
-def pinned_version
-  Keg.new(path.resolved_path).version if pinned?
-end
-
-
- -
-

- - #unpinObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-32
-
-
# File 'formula_pin.rb', line 29
-
-def unpin
-  path.unlink if pinned?
-  HOMEBREW_PINNED_KEGS.rmdir_if_possible
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaSpecificationError.html b/docs/FormulaSpecificationError.html deleted file mode 100644 index 7ce065196..000000000 --- a/docs/FormulaSpecificationError.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - Exception: FormulaSpecificationError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaSpecificationError - - - -

-
- -
-
Inherits:
-
- StandardError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- - - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaUnavailableError.html b/docs/FormulaUnavailableError.html deleted file mode 100644 index d41f6eb7c..000000000 --- a/docs/FormulaUnavailableError.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - Exception: FormulaUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaUnavailableError - - - -

-
- -
-
Inherits:
-
- FormulaOrCaskUnavailableError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of an internal API. - This class may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula is not available.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from FormulaOrCaskUnavailableError

-

#name

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaOrCaskUnavailableError

-

#did_you_mean, #initialize

- -
-

Constructor Details

- -

This class inherits a constructor from FormulaOrCaskUnavailableError

- -
- -
-

Instance Attribute Details

- - - -
-

- - #dependentObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-142
-143
-144
-
-
# File 'exceptions.rb', line 142
-
-def dependent
-  @dependent
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #dependent_sString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-145
-146
-147
-
-
# File 'exceptions.rb', line 145
-
-def dependent_s
-  " (dependency of #{dependent})" if dependent && dependent != name
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaUnknownPythonError.html b/docs/FormulaUnknownPythonError.html deleted file mode 100644 index 55e056f8c..000000000 --- a/docs/FormulaUnknownPythonError.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - Exception: FormulaUnknownPythonError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaUnknownPythonError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raise when the Python version cannot be detected automatically.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula) ⇒ FormulaUnknownPythonError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaUnknownPythonError.

- - -
-
-
- - -
- - - - -
-
-
-
-432
-433
-434
-435
-436
-437
-438
-439
-440
-
-
# File 'exceptions.rb', line 432
-
-def initialize(formula)
-  super <<~EOS
-    The version of Python to use with the virtualenv in the `#{formula.full_name}` formula
-    cannot be guessed automatically because a recognised Python dependency could not be found.
-
-    If you are using a non-standard Python dependency, please add `:using => "python@x.y"`
-    to 'virtualenv_install_with_resources' to resolve the issue manually.
-  EOS
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaUnreadableError.html b/docs/FormulaUnreadableError.html deleted file mode 100644 index f5f9d21c1..000000000 --- a/docs/FormulaUnreadableError.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - Exception: FormulaUnreadableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaUnreadableError - - - Private -

-
- -
-
Inherits:
-
- FormulaUnavailableError - - - show all - -
-
- - - - - - -
-
Includes:
-
FormulaUnreadableErrorModule
-
- - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula is unreadable.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from FormulaUnreadableErrorModule

-

#formula_error

- - - -

Attributes inherited from FormulaUnavailableError

-

#dependent

- - - -

Attributes inherited from FormulaOrCaskUnavailableError

-

#name

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - -

Methods inherited from FormulaUnavailableError

-

#dependent_s

- - - - - - - - - -

Methods inherited from FormulaOrCaskUnavailableError

-

#did_you_mean

- -
-

Constructor Details

- -
-

- - #initialize(name, error) ⇒ FormulaUnreadableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaUnreadableError.

- - -
-
-
- - -
- - - - -
-
-
-
-212
-213
-214
-215
-216
-
-
# File 'exceptions.rb', line 212
-
-def initialize(name, error)
-  super(name)
-  @formula_error = error
-  set_backtrace(error.backtrace)
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaUnreadableErrorModule.html b/docs/FormulaUnreadableErrorModule.html deleted file mode 100644 index bf6a996c6..000000000 --- a/docs/FormulaUnreadableErrorModule.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - Module: FormulaUnreadableErrorModule - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: FormulaUnreadableErrorModule - - - Private -

-
- - - - - - - - - -
-
Included in:
-
FormulaUnreadableError, TapFormulaUnreadableError
-
- - - -
-
Defined in:
-
exceptions.rb,
- exceptions.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #formula_errorObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-200
-201
-202
-
-
# File 'exceptions.rb', line 200
-
-def formula_error
-  @formula_error
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaUnspecifiedError.html b/docs/FormulaUnspecifiedError.html deleted file mode 100644 index 58b917764..000000000 --- a/docs/FormulaUnspecifiedError.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - Exception: FormulaUnspecifiedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaUnspecifiedError - - - Private -

-
- -
-
Inherits:
-
- UsageError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a command expects a formula and none was specified.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from UsageError

-

#reason

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initializeFormulaUnspecifiedError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaUnspecifiedError.

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'exceptions.rb', line 29
-
-def initialize
-  super "this command requires a formula argument"
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaValidationError.html b/docs/FormulaValidationError.html deleted file mode 100644 index 9d2fa7d67..000000000 --- a/docs/FormulaValidationError.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - Exception: FormulaValidationError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: FormulaValidationError - - - Private -

-
- -
-
Inherits:
-
- StandardError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when an invalid attribute is used in a formula.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula, attr, value) ⇒ FormulaValidationError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaValidationError.

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-
-
# File 'exceptions.rb', line 71
-
-def initialize(formula, attr, value)
-  @attr = attr
-  @formula = formula
-  super "invalid attribute for formula '#{formula}': #{attr} (#{value.inspect})"
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #attrObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'exceptions.rb', line 69
-
-def attr
-  @attr
-end
-
-
- - - -
-

- - #formulaObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'exceptions.rb', line 69
-
-def formula
-  @formula
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/FormulaVersions.html b/docs/FormulaVersions.html deleted file mode 100644 index 6bb5d587b..000000000 --- a/docs/FormulaVersions.html +++ /dev/null @@ -1,526 +0,0 @@ - - - - - - - Class: FormulaVersions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: FormulaVersions - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Context
-
- - - - - - -
-
Defined in:
-
formula_versions.rb
-
- -
- -

Overview

-
-

- This class is part of an internal API. - This class may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for traversing a formula's previous versions.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
IGNORED_EXCEPTIONS = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  ArgumentError, NameError, SyntaxError, TypeError,
-  FormulaSpecificationError, FormulaValidationError,
-  ErrorDuringExecution, LoadError, MethodDeprecatedError
-].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(formula) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'formula_versions.rb', line 19
-
-def initialize(formula)
-  @name = formula.name
-  @path = formula.path
-  @repository = T.must(formula.tap).path
-  @relative_path = @path.relative_path_from(repository).to_s
-  # Also look at e.g. older homebrew-core paths before sharding.
-  if (match = @relative_path.match(%r{^(HomebrewFormula|Formula)/([a-z]|lib)/(.+)}))
-    @old_relative_path = "#{match[1]}/#{match[3]}"
-  end
-  @formula_at_revision = {}
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #formula_at_revision(revision, formula_relative_path = relative_path, &_block) ⇒ T.type_parameter(:U)? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - revision - - - (String) - - - -
  • - -
  • - - formula_relative_path - - - (String) - - - (defaults to: relative_path) - - -
  • - -
  • - - _block - - - (T.proc.params(arg0: Formula).returns(T.type_parameter(:U))) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.type_parameter(:U), nil) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'formula_versions.rb', line 50
-
-def formula_at_revision(revision, formula_relative_path = relative_path, &_block)
-  Homebrew.raise_deprecation_exceptions = true
-
-  yield @formula_at_revision[revision] ||= begin
-    contents = file_contents_at_revision(revision, formula_relative_path)
-    nostdout { Formulary.from_contents(name, path, contents, ignore_errors: true) }
-  end
-rescue *IGNORED_EXCEPTIONS => e
-  # We rescue these so that we can skip bad versions and
-  # continue walking the history
-  odebug "#{e} in #{name} at revision #{revision}", Utils::Backtrace.clean(e)
-rescue FormulaUnavailableError
-  nil
-ensure
-  Homebrew.raise_deprecation_exceptions = false
-end
-
-
- -
-

- - #rev_list(branch) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'formula_versions.rb', line 31
-
-def rev_list(branch)
-  repository.cd do
-    rev_list_cmd = ["git", "rev-list", "--abbrev-commit", "--remove-empty"]
-    [relative_path, old_relative_path].compact.each do |entry|
-      Utils.popen_read(*rev_list_cmd, branch, "--", entry) do |io|
-        yield [io.readline.chomp, entry] until io.eof?
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary.html b/docs/Formulary.html deleted file mode 100644 index d8b5b0291..000000000 --- a/docs/Formulary.html +++ /dev/null @@ -1,3952 +0,0 @@ - - - - - - - Module: Formulary - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Formulary - - - Private -

-
- - - - -
-
Extended by:
-
Cachable, Context
-
- - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
formulary.rb,
- formulary.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: PathnameWriteMkpath - - - - Classes: FormulaContentsLoader, FormulaLoader, FromAPILoader, FromBottleLoader, FromCacheLoader, FromKegLoader, FromNameLoader, FromPathLoader, FromTapLoader, FromURILoader, NullLoader - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, debug?, quiet?, verbose?, with_context

- - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .canonical_name(ref) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1157
-1158
-1159
-1160
-1161
-1162
-1163
-
-
# File 'formulary.rb', line 1157
-
-def self.canonical_name(ref)
-  loader_for(ref).name
-rescue TapFormulaAmbiguityError
-  # If there are multiple tap formulae with the name of ref,
-  # then ref is the canonical name
-  ref.downcase
-end
-
-
- -
-

- - .class_s(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-520
-521
-522
-523
-524
-525
-526
-
-
# File 'formulary.rb', line 520
-
-def self.class_s(name)
-  class_name = name.capitalize
-  class_name.gsub!(/[-_.\s]([a-zA-Z0-9])/) { T.must(Regexp.last_match(1)).upcase }
-  class_name.tr!("+", "x")
-  class_name.sub!(/(.)@(\d)/, "\\1AT\\2")
-  class_name
-end
-
-
- -
-

- - .clear_cacheObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-
-
# File 'formulary.rb', line 59
-
-def self.clear_cache
-  platform_cache.each do |type, cached_objects|
-    next if type == :formulary_factory
-
-    cached_objects.each_value do |klass|
-      class_name = klass.name
-
-      # Already removed from namespace.
-      next if class_name.nil?
-
-      namespace = Utils.deconstantize(class_name)
-      next if Utils.deconstantize(namespace) != name
-
-      remove_const(Utils.demodulize(namespace).to_sym)
-    end
-  end
-
-  super
-end
-
-
- -
-

- - .convert_to_string_or_symbol(string) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-528
-529
-530
-531
-532
-
-
# File 'formulary.rb', line 528
-
-def self.convert_to_string_or_symbol(string)
-  return string[1..].to_sym if string.start_with?(":")
-
-  string
-end
-
-
- -
-

- - .core_path(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1234
-1235
-1236
-
-
# File 'formulary.rb', line 1234
-
-def self.core_path(name)
-  find_formula_in_tap(name.to_s.downcase, CoreTap.instance)
-end
-
-
- -
-

- - .enable_factory_cache!void - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Enable the factory cache.

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'formulary.rb', line 31
-
-def self.enable_factory_cache!
-  @factory_cache = true
-end
-
-
- -
-

- - .ensure_utf8_encoding(io) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-516
-517
-518
-
-
# File 'formulary.rb', line 516
-
-def self.ensure_utf8_encoding(io)
-  io.set_encoding(Encoding::UTF_8)
-end
-
-
- -
-

- - .factory(ref, spec = :stable, alias_path: nil, from: T.unsafe(nil), warn: T.unsafe(nil), force_bottle: T.unsafe(nil), flags: T.unsafe(nil), ignore_errors: T.unsafe(nil)) ⇒ Formula - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return a Formula instance for the given reference. -ref is a string containing:

- -
    -
  • a formula name
  • -
  • a formula pathname
  • -
  • a formula URL
  • -
  • a local bottle reference
  • -
- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (Pathname, String) - - - -
  • - -
  • - - spec - - - (Symbol) - - - (defaults to: :stable) - - -
  • - -
  • - - alias_path - - - (nil, Pathname, String) - - - (defaults to: nil) - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - force_bottle - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - flags - - - (Array<String>) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - ignore_errors - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-987
-988
-989
-990
-991
-992
-993
-994
-995
-996
-997
-998
-999
-1000
-1001
-1002
-1003
-1004
-1005
-1006
-1007
-1008
-1009
-1010
-1011
-1012
-1013
-1014
-1015
-1016
-1017
-
-
# File 'formulary.rb', line 987
-
-def self.factory(
-  ref,
-  spec = :stable,
-  alias_path: nil,
-  from: T.unsafe(nil),
-  warn: T.unsafe(nil),
-  force_bottle: T.unsafe(nil),
-  flags: T.unsafe(nil),
-  ignore_errors: T.unsafe(nil)
-)
-  cache_key = "#{ref}-#{spec}-#{alias_path}-#{from}"
-  if factory_cached? && platform_cache[:formulary_factory]&.key?(cache_key)
-    return platform_cache[:formulary_factory][cache_key]
-  end
-
-  loader_options = { from:, warn: }.compact
-  formula_options = { alias_path:,
-                      force_bottle:,
-                      flags:,
-                      ignore_errors: }.compact
-
-  formula = loader_for(ref, **loader_options)
-            .get_formula(spec, **formula_options)
-
-  if factory_cached?
-    platform_cache[:formulary_factory] ||= {}
-    platform_cache[:formulary_factory][cache_key] ||= formula
-  end
-
-  formula
-end
-
-
- -
-

- - .factory_cached?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'formulary.rb', line 35
-
-def self.factory_cached?
-  !@factory_cache.nil?
-end
-
-
- -
-

- - .find_formula_in_tap(name, tap) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - tap - - - (Tap) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1239
-1240
-1241
-1242
-1243
-1244
-1245
-1246
-1247
-
-
# File 'formulary.rb', line 1239
-
-def self.find_formula_in_tap(name, tap)
-  filename = if name.end_with?(".rb")
-    name
-  else
-    "#{name}.rb"
-  end
-
-  tap.formula_files_by_name.fetch(name, tap.formula_dir/filename)
-end
-
-
- -
-

- - .formula_class_defined_from_api?(name) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'formulary.rb', line 47
-
-def self.formula_class_defined_from_api?(name)
-  platform_cache.key?(:api) && platform_cache[:api].key?(name)
-end
-
-
- -
-

- - .formula_class_defined_from_path?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'formulary.rb', line 43
-
-def self.formula_class_defined_from_path?(path)
-  platform_cache.key?(:path) && platform_cache[:path].key?(path)
-end
-
-
- -
-

- - .formula_class_get_from_api(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-55
-56
-57
-
-
# File 'formulary.rb', line 55
-
-def self.formula_class_get_from_api(name)
-  platform_cache[:api].fetch(name)
-end
-
-
- -
-

- - .formula_class_get_from_path(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'formulary.rb', line 51
-
-def self.formula_class_get_from_path(path)
-  platform_cache[:path].fetch(path)
-end
-
-
- -
-

- - .from_contents(name, path, contents, spec = :stable, alias_path: T.unsafe(nil), force_bottle: T.unsafe(nil), flags: T.unsafe(nil), ignore_errors: T.unsafe(nil)) ⇒ Formula - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return a Formula instance directly from contents.

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - path - - - (Pathname) - - - -
  • - -
  • - - contents - - - (String) - - - -
  • - -
  • - - spec - - - (Symbol) - - - (defaults to: :stable) - - -
  • - -
  • - - alias_path - - - (Pathname) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - force_bottle - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - flags - - - (Array<String>) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - ignore_errors - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1125
-1126
-1127
-1128
-1129
-1130
-1131
-1132
-1133
-1134
-1135
-1136
-1137
-1138
-1139
-1140
-1141
-1142
-
-
# File 'formulary.rb', line 1125
-
-def self.from_contents(
-  name,
-  path,
-  contents,
-  spec = :stable,
-  alias_path: T.unsafe(nil),
-  force_bottle: T.unsafe(nil),
-  flags: T.unsafe(nil),
-  ignore_errors: T.unsafe(nil)
-)
-  options = {
-    alias_path:,
-    force_bottle:,
-    flags:,
-    ignore_errors:,
-  }.compact
-  FormulaContentsLoader.new(name, path, contents).get_formula(spec, **options)
-end
-
-
- -
-

- - .from_keg(keg, spec = T.unsafe(nil), alias_path: T.unsafe(nil), force_bottle: T.unsafe(nil), flags: T.unsafe(nil)) ⇒ Formula - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return a Formula instance for the given keg.

- - -
-
-
-

Parameters:

-
    - -
  • - - keg - - - (Keg) - - - -
  • - -
  • - - spec - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - alias_path - - - (Pathname, String) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - force_bottle - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - flags - - - (Array<String>) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1075
-1076
-1077
-1078
-1079
-1080
-1081
-1082
-1083
-1084
-1085
-1086
-1087
-1088
-1089
-1090
-1091
-1092
-1093
-1094
-1095
-1096
-1097
-1098
-1099
-1100
-1101
-1102
-1103
-1104
-1105
-1106
-1107
-1108
-1109
-1110
-
-
# File 'formulary.rb', line 1075
-
-def self.from_keg(
-  keg,
-  spec = T.unsafe(nil),
-  alias_path: T.unsafe(nil),
-  force_bottle: T.unsafe(nil),
-  flags: T.unsafe(nil)
-)
-  tab = keg.tab
-  tap = tab.tap
-  spec ||= tab.spec
-
-  formula_name = keg.rack.basename.to_s
-
-  options = {
-    alias_path:,
-    from:         :keg,
-    warn:         false,
-    force_bottle:,
-    flags:,
-  }.compact
-
-  f = if tap.nil?
-    factory(formula_name, spec, **options)
-  else
-    begin
-      factory("#{tap}/#{formula_name}", spec, **options)
-    rescue FormulaUnavailableError
-      # formula may be migrated to different tap. Try to search in core and all taps.
-      factory(formula_name, spec, **options)
-    end
-  end
-  f.build = tab
-  T.cast(f.build, Tab).used_options = Tab.remap_deprecated_options(f.deprecated_options, tab.used_options).as_flags
-  f.version.update_commit(keg.version.version.commit) if f.head? && keg.version.head?
-  f
-end
-
-
- -
-

- - .from_rack(rack, spec = T.unsafe(nil), alias_path: T.unsafe(nil), force_bottle: T.unsafe(nil), flags: T.unsafe(nil)) ⇒ Formula - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return a Formula instance for the given rack.

- - -
-
-
-

Parameters:

-
    - -
  • - - rack - - - (Pathname) - - - -
  • - -
  • - - spec - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - - — -

    when nil, will auto resolve the formula's spec.

    -
    - -
  • - -
  • - - alias_path - - - (Pathname, String) - - - (defaults to: T.unsafe(nil)) - - - — -

    will be used if the formula is found not to be -installed and discarded if it is installed because the alias_path used -to install the formula will be set instead.

    -
    - -
  • - -
  • - - force_bottle - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - flags - - - (Array<String>) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1035
-1036
-1037
-1038
-1039
-1040
-1041
-1042
-1043
-1044
-1045
-1046
-1047
-1048
-1049
-1050
-1051
-1052
-1053
-1054
-1055
-
-
# File 'formulary.rb', line 1035
-
-def self.from_rack(
-  rack, spec = T.unsafe(nil),
-  alias_path: T.unsafe(nil),
-  force_bottle: T.unsafe(nil),
-  flags: T.unsafe(nil)
-)
-  kegs = rack.directory? ? rack.subdirs.map { |d| Keg.new(d) } : []
-  keg = kegs.find(&:linked?) || kegs.find(&:optlinked?) || kegs.max_by(&:scheme_and_version)
-
-  options = {
-    alias_path:,
-    force_bottle:,
-    flags:,
-  }.compact
-
-  if keg
-    from_keg(keg, *spec, **options)
-  else
-    factory(rack.basename.to_s, *spec, from: :rack, warn: false, **options)
-  end
-end
-
-
- -
-

- - .keg_only?(rack) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return whether given rack is keg-only.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1058
-1059
-1060
-1061
-1062
-
-
# File 'formulary.rb', line 1058
-
-def self.keg_only?(rack)
-  Formulary.from_rack(rack).keg_only?
-rescue FormulaUnavailableError, TapFormulaAmbiguityError
-  false
-end
-
-
- -
-

- - .load_formula(name, path, contents, namespace, flags:, ignore_errors:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-
-
# File 'formulary.rb', line 93
-
-def self.load_formula(name, path, contents, namespace, flags:, ignore_errors:)
-  raise "Formula loading disabled by HOMEBREW_DISABLE_LOAD_FORMULA!" if Homebrew::EnvConfig.disable_load_formula?
-
-  require "formula"
-  require "ignorable"
-
-  mod = Module.new
-  remove_const(namespace) if const_defined?(namespace)
-  const_set(namespace, mod)
-
-  eval_formula = lambda do
-    # Set `BUILD_FLAGS` in the formula's namespace so we can
-    # access them from within the formula's class scope.
-    mod.const_set(:BUILD_FLAGS, flags)
-    mod.module_eval(contents, path)
-  rescue NameError, ArgumentError, ScriptError, MethodDeprecatedError, MacOSVersion::Error => e
-    if e.is_a?(Ignorable::ExceptionMixin)
-      e.ignore
-    else
-      remove_const(namespace)
-      raise FormulaUnreadableError.new(name, e)
-    end
-  end
-  if ignore_errors
-    Ignorable.hook_raise(&eval_formula)
-  else
-    eval_formula.call
-  end
-
-  class_name = class_s(name)
-
-  begin
-    mod.const_get(class_name)
-  rescue NameError => e
-    class_list = mod.constants
-                    .map { |const_name| mod.const_get(const_name) }
-                    .select { |const| const.is_a?(Class) }
-    new_exception = FormulaClassUnavailableError.new(name, path, class_name, class_list)
-    remove_const(namespace)
-    raise new_exception, "", e.backtrace
-  end
-end
-
-
- -
-

- - .load_formula_from_api(name, flags:) ⇒ T.class_of(Formula) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (T.class_of(Formula)) - - - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-
-
# File 'formulary.rb', line 156
-
-def self.load_formula_from_api(name, flags:)
-  namespace = :"FormulaNamespaceAPI#{namespace_key(name)}"
-
-  mod = Module.new
-  remove_const(namespace) if const_defined?(namespace)
-  const_set(namespace, mod)
-
-  mod.const_set(:BUILD_FLAGS, flags)
-
-  class_name = class_s(name)
-  json_formula = Homebrew::API::Formula.all_formulae[name]
-  raise FormulaUnavailableError, name if json_formula.nil?
-
-  json_formula = Homebrew::API.merge_variations(json_formula)
-
-  uses_from_macos_names = json_formula.fetch("uses_from_macos", []).map do |dep|
-    next dep unless dep.is_a? Hash
-
-    dep.keys.first
-  end
-
-  requirements = {}
-  json_formula["requirements"]&.map do |req|
-    req_name = req["name"].to_sym
-    next if API_SUPPORTED_REQUIREMENTS.exclude?(req_name)
-
-    req_version = case req_name
-    when :arch
-      req["version"]&.to_sym
-    when :macos, :maximum_macos
-      MacOSVersion::SYMBOLS.key(req["version"])
-    else
-      req["version"]
-    end
-
-    req_tags = []
-    req_tags << req_version if req_version.present?
-    req_tags += req["contexts"]&.map do |tag|
-      case tag
-      when String
-        tag.to_sym
-      when Hash
-        tag.deep_transform_keys(&:to_sym)
-      else
-        tag
-      end
-    end
-
-    spec_hash = req_tags.empty? ? req_name : { req_name => req_tags }
-
-    specs = req["specs"]
-    specs ||= ["stable", "head"] # backwards compatibility
-    specs.each do |spec|
-      requirements[spec.to_sym] ||= []
-      requirements[spec.to_sym] << spec_hash
-    end
-  end
-
-  add_deps = if Homebrew::API.internal_json_v3?
-    lambda do |deps|
-      T.bind(self, SoftwareSpec)
-
-      deps&.each do |name, info|
-        tags = case info&.dig("tags")
-        in Array => tag_list
-          tag_list.map(&:to_sym)
-        in String => tag
-          tag.to_sym
-        else
-          nil
-        end
-
-        if info&.key?("uses_from_macos")
-          bounds = info["uses_from_macos"].dup || {}
-          bounds.deep_transform_keys!(&:to_sym)
-          bounds.deep_transform_values!(&:to_sym)
-
-          if tags
-            uses_from_macos name => tags, **bounds
-          else
-            uses_from_macos name, **bounds
-          end
-        elsif tags
-          depends_on name => tags
-        else
-          depends_on name
-        end
-      end
-    end
-  else
-    lambda do |spec|
-      T.bind(self, SoftwareSpec)
-
-      dep_json = json_formula.fetch("#{spec}_dependencies", json_formula)
-
-      dep_json["dependencies"]&.each do |dep|
-        # Backwards compatibility check - uses_from_macos used to be a part of dependencies on Linux
-        next if !json_formula.key?("uses_from_macos_bounds") && uses_from_macos_names.include?(dep) &&
-                !Homebrew::SimulateSystem.simulating_or_running_on_macos?
-
-        depends_on dep
-      end
-
-      [:build, :test, :recommended, :optional].each do |type|
-        dep_json["#{type}_dependencies"]&.each do |dep|
-          # Backwards compatibility check - uses_from_macos used to be a part of dependencies on Linux
-          next if !json_formula.key?("uses_from_macos_bounds") && uses_from_macos_names.include?(dep) &&
-                  !Homebrew::SimulateSystem.simulating_or_running_on_macos?
-
-          depends_on dep => type
-        end
-      end
-
-      dep_json["uses_from_macos"]&.each_with_index do |dep, index|
-        bounds = dep_json.fetch("uses_from_macos_bounds", [])[index].dup || {}
-        bounds.deep_transform_keys!(&:to_sym)
-        bounds.deep_transform_values!(&:to_sym)
-
-        if dep.is_a?(Hash)
-          uses_from_macos dep.deep_transform_values(&:to_sym).merge(bounds)
-        else
-          uses_from_macos dep, bounds
-        end
-      end
-    end
-  end
-
-  klass = Class.new(::Formula) do
-    @loaded_from_api = true
-
-    desc json_formula["desc"]
-    homepage json_formula["homepage"]
-    license SPDX.string_to_license_expression(json_formula["license"])
-    revision json_formula.fetch("revision", 0)
-    version_scheme json_formula.fetch("version_scheme", 0)
-
-    if (urls_stable = json_formula["urls"]["stable"].presence)
-      stable do
-        url_spec = {
-          tag:      urls_stable["tag"],
-          revision: urls_stable["revision"],
-          using:    urls_stable["using"]&.to_sym,
-        }.compact
-        url urls_stable["url"], **url_spec
-        version Homebrew::API.internal_json_v3? ? json_formula["version"] : json_formula["versions"]["stable"]
-        sha256 urls_stable["checksum"] if urls_stable["checksum"].present?
-
-        if Homebrew::API.internal_json_v3?
-          instance_exec(json_formula["dependencies"], &add_deps)
-        else
-          instance_exec(:stable, &add_deps)
-        end
-
-        requirements[:stable]&.each do |req|
-          depends_on req
-        end
-      end
-    end
-
-    if (urls_head = json_formula["urls"]["head"].presence)
-      head do
-        url_spec = {
-          branch: urls_head["branch"],
-          using:  urls_head["using"]&.to_sym,
-        }.compact
-        url urls_head["url"], **url_spec
-
-        if Homebrew::API.internal_json_v3?
-          instance_exec(json_formula["head_dependencies"], &add_deps)
-        else
-          instance_exec(:head, &add_deps)
-        end
-
-        requirements[:head]&.each do |req|
-          depends_on req
-        end
-      end
-    end
-
-    bottles_stable = if Homebrew::API.internal_json_v3?
-      json_formula["bottle"]
-    else
-      json_formula["bottle"]["stable"]
-    end.presence
-
-    if bottles_stable
-      bottle do
-        if Homebrew::EnvConfig.bottle_domain == HOMEBREW_BOTTLE_DEFAULT_DOMAIN
-          root_url HOMEBREW_BOTTLE_DEFAULT_DOMAIN
-        else
-          root_url Homebrew::EnvConfig.bottle_domain
-        end
-        rebuild bottles_stable["rebuild"]
-        bottles_stable["files"].each do |tag, bottle_spec|
-          cellar = Formulary.convert_to_string_or_symbol bottle_spec["cellar"]
-          sha256 cellar:, tag.to_sym => bottle_spec["sha256"]
-        end
-      end
-    end
-
-    if (pour_bottle_only_if = json_formula["pour_bottle_only_if"])
-      pour_bottle? only_if: pour_bottle_only_if.to_sym
-    end
-
-    if (keg_only_reason = json_formula["keg_only_reason"].presence)
-      reason = Formulary.convert_to_string_or_symbol keg_only_reason["reason"]
-      keg_only reason, keg_only_reason["explanation"]
-    end
-
-    if (deprecation_date = json_formula["deprecation_date"].presence)
-      reason = DeprecateDisable.to_reason_string_or_symbol json_formula["deprecation_reason"], type: :formula
-      deprecate! date: deprecation_date, because: reason
-    end
-
-    if (disable_date = json_formula["disable_date"].presence)
-      reason = DeprecateDisable.to_reason_string_or_symbol json_formula["disable_reason"], type: :formula
-      disable! date: disable_date, because: reason
-    end
-
-    json_formula["conflicts_with"]&.each_with_index do |conflict, index|
-      conflicts_with conflict, because: json_formula.dig("conflicts_with_reasons", index)
-    end
-
-    json_formula["link_overwrite"]&.each do |overwrite_path|
-      link_overwrite overwrite_path
-    end
-
-    def install
-      raise "Cannot build from source from abstract formula."
-    end
-
-    @post_install_defined_boolean = json_formula["post_install_defined"]
-    @post_install_defined_boolean = true if @post_install_defined_boolean.nil? # Backwards compatibility
-    def post_install_defined?
-      self.class.instance_variable_get(:@post_install_defined_boolean)
-    end
-
-    if (service_hash = json_formula["service"].presence)
-      service_hash = Homebrew::Service.from_hash(service_hash)
-      service do
-        T.bind(self, Homebrew::Service)
-
-        if (run_params = service_hash.delete(:run).presence)
-          case run_params
-          when Hash
-            run(**run_params)
-          when Array, String
-            run run_params
-          end
-        end
-
-        if (name_params = service_hash.delete(:name).presence)
-          name(**name_params)
-        end
-
-        service_hash.each do |key, arg|
-          public_send(key, arg)
-        end
-      end
-    end
-
-    @caveats_string = json_formula["caveats"]
-    def caveats
-      self.class.instance_variable_get(:@caveats_string)
-          &.gsub(HOMEBREW_PREFIX_PLACEHOLDER, HOMEBREW_PREFIX)
-          &.gsub(HOMEBREW_CELLAR_PLACEHOLDER, HOMEBREW_CELLAR)
-          &.gsub(HOMEBREW_HOME_PLACEHOLDER, Dir.home)
-    end
-
-    @tap_git_head_string = if Homebrew::API.internal_json_v3?
-      Homebrew::API::Formula.tap_git_head
-    else
-      json_formula["tap_git_head"]
-    end
-
-    def tap_git_head
-      self.class.instance_variable_get(:@tap_git_head_string)
-    end
-
-    unless Homebrew::API.internal_json_v3?
-      @oldnames_array = json_formula["oldnames"] || [json_formula["oldname"]].compact
-      def oldnames
-        self.class.instance_variable_get(:@oldnames_array)
-      end
-
-      @aliases_array = json_formula.fetch("aliases", [])
-      def aliases
-        self.class.instance_variable_get(:@aliases_array)
-      end
-    end
-
-    @versioned_formulae_array = json_formula.fetch("versioned_formulae", [])
-    def versioned_formulae_names
-      self.class.instance_variable_get(:@versioned_formulae_array)
-    end
-
-    @ruby_source_path_string = json_formula["ruby_source_path"]
-    def ruby_source_path
-      self.class.instance_variable_get(:@ruby_source_path_string)
-    end
-
-    @ruby_source_checksum_string = json_formula.dig("ruby_source_checksum", "sha256")
-    @ruby_source_checksum_string ||= json_formula["ruby_source_sha256"]
-    def ruby_source_checksum
-      checksum = self.class.instance_variable_get(:@ruby_source_checksum_string)
-      Checksum.new(checksum) if checksum
-    end
-  end
-
-  mod.const_set(class_name, klass)
-
-  platform_cache[:api] ||= {}
-  platform_cache[:api][name] = klass
-end
-
-
- -
-

- - .load_formula_from_path(name, path, flags:, ignore_errors:) ⇒ T.class_of(Formula) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - path - - - (Pathname) - - - -
  • - -
  • - - flags - - - (Array<String>) - - - -
  • - -
  • - - ignore_errors - - - (Boolean) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.class_of(Formula)) - - - -
  • - -
- -
- - - - -
-
-
-
-147
-148
-149
-150
-151
-152
-153
-
-
# File 'formulary.rb', line 147
-
-def self.load_formula_from_path(name, path, flags:, ignore_errors:)
-  contents = path.open("r") { |f| ensure_utf8_encoding(f).read }
-  namespace = "FormulaNamespace#{namespace_key(path.to_s)}"
-  klass = load_formula(name, path, contents, namespace, flags:, ignore_errors:)
-  platform_cache[:path] ||= {}
-  platform_cache[:path][path] = klass
-end
-
-
- -
-

- - .loader_for(ref, from: T.unsafe(nil), warn: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1213
-1214
-1215
-1216
-1217
-1218
-1219
-1220
-1221
-1222
-1223
-1224
-1225
-1226
-1227
-1228
-1229
-1230
-1231
-1232
-
-
# File 'formulary.rb', line 1213
-
-def self.loader_for(ref, from: T.unsafe(nil), warn: true)
-  options = { from:, warn: }.compact
-
-  [
-    FromBottleLoader,
-    FromURILoader,
-    FromAPILoader,
-    FromTapLoader,
-    FromPathLoader,
-    FromNameLoader,
-    FromKegLoader,
-    FromCacheLoader,
-    NullLoader,
-  ].each do |loader_class|
-    if (loader = loader_class.try_new(ref, **options))
-      $stderr.puts "#{$PROGRAM_NAME} (#{loader_class}): loading #{ref}" if debug?
-      return loader
-    end
-  end
-end
-
-
- -
-

- - .namespace_key(identifier) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - identifier - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-137
-138
-139
-140
-141
-
-
# File 'formulary.rb', line 137
-
-def self.namespace_key(identifier)
-  Digest::SHA2.hexdigest(
-    "#{Homebrew::SimulateSystem.current_os}_#{Homebrew::SimulateSystem.current_arch}:#{identifier}",
-  )
-end
-
-
- -
-

- - .path(ref) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1165
-1166
-1167
-
-
# File 'formulary.rb', line 1165
-
-def self.path(ref)
-  loader_for(ref).path
-end
-
-
- -
-

- - .platform_cacheObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'formulary.rb', line 39
-
-def self.platform_cache
-  cache["#{Homebrew::SimulateSystem.current_os}_#{Homebrew::SimulateSystem.current_arch}"] ||= {}
-end
-
-
- -
-

- - .resolve(name, spec: T.unsafe(nil), force_bottle: T.unsafe(nil), flags: T.unsafe(nil)) ⇒ Formula - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - spec - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - force_bottle - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - flags - - - (Array<String>) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-
-
# File 'formulary.rb', line 472
-
-def self.resolve(
-  name,
-  spec: T.unsafe(nil),
-  force_bottle: T.unsafe(nil),
-  flags: T.unsafe(nil)
-)
-  options = {
-    force_bottle:,
-    flags:,
-  }.compact
-
-  if name.include?("/") || File.exist?(name)
-    f = factory(name, *spec, **options)
-    if f.any_version_installed?
-      tab = Tab.for_formula(f)
-      resolved_spec = spec || tab.spec
-      f.active_spec = resolved_spec if f.send(resolved_spec)
-      f.build = tab
-      if f.head? && tab.tabfile
-        k = Keg.new(tab.tabfile.parent)
-        f.version.update_commit(k.version.version.commit) if k.version.head?
-      end
-    end
-  else
-    rack = to_rack(name)
-    if (alias_path = factory(name, **options).alias_path)
-      options[:alias_path] = alias_path
-    end
-    f = from_rack(rack, *spec, **options)
-  end
-
-  # If this formula was installed with an alias that has since changed,
-  # then it was specified explicitly in ARGV. (Using the alias would
-  # instead have found the new formula.)
-  #
-  # Because of this, the user is referring to this specific formula,
-  # not any formula targeted by the same alias, so in this context
-  # the formula shouldn't be considered outdated if the alias used to
-  # install it has changed.
-  f.follow_installed_alias = false
-
-  f
-end
-
-
- -
-

- - .tap_formula_name_type(tapped_name, warn:) ⇒ Array(String, Tap, [Symbol, nil])? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tapped_name - - - (String) - - - -
  • - -
  • - - warn - - - (Boolean) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-1170
-1171
-1172
-1173
-1174
-1175
-1176
-1177
-1178
-1179
-1180
-1181
-1182
-1183
-1184
-1185
-1186
-1187
-1188
-1189
-1190
-1191
-1192
-1193
-1194
-1195
-1196
-1197
-1198
-1199
-1200
-1201
-1202
-1203
-1204
-1205
-1206
-1207
-1208
-1209
-1210
-1211
-
-
# File 'formulary.rb', line 1170
-
-def self.tap_formula_name_type(tapped_name, warn:)
-  return unless (tap_with_name = Tap.with_formula_name(tapped_name))
-
-  tap, name = tap_with_name
-
-  type = nil
-
-  # FIXME: Remove the need to do this here.
-  alias_table_key = tap.core_tap? ? name : "#{tap}/#{name}"
-
-  if (possible_alias = tap.alias_table[alias_table_key].presence)
-    # FIXME: Remove the need to split the name and instead make
-    #        the alias table only contain short names.
-    name = T.must(possible_alias.split("/").last)
-    type = :alias
-  elsif (new_name = tap.formula_renames[name].presence)
-    old_name = tap.core_tap? ? name : tapped_name
-    name = new_name
-    new_name = tap.core_tap? ? name : "#{tap}/#{name}"
-    type = :rename
-  elsif (new_tap_name = tap.tap_migrations[name].presence)
-    new_tap, new_name = Tap.with_formula_name(new_tap_name) || [Tap.fetch(new_tap_name), name]
-    new_tap.ensure_installed!
-    new_tapped_name = "#{new_tap}/#{new_name}"
-
-    if tapped_name == new_tapped_name
-      opoo "Tap migration for #{tapped_name} points to itself, stopping recursion."
-    else
-      old_name = tap.core_tap? ? name : tapped_name
-      return unless (name_tap_type = tap_formula_name_type(new_tapped_name, warn: false))
-
-      name, tap, = name_tap_type
-
-      new_name = new_tap.core_tap? ? name : "#{tap}/#{name}"
-      type = :migration
-    end
-  end
-
-  opoo "Formula #{old_name} was renamed to #{new_name}." if warn && old_name && new_name
-
-  [name, tap, type]
-end
-
-
- -
-

- - .to_rack(ref) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1144
-1145
-1146
-1147
-1148
-1149
-1150
-1151
-1152
-1153
-1154
-1155
-
-
# File 'formulary.rb', line 1144
-
-def self.to_rack(ref)
-  # If using a fully-scoped reference, check if the formula can be resolved.
-  factory(ref) if ref.include? "/"
-
-  # Check whether the rack with the given name exists.
-  if (rack = HOMEBREW_CELLAR/File.basename(ref, ".rb")).directory?
-    return rack.resolved_path
-  end
-
-  # Use canonical name to locate rack.
-  (HOMEBREW_CELLAR/canonical_name(ref)).resolved_path
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FormulaContentsLoader.html b/docs/Formulary/FormulaContentsLoader.html deleted file mode 100644 index a4bc970a6..000000000 --- a/docs/Formulary/FormulaContentsLoader.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - Class: Formulary::FormulaContentsLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FormulaContentsLoader - - - Private -

-
- -
-
Inherits:
-
- FormulaLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Load formulae directly from their contents.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #contents ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    The formula's contents.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from FormulaLoader

-

#alias_path, #name, #path, #tap

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaLoader

-

#get_formula

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(name, path, contents) ⇒ FormulaContentsLoader - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaContentsLoader.

- - -
-
-
- - -
- - - - -
-
-
-
-900
-901
-902
-903
-
-
# File 'formulary.rb', line 900
-
-def initialize(name, path, contents)
-  @contents = contents
-  super name, path
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #contentsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The formula's contents.

- - -
-
-
- - -
- - - - -
-
-
-
-898
-899
-900
-
-
# File 'formulary.rb', line 898
-
-def contents
-  @contents
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #klass(flags:, ignore_errors:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-905
-906
-907
-908
-
-
# File 'formulary.rb', line 905
-
-def klass(flags:, ignore_errors:)
-  namespace = "FormulaNamespace#{Digest::MD5.hexdigest(contents.to_s)}"
-  Formulary.load_formula(name, path, contents, namespace, flags:, ignore_errors:)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FormulaLoader.html b/docs/Formulary/FormulaLoader.html deleted file mode 100644 index 9d4dc97b2..000000000 --- a/docs/Formulary/FormulaLoader.html +++ /dev/null @@ -1,800 +0,0 @@ - - - - - - - Class: Formulary::FormulaLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FormulaLoader - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Context
-
- - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A FormulaLoader returns instances of formulae. -Subclasses implement loaders for particular sources of formulae.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #alias_path ⇒ Pathname? - - - - - - - - readonly - - - - - - - private - -

    The name used to install the formula.

    -
    - -
  • - - - -
  • - - - #name ⇒ String - - - - - - - - readonly - - - - - - - private - -

    The formula's name.

    -
    - -
  • - - - -
  • - - - #path ⇒ Pathname - - - - - - - - readonly - - - - - - - private - -

    The formula file's path.

    -
    - -
  • - - - -
  • - - - #tap ⇒ Tap? - - - - - - - - readonly - - - - - - - private - -

    The formula's tap (nil if it should be implicitly determined).

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(name, path, alias_path: T.unsafe(nil), tap: T.unsafe(nil)) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - path - - - (Pathname) - - - -
  • - -
  • - - alias_path - - - (Pathname) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - tap - - - (Tap) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- - -
- - - - -
-
-
-
-556
-557
-558
-559
-560
-561
-
-
# File 'formulary.rb', line 556
-
-def initialize(name, path, alias_path: T.unsafe(nil), tap: T.unsafe(nil))
-  @name = name
-  @path = path
-  @alias_path = alias_path
-  @tap = tap
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #alias_pathPathname? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The name used to install the formula.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-549
-550
-551
-
-
# File 'formulary.rb', line 549
-
-def alias_path
-  @alias_path
-end
-
-
- - - -
-

- - #nameString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The formula's name.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-541
-542
-543
-
-
# File 'formulary.rb', line 541
-
-def name
-  @name
-end
-
-
- - - -
-

- - #pathPathname (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The formula file's path.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-545
-546
-547
-
-
# File 'formulary.rb', line 545
-
-def path
-  @path
-end
-
-
- - - -
-

- - #tapTap? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The formula's tap (nil if it should be implicitly determined).

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Tap, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-553
-554
-555
-
-
# File 'formulary.rb', line 553
-
-def tap
-  @tap
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #get_formula(spec, alias_path: nil, force_bottle: false, flags: [], ignore_errors: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the formula instance. -alias_path can be overridden here in case an alias was used to refer to -a formula that was loaded in another way.

- - -
-
-
- - -
- - - - -
-
-
-
-566
-567
-568
-569
-570
-
-
# File 'formulary.rb', line 566
-
-def get_formula(spec, alias_path: nil, force_bottle: false, flags: [], ignore_errors: false)
-  alias_path ||= self.alias_path
-  klass(flags:, ignore_errors:)
-    .new(name, path, spec, alias_path:, tap:, force_bottle:)
-end
-
-
- -
-

- - #klass(flags:, ignore_errors:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-572
-573
-574
-575
-
-
# File 'formulary.rb', line 572
-
-def klass(flags:, ignore_errors:)
-  load_file(flags:, ignore_errors:) unless Formulary.formula_class_defined_from_path?(path)
-  Formulary.formula_class_get_from_path(path)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FromAPILoader.html b/docs/Formulary/FromAPILoader.html deleted file mode 100644 index 37e830fca..000000000 --- a/docs/Formulary/FromAPILoader.html +++ /dev/null @@ -1,550 +0,0 @@ - - - - - - - Class: Formulary::FromAPILoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FromAPILoader - - - Private -

-
- -
-
Inherits:
-
- FormulaLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Load a formula from the API.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FormulaLoader

-

#alias_path, #name, #path, #tap

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaLoader

-

#get_formula

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(name, tap: T.unsafe(nil), alias_name: T.unsafe(nil)) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - tap - - - (Tap) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - alias_name - - - (String) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- - -
- - - - -
-
-
-
-945
-946
-947
-948
-949
-950
-951
-952
-
-
# File 'formulary.rb', line 945
-
-def initialize(name, tap: T.unsafe(nil), alias_name: T.unsafe(nil))
-  options = {
-    alias_path: (CoreTap.instance.alias_dir/alias_name if alias_name),
-    tap:,
-  }.compact
-
-  super(name, Formulary.core_path(name), **options)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, from: T.unsafe(nil), warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, URI::Generic) - - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-917
-918
-919
-920
-921
-922
-923
-924
-925
-926
-927
-928
-929
-930
-931
-932
-933
-934
-935
-936
-937
-938
-939
-940
-941
-942
-
-
# File 'formulary.rb', line 917
-
-def self.try_new(ref, from: T.unsafe(nil), warn: false)
-  return if Homebrew::EnvConfig.no_install_from_api?
-  return unless ref.is_a?(String)
-  return unless (name = ref[HOMEBREW_DEFAULT_TAP_FORMULA_REGEX, :name])
-  if !Homebrew::API::Formula.all_formulae.key?(name) &&
-     !Homebrew::API::Formula.all_aliases.key?(name) &&
-     !Homebrew::API::Formula.all_renames.key?(name)
-    return
-  end
-
-  alias_name = name
-
-  ref = "#{CoreTap.instance}/#{name}"
-
-  return unless (name_tap_type = Formulary.tap_formula_name_type(ref, warn:))
-
-  name, tap, type = name_tap_type
-
-  options =  if type == :alias
-    { alias_name: alias_name.downcase }
-  else
-    {}
-  end
-
-  new(name, tap:, **options)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #klass(flags:, ignore_errors:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-954
-955
-956
-957
-
-
# File 'formulary.rb', line 954
-
-def klass(flags:, ignore_errors:)
-  load_from_api(flags:) unless Formulary.formula_class_defined_from_api?(name)
-  Formulary.formula_class_get_from_api(name)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FromBottleLoader.html b/docs/Formulary/FromBottleLoader.html deleted file mode 100644 index 8029b3c7c..000000000 --- a/docs/Formulary/FromBottleLoader.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - - Class: Formulary::FromBottleLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FromBottleLoader - - - Private -

-
- -
-
Inherits:
-
- FormulaLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a formula from a bottle.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FormulaLoader

-

#alias_path, #name, #path, #tap

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaLoader

-

#klass

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(bottle_name) ⇒ FromBottleLoader - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FromBottleLoader.

- - -
-
-
- - -
- - - - -
-
-
-
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-
-
# File 'formulary.rb', line 598
-
-def initialize(bottle_name)
-  case bottle_name
-  when URL_START_REGEX
-    # The name of the formula is found between the last slash and the last hyphen.
-    formula_name = File.basename(bottle_name)[/(.+)-/, 1]
-    resource = Resource.new(formula_name) { url bottle_name }
-    resource.specs[:bottle] = true
-    downloader = resource.downloader
-    cached = downloader.cached_location.exist?
-    downloader.fetch
-    ohai "Pouring the cached bottle" if cached
-    @bottle_filename = downloader.cached_location
-  else
-    @bottle_filename = Pathname(bottle_name).realpath
-  end
-  name, full_name = Utils::Bottles.resolve_formula_names @bottle_filename
-  super name, Formulary.path(full_name)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, from: T.unsafe(nil), warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, URI::Generic) - - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-592
-593
-594
-595
-596
-
-
# File 'formulary.rb', line 592
-
-def self.try_new(ref, from: T.unsafe(nil), warn: false)
-  ref = ref.to_s
-
-  new(ref) if HOMEBREW_BOTTLES_EXTNAME_REGEX.match?(ref)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #get_formula(spec, force_bottle: false, flags: [], ignore_errors: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-
-
# File 'formulary.rb', line 617
-
-def get_formula(spec, force_bottle: false, flags: [], ignore_errors: false, **)
-  formula = begin
-    contents = Utils::Bottles.formula_contents(@bottle_filename, name:)
-    Formulary.from_contents(name, path, contents, spec, force_bottle:,
-                            flags:, ignore_errors:)
-  rescue FormulaUnreadableError => e
-    opoo <<~EOS
-      Unreadable formula in #{@bottle_filename}:
-      #{e}
-    EOS
-    super
-  rescue BottleFormulaUnavailableError => e
-    opoo <<~EOS
-      #{e}
-      Falling back to non-bottle formula.
-    EOS
-    super
-  end
-  formula.local_bottle_path = @bottle_filename
-  formula
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FromCacheLoader.html b/docs/Formulary/FromCacheLoader.html deleted file mode 100644 index ab97c953c..000000000 --- a/docs/Formulary/FromCacheLoader.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - Class: Formulary::FromCacheLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FromCacheLoader - - - Private -

-
- -
-
Inherits:
-
- FormulaLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a formula from a cached formula file.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FormulaLoader

-

#alias_path, #name, #path, #tap

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaLoader

-

#get_formula, #initialize, #klass

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -

This class inherits a constructor from Formulary::FormulaLoader

- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, from: T.unsafe(nil), warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, URI::Generic) - - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-863
-864
-865
-866
-867
-868
-869
-
-
# File 'formulary.rb', line 863
-
-def self.try_new(ref, from: T.unsafe(nil), warn: false)
-  ref = ref.to_s
-
-  return unless (cached_formula = HOMEBREW_CACHE_FORMULA/"#{ref}.rb").file?
-
-  new(ref, cached_formula)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FromKegLoader.html b/docs/Formulary/FromKegLoader.html deleted file mode 100644 index 574b4eba2..000000000 --- a/docs/Formulary/FromKegLoader.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - Class: Formulary::FromKegLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FromKegLoader - - - Private -

-
- -
-
Inherits:
-
- FormulaLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a formula from a formula file in a keg.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FormulaLoader

-

#alias_path, #name, #path, #tap

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaLoader

-

#get_formula, #initialize, #klass

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -

This class inherits a constructor from Formulary::FormulaLoader

- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, from: T.unsafe(nil), warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, URI::Generic) - - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-848
-849
-850
-851
-852
-853
-854
-
-
# File 'formulary.rb', line 848
-
-def self.try_new(ref, from: T.unsafe(nil), warn: false)
-  ref = ref.to_s
-
-  return unless (keg_formula = HOMEBREW_PREFIX/"opt/#{ref}/.brew/#{ref}.rb").file?
-
-  new(ref, keg_formula)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FromNameLoader.html b/docs/Formulary/FromNameLoader.html deleted file mode 100644 index 472e64ad2..000000000 --- a/docs/Formulary/FromNameLoader.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - - Class: Formulary::FromNameLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FromNameLoader - - - Private -

-
- -
-
Inherits:
-
- FromTapLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads a formula from a name, as long as it exists only in a single tap.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FromTapLoader

-

#path, #tap

- - - -

Attributes inherited from FormulaLoader

-

#alias_path, #name, #path, #tap

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FromTapLoader

-

#get_formula, #initialize, #load_file

- - - - - - - - - -

Methods inherited from FormulaLoader

-

#get_formula, #initialize, #klass

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -

This class inherits a constructor from Formulary::FromTapLoader

- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, from: T.unsafe(nil), warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, URI::Generic) - - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-816
-817
-818
-819
-820
-821
-822
-823
-824
-825
-826
-827
-828
-829
-830
-831
-832
-833
-834
-835
-836
-837
-838
-839
-
-
# File 'formulary.rb', line 816
-
-def self.try_new(ref, from: T.unsafe(nil), warn: false)
-  return unless ref.is_a?(String)
-  return unless ref.match?(/\A#{HOMEBREW_TAP_FORMULA_NAME_REGEX}\Z/o)
-
-  name = ref
-
-  # If it exists in the default tap, never treat it as ambiguous with another tap.
-  if (core_tap = CoreTap.instance).installed? &&
-     (loader = super("#{core_tap}/#{name}", warn:))&.path&.exist?
-    return loader
-  end
-
-  loaders = Tap.select { |tap| tap.installed? && !tap.core_tap? }
-               .filter_map { |tap| super("#{tap}/#{name}", warn:) }
-               .uniq(&:path)
-               .select { |tap| tap.path.exist? }
-
-  case loaders.count
-  when 1
-    loaders.first
-  when 2..Float::INFINITY
-    raise TapFormulaAmbiguityError.new(name, loaders)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FromPathLoader.html b/docs/Formulary/FromPathLoader.html deleted file mode 100644 index 94d49aab9..000000000 --- a/docs/Formulary/FromPathLoader.html +++ /dev/null @@ -1,515 +0,0 @@ - - - - - - - Class: Formulary::FromPathLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FromPathLoader - - - Private -

-
- -
-
Inherits:
-
- FormulaLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads formulae from disk using a path.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FormulaLoader

-

#alias_path, #name, #path, #tap

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaLoader

-

#get_formula, #klass

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(path, alias_path: T.unsafe(nil), tap: T.unsafe(nil)) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Pathname, String) - - - -
  • - -
  • - - alias_path - - - (Pathname) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - tap - - - (Tap) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- - -
- - - - -
-
-
-
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-700
-
-
# File 'formulary.rb', line 688
-
-def initialize(path, alias_path: T.unsafe(nil), tap: T.unsafe(nil))
-  path = Pathname(path).expand_path
-  name = path.basename(".rb").to_s
-  alias_path = alias_path&.expand_path
-  alias_dir = alias_path&.dirname
-
-  options = {
-    alias_path: (alias_path if alias_dir == tap&.alias_dir),
-    tap:,
-  }.compact
-
-  super(name, path, **options)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, from: T.unsafe(nil), warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, URI::Generic) - - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-646
-647
-648
-649
-650
-651
-652
-653
-654
-655
-656
-657
-658
-659
-660
-661
-662
-663
-664
-665
-666
-667
-668
-669
-670
-671
-672
-673
-674
-675
-676
-677
-678
-679
-680
-681
-682
-683
-684
-685
-
-
# File 'formulary.rb', line 646
-
-def self.try_new(ref, from: T.unsafe(nil), warn: false)
-  path = case ref
-  when String
-    Pathname(ref)
-  when Pathname
-    ref
-  else
-    return
-  end
-
-  return unless path.expand_path.exist?
-
-  options = if (tap = Tap.from_path(path))
-    # Only treat symlinks in taps as aliases.
-    if path.symlink?
-      alias_path = path
-      path = alias_path.resolved_path
-
-      {
-        alias_path:,
-        tap:,
-      }
-    else
-      {
-        tap:,
-      }
-    end
-  elsif (tap = Homebrew::API.tap_from_source_download(path))
-    # Don't treat cache symlinks as aliases.
-    {
-      tap:,
-    }
-  else
-    {}
-  end
-
-  return if path.extname != ".rb"
-
-  new(path, **options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FromTapLoader.html b/docs/Formulary/FromTapLoader.html deleted file mode 100644 index 7e505381b..000000000 --- a/docs/Formulary/FromTapLoader.html +++ /dev/null @@ -1,806 +0,0 @@ - - - - - - - Class: Formulary::FromTapLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FromTapLoader - - - Private -

-
- -
-
Inherits:
-
- FormulaLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads tapped formulae.

- - -
-
-
- - -
-

Direct Known Subclasses

-

FromNameLoader

-
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #path ⇒ Pathname - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #tap ⇒ Tap - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from FormulaLoader

-

#alias_path, #name

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaLoader

-

#klass

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(name, path, tap:, alias_name: T.unsafe(nil)) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - path - - - (Pathname) - - - -
  • - -
  • - - tap - - - (Tap) - - - -
  • - -
  • - - alias_name - - - (String) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- - -
- - - - -
-
-
-
-783
-784
-785
-786
-787
-788
-789
-790
-
-
# File 'formulary.rb', line 783
-
-def initialize(name, path, tap:, alias_name: T.unsafe(nil))
-  options = {
-    alias_path: (tap.alias_dir/alias_name if alias_name),
-    tap:,
-  }.compact
-
-  super(name, path, **options)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #pathPathname (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-758
-759
-760
-
-
# File 'formulary.rb', line 758
-
-def path
-  @path
-end
-
-
- - - -
-

- - #tapTap (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Tap) - - - -
  • - -
- -
- - - - -
-
-
-
-755
-756
-757
-
-
# File 'formulary.rb', line 755
-
-def tap
-  @tap
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, from: T.unsafe(nil), warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, URI::Generic) - - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-764
-765
-766
-767
-768
-769
-770
-771
-772
-773
-774
-775
-776
-777
-778
-779
-780
-
-
# File 'formulary.rb', line 764
-
-def self.try_new(ref, from: T.unsafe(nil), warn: false)
-  ref = ref.to_s
-
-  return unless (name_tap_type = Formulary.tap_formula_name_type(ref, warn:))
-
-  name, tap, type = name_tap_type
-  path = Formulary.find_formula_in_tap(name, tap)
-
-  options = if type == :alias
-    # TODO: Simplify this by making `tap_formula_name_type` return the alias name.
-    { alias_name: T.must(ref[HOMEBREW_TAP_FORMULA_REGEX, :name]).downcase }
-  else
-    {}
-  end
-
-  new(name, path, tap:, **options)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #get_formula(spec, alias_path: nil, force_bottle: false, flags: [], ignore_errors: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-792
-793
-794
-795
-796
-797
-798
-799
-800
-
-
# File 'formulary.rb', line 792
-
-def get_formula(spec, alias_path: nil, force_bottle: false, flags: [], ignore_errors: false)
-  super
-rescue FormulaUnreadableError => e
-  raise TapFormulaUnreadableError.new(tap, name, e.formula_error), "", e.backtrace
-rescue FormulaClassUnavailableError => e
-  raise TapFormulaClassUnavailableError.new(tap, name, e.path, e.class_name, e.class_list), "", e.backtrace
-rescue FormulaUnavailableError => e
-  raise TapFormulaUnavailableError.new(tap, name), "", e.backtrace
-end
-
-
- -
-

- - #load_file(flags:, ignore_errors:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-802
-803
-804
-805
-806
-807
-
-
# File 'formulary.rb', line 802
-
-def load_file(flags:, ignore_errors:)
-  super
-rescue MethodDeprecatedError => e
-  e.issues_url = tap.issues_url || tap.to_s
-  raise
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/FromURILoader.html b/docs/Formulary/FromURILoader.html deleted file mode 100644 index 6516b6571..000000000 --- a/docs/Formulary/FromURILoader.html +++ /dev/null @@ -1,628 +0,0 @@ - - - - - - - Class: Formulary::FromURILoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::FromURILoader - - - Private -

-
- -
-
Inherits:
-
- FormulaLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Loads formula from a URI.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #url ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from FormulaLoader

-

#alias_path, #name, #path, #tap

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaLoader

-

#get_formula, #klass

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(url, from: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (URI::Generic, String) - - - -
  • - -
  • - - from - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-718
-719
-720
-721
-722
-723
-724
-725
-726
-
-
# File 'formulary.rb', line 718
-
-def initialize(url, from: nil)
-  @url = url
-  @from = from
-  uri_path = URI(url).path
-  raise ArgumentError, "URL has no path component" unless uri_path
-
-  formula = File.basename(uri_path, ".rb")
-  super formula, HOMEBREW_CACHE_FORMULA/File.basename(uri_path)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #urlObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-715
-716
-717
-
-
# File 'formulary.rb', line 715
-
-def url
-  @url
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, from: T.unsafe(nil), warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, URI::Generic) - - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-709
-710
-711
-712
-713
-
-
# File 'formulary.rb', line 709
-
-def self.try_new(ref, from: T.unsafe(nil), warn: false)
-  ref = ref.to_s
-
-  new(ref, from:) if URL_START_REGEX.match?(ref)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #load_file(flags:, ignore_errors:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-728
-729
-730
-731
-732
-733
-734
-735
-736
-737
-738
-739
-740
-741
-742
-743
-744
-745
-746
-747
-748
-749
-
-
# File 'formulary.rb', line 728
-
-def load_file(flags:, ignore_errors:)
-  match = url.match(%r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(?:/Formula)?/(?<name>[\w+-.@]+).rb})
-  if match
-    raise UnsupportedInstallationMethod,
-          "Installation of #{match[:name]} from a GitHub commit URL is unsupported! " \
-          "`brew extract #{match[:name]}` to a stable tap on GitHub instead."
-  elsif url.match?(%r{^(https?|ftp)://})
-    raise UnsupportedInstallationMethod,
-          "Non-checksummed download of #{name} formula file from an arbitrary URL is unsupported! " \
-          "`brew extract` or `brew create` and `brew tap-new` to create a formula file in a tap " \
-          "on GitHub instead."
-  end
-  HOMEBREW_CACHE_FORMULA.mkpath
-  FileUtils.rm_f(path)
-  Utils::Curl.curl_download url, to: path
-  super
-rescue MethodDeprecatedError => e
-  if (match_data = url.match(%r{github.com/(?<user>[\w-]+)/(?<repo>[\w-]+)/}).presence)
-    e.issues_url = "https://github.com/#{match_data[:user]}/#{match_data[:repo]}/issues/new"
-  end
-  raise
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/NullLoader.html b/docs/Formulary/NullLoader.html deleted file mode 100644 index e80ae6843..000000000 --- a/docs/Formulary/NullLoader.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - - Class: Formulary::NullLoader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Formulary::NullLoader - - - Private -

-
- -
-
Inherits:
-
- FormulaLoader - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Pseudo-loader which will raise a FormulaUnavailableError when trying to load the corresponding formula.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from FormulaLoader

-

#alias_path, #name, #path, #tap

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaLoader

-

#klass

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(ref) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-885
-886
-887
-888
-
-
# File 'formulary.rb', line 885
-
-def initialize(ref)
-  name = File.basename(ref, ".rb")
-  super name, Formulary.core_path(name)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .try_new(ref, from: T.unsafe(nil), warn: false) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (String, Pathname, URI::Generic) - - - -
  • - -
  • - - from - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-878
-879
-880
-881
-882
-
-
# File 'formulary.rb', line 878
-
-def self.try_new(ref, from: T.unsafe(nil), warn: false)
-  return if ref.is_a?(URI::Generic)
-
-  new(ref)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #get_formulaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-890
-891
-892
-
-
# File 'formulary.rb', line 890
-
-def get_formula(*)
-  raise FormulaUnavailableError, name
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Formulary/PathnameWriteMkpath.html b/docs/Formulary/PathnameWriteMkpath.html deleted file mode 100644 index 6a69d4c75..000000000 --- a/docs/Formulary/PathnameWriteMkpath.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - Module: Formulary::PathnameWriteMkpath - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Formulary::PathnameWriteMkpath - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
formulary.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/FossilDownloadStrategy.html b/docs/FossilDownloadStrategy.html deleted file mode 100644 index b0076c1a3..000000000 --- a/docs/FossilDownloadStrategy.html +++ /dev/null @@ -1,505 +0,0 @@ - - - - - - - Class: FossilDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: FossilDownloadStrategy - - - -

-
- -
-
Inherits:
-
- VCSDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a Fossil repository.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from VCSDownloadStrategy

-

VCSDownloadStrategy::REF_TYPES

- - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from VCSDownloadStrategy

-

#commit_outdated?, #fetch, #fetch_last_commit, #head?

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #quiet!, #quiet?, #shutup!, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ FossilDownloadStrategy - - - - - -

-
-

Returns a new instance of FossilDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-1393
-1394
-1395
-1396
-
-
# File 'download_strategy.rb', line 1393
-
-def initialize(url, name, version, **meta)
-  super
-  @url = @url.sub(%r{^fossil://}, "")
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #last_commitString - - - - - -

-
-

Return last commit's unique identifier for the repository.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1411
-1412
-1413
-1414
-
-
# File 'download_strategy.rb', line 1411
-
-def last_commit
-  out, = silent_command("fossil", args: ["info", "tip", "-R", cached_location])
-  out[/^uuid: +(\h+) .+$/, 1]
-end
-
-
- -
-

- - #repo_valid?Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1416
-1417
-1418
-
-
# File 'download_strategy.rb', line 1416
-
-def repo_valid?
-  silent_command("fossil", args: ["branch", "-R", cached_location]).success?
-end
-
-
- -
-

- - #source_modified_timeTime - - - - - -

-
-

Returns the most recent modified time for all files in the current working directory after stage.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-1402
-1403
-1404
-1405
-
-
# File 'download_strategy.rb', line 1402
-
-def source_modified_time
-  out, = silent_command("fossil", args: ["info", "tip", "-R", cached_location])
-  Time.parse(out[/^uuid: +\h+ (.+)$/, 1])
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitDownloadStrategy.html b/docs/GitDownloadStrategy.html deleted file mode 100644 index 263962bc4..000000000 --- a/docs/GitDownloadStrategy.html +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - Class: GitDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: GitDownloadStrategy - - - -

-
- -
-
Inherits:
-
- VCSDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a Git repository.

- - -
-
-
- - -
-

Direct Known Subclasses

-

GitHubGitDownloadStrategy

-
- - - -

Constant Summary

- -

Constants inherited - from VCSDownloadStrategy

-

VCSDownloadStrategy::REF_TYPES

- - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from VCSDownloadStrategy

-

#commit_outdated?, #fetch, #fetch_last_commit, #head?

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #quiet!, #quiet?, #shutup!, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ GitDownloadStrategy - - - - - -

-
-

Returns a new instance of GitDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-832
-833
-834
-835
-836
-837
-838
-839
-840
-841
-842
-843
-844
-845
-846
-
-
# File 'download_strategy.rb', line 832
-
-def initialize(url, name, version, **meta)
-  # Needs to be before the call to `super`, as the VCSDownloadStrategy's
-  # constructor calls `cache_tag` and sets the cache path.
-  @only_path = meta[:only_path]
-
-  if @only_path.present?
-    # "Cone" mode of sparse checkout requires patterns to be directories
-    @only_path = "/#{@only_path}" unless @only_path.start_with?("/")
-    @only_path = "#{@only_path}/" unless @only_path.end_with?("/")
-  end
-
-  super
-  @ref_type ||= :branch
-  @ref ||= "master"
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #last_commitString - - - - - -

-
-

Return last commit's unique identifier for the repository.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-861
-862
-863
-864
-
-
# File 'download_strategy.rb', line 861
-
-def last_commit
-  out, = silent_command("git", args: ["--git-dir", git_dir, "rev-parse", "--short=7", "HEAD"])
-  out.chomp
-end
-
-
- -
-

- - #source_modified_timeTime - - - - - -

-
-

Returns the most recent modified time for all files in the current working directory after stage.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-852
-853
-854
-855
-
-
# File 'download_strategy.rb', line 852
-
-def source_modified_time
-  out, = silent_command("git", args: ["--git-dir", git_dir, "show", "-s", "--format=%cD"])
-  Time.parse(out)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub.html b/docs/GitHub.html deleted file mode 100644 index b069df751..000000000 --- a/docs/GitHub.html +++ /dev/null @@ -1,5478 +0,0 @@ - - - - - - - Module: GitHub - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: GitHub - - - -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
utils/github.rb,
- utils/github/api.rb,
utils/github/actions.rb,
utils/github/artifacts.rb
-
-
- -
- -

Overview

-
-

- This module is part of an internal API. - This module may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

A module that interfaces with GitHub, code like PAT scopes, credential handling and API errors.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: API, Actions - - - - -

- - -

- Constant Summary - collapse -

- -
- -
MAXIMUM_OPEN_PRS = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
15
- -
API_URL = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"https://api.github.com"
- -
CREATE_GIST_SCOPES = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
["gist"].freeze
- -
CREATE_ISSUE_FORK_OR_PR_SCOPES = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
["repo"].freeze
- -
CREATE_WORKFLOW_SCOPES = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
["workflow"].freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .approved_reviews(user, repo, pull_request, commit: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-
-
# File 'utils/github.rb', line 192
-
-def self.approved_reviews(user, repo, pull_request, commit: nil)
-  query = <<~EOS
-    { repository(name: "#{repo}", owner: "#{user}") {
-        pullRequest(number: #{pull_request}) {
-          reviews(states: APPROVED, first: 100) {
-            nodes {
-              author {
-                ... on User { email login name databaseId }
-                ... on Organization { email login name databaseId }
-              }
-              authorAssociation
-              commit { oid }
-            }
-          }
-        }
-      }
-    }
-  EOS
-
-  result = API.open_graphql(query, scopes: ["user:email"])
-  reviews = result["repository"]["pullRequest"]["reviews"]["nodes"]
-
-  valid_associations = %w[MEMBER OWNER]
-  reviews.filter_map do |r|
-    next if commit.present? && commit != r["commit"]["oid"]
-    next unless valid_associations.include? r["authorAssociation"]
-
-    email = r["author"]["email"].presence ||
-            "#{r["author"]["databaseId"]}+#{r["author"]["login"]}@users.noreply.github.com"
-
-    name = r["author"]["name"].presence ||
-           r["author"]["login"]
-
-    {
-      "email" => email,
-      "name"  => name,
-      "login" => r["author"]["login"],
-    }
-  end
-end
-
-
- -
-

- - .branch_exists?(user, repo, branch) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-79
-80
-81
-82
-83
-
-
# File 'utils/github.rb', line 78
-
-def self.branch_exists?(user, repo, branch)
-  API.open_rest("#{API_URL}/repos/#{user}/#{repo}/branches/#{branch}")
-  true
-rescue API::HTTPNotFoundError
-  false
-end
-
-
- -
-

- - .check_for_duplicate_pull_requests(name, tap_remote_repo, state:, file:, quiet:, version: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-639
-640
-641
-642
-643
-644
-645
-646
-647
-648
-649
-650
-651
-652
-653
-654
-655
-656
-657
-658
-659
-660
-661
-662
-663
-664
-665
-666
-
-
# File 'utils/github.rb', line 639
-
-def self.check_for_duplicate_pull_requests(name, tap_remote_repo, state:, file:, quiet:, version: nil)
-  pull_requests = fetch_pull_requests(name, tap_remote_repo, state:, version:)
-
-  pull_requests.select! do |pr|
-    get_pull_request_changed_files(
-      tap_remote_repo, pr["number"]
-    ).any? { |f| f["filename"] == file }
-  end
-  return if pull_requests.blank?
-
-  duplicates_message = <<~EOS
-    These #{state} pull requests may be duplicates:
-    #{pull_requests.map { |pr| "#{pr["title"]} #{pr["html_url"]}" }.join("\n")}
-  EOS
-  error_message = <<~EOS
-    Duplicate PRs should not be opened.
-    Manually open these PRs if you are sure that they are not duplicates.
-  EOS
-
-  if quiet
-    odie error_message
-  else
-    odie <<~EOS
-      #{duplicates_message.chomp}
-      #{error_message}
-    EOS
-  end
-end
-
-
- -
-

- - .check_runs(repo: nil, commit: nil, pull_request: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-
-
# File 'utils/github.rb', line 16
-
-def self.check_runs(repo: nil, commit: nil, pull_request: nil)
-  if pull_request
-    repo = pull_request.fetch("base").fetch("repo").fetch("full_name")
-    commit = pull_request.fetch("head").fetch("sha")
-  end
-
-  API.open_rest(url_to("repos", repo, "commits", commit, "check-runs"))
-end
-
-
- -
-

- - .count_issues(query, **qualifiers) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'utils/github.rb', line 39
-
-def self.count_issues(query, **qualifiers)
-  search_results_count("issues", query, **qualifiers)
-end
-
-
- -
-

- - .count_repo_commits(nwo, user, from: nil, to: nil, max: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-863
-864
-865
-866
-867
-868
-869
-870
-871
-872
-873
-874
-875
-
-
# File 'utils/github.rb', line 863
-
-def self.count_repo_commits(nwo, user, from: nil, to: nil, max: nil)
-  odie "Cannot count commits, HOMEBREW_NO_GITHUB_API set!" if Homebrew::EnvConfig.no_github_api?
-
-  author_shas = repo_commits_for_user(nwo, user, "author", from, to, max)
-  committer_shas = repo_commits_for_user(nwo, user, "committer", from, to, max)
-  return [0, 0] if author_shas.blank? && committer_shas.blank?
-
-  author_count = author_shas.count
-  # Only count commits where the author and committer are different.
-  committer_count = committer_shas.difference(author_shas).count
-
-  [author_count, committer_count]
-end
-
-
- -
-

- - .create_bump_pr(info, args:) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-692
-693
-694
-695
-696
-697
-698
-699
-700
-701
-702
-703
-704
-705
-706
-707
-708
-709
-710
-711
-712
-713
-714
-715
-716
-717
-718
-719
-720
-721
-722
-723
-724
-725
-726
-727
-728
-729
-730
-731
-732
-733
-734
-735
-736
-737
-738
-739
-740
-741
-742
-743
-744
-745
-746
-747
-748
-749
-750
-751
-752
-753
-754
-755
-756
-757
-758
-759
-760
-761
-762
-763
-764
-765
-766
-767
-768
-769
-770
-771
-772
-773
-774
-775
-776
-777
-778
-779
-780
-781
-782
-783
-784
-
-
# File 'utils/github.rb', line 692
-
-def self.create_bump_pr(info, args:)
-  tap = info[:tap]
-  sourcefile_path = info[:sourcefile_path]
-  old_contents = info[:old_contents]
-  additional_files = info[:additional_files] || []
-  remote = info[:remote] || "origin"
-  remote_branch = info[:remote_branch] || tap.git_repository.origin_branch_name
-  branch = info[:branch_name]
-  commit_message = info[:commit_message]
-  previous_branch = info[:previous_branch] || "-"
-  tap_remote_repo = info[:tap_remote_repo] || tap.full_name
-  pr_message = info[:pr_message]
-
-  sourcefile_path.parent.cd do
-    git_dir = Utils.popen_read("git", "rev-parse", "--git-dir").chomp
-    shallow = !git_dir.empty? && File.exist?("#{git_dir}/shallow")
-    changed_files = [sourcefile_path]
-    changed_files += additional_files if additional_files.present?
-
-    if args.dry_run? || (args.write_only? && !args.commit?)
-      remote_url = if args.no_fork?
-        Utils.popen_read("git", "remote", "get-url", "--push", "origin").chomp
-      else
-        fork_message = "try to fork repository with GitHub API" \
-                       "#{" into `#{args.fork_org}` organization" if args.fork_org}"
-        ohai fork_message
-        "FORK_URL"
-      end
-      ohai "git fetch --unshallow origin" if shallow
-      ohai "git add #{changed_files.join(" ")}"
-      ohai "git checkout --no-track -b #{branch} #{remote}/#{remote_branch}"
-      ohai "git commit --no-edit --verbose --message='#{commit_message}' " \
-           "-- #{changed_files.join(" ")}"
-      ohai "git push --set-upstream #{remote_url} #{branch}:#{branch}"
-      ohai "git checkout --quiet #{previous_branch}"
-      ohai "create pull request with GitHub API (base branch: #{remote_branch})"
-    else
-
-      unless args.commit?
-        if args.no_fork?
-          remote_url = Utils.popen_read("git", "remote", "get-url", "--push", "origin").chomp
-          add_auth_token_to_url!(remote_url)
-          username = tap.user
-        else
-          begin
-            remote_url, username = forked_repo_info!(tap_remote_repo, org: args.fork_org)
-          rescue *API::ERRORS => e
-            sourcefile_path.atomic_write(old_contents)
-            odie "Unable to fork: #{e.message}!"
-          end
-        end
-
-        safe_system "git", "fetch", "--unshallow", "origin" if shallow
-      end
-
-      safe_system "git", "add", *changed_files
-      safe_system "git", "checkout", "--no-track", "-b", branch, "#{remote}/#{remote_branch}" unless args.commit?
-      safe_system "git", "commit", "--no-edit", "--verbose",
-                  "--message=#{commit_message}",
-                  "--", *changed_files
-      return if args.commit?
-
-      system_command!("git", args:         ["push", "--set-upstream", remote_url, "#{branch}:#{branch}"],
-                             print_stdout: true)
-      safe_system "git", "checkout", "--quiet", previous_branch
-      pr_message = <<~EOS
-        #{pr_message}
-      EOS
-      user_message = args.message
-      if user_message
-        pr_message = <<~EOS
-          #{user_message}
-
-          ---
-
-          #{pr_message}
-        EOS
-      end
-
-      begin
-        url = create_pull_request(tap_remote_repo, commit_message,
-                                  "#{username}:#{branch}", remote_branch, pr_message)["html_url"]
-        if args.no_browse?
-          puts url
-        else
-          exec_browser url
-        end
-      rescue *API::ERRORS => e
-        odie "Unable to open pull request: #{e.message}!"
-      end
-    end
-  end
-end
-
-
- -
-

- - .create_check_run(repo:, data:) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'utils/github.rb', line 25
-
-def self.create_check_run(repo:, data:)
-  API.open_rest(url_to("repos", repo, "check-runs"), data:)
-end
-
-
- -
-

- - .create_fork(repo, org: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-120
-121
-122
-123
-124
-125
-126
-
-
# File 'utils/github.rb', line 120
-
-def self.create_fork(repo, org: nil)
-  url = "#{API_URL}/repos/#{repo}/forks"
-  data = {}
-  data[:organization] = org if org
-  scopes = CREATE_ISSUE_FORK_OR_PR_SCOPES
-  API.open_rest(url, data:, scopes:)
-end
-
-
- -
-

- - .create_gist(files, description, private:) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-
-
# File 'utils/github.rb', line 43
-
-def self.create_gist(files, description, private:)
-  url = "#{API_URL}/gists"
-  data = { "public" => !private, "files" => files, "description" => description }
-  API.open_rest(url, data:, scopes: CREATE_GIST_SCOPES)["html_url"]
-end
-
-
- -
-

- - .create_issue(repo, title, body) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-
-
# File 'utils/github.rb', line 49
-
-def self.create_issue(repo, title, body)
-  url = "#{API_URL}/repos/#{repo}/issues"
-  data = { "title" => title, "body" => body }
-  API.open_rest(url, data:, scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES)["html_url"]
-end
-
-
- -
-

- - .create_or_update_release(user, repo, tag, id: nil, name: nil, body: nil, draft: false) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-
-
# File 'utils/github.rb', line 264
-
-def self.create_or_update_release(user, repo, tag, id: nil, name: nil, body: nil, draft: false)
-  url = "#{API_URL}/repos/#{user}/#{repo}/releases"
-  method = if id
-    url += "/#{id}"
-    :PATCH
-  else
-    :POST
-  end
-  data = {
-    tag_name: tag,
-    name:     name || tag,
-    draft:,
-  }
-  data[:body] = body if body.present?
-  API.open_rest(url, data:, request_method: method, scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES)
-end
-
-
- -
-

- - .create_pull_request(repo, title, head, base, body) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-139
-140
-141
-142
-143
-144
-
-
# File 'utils/github.rb', line 139
-
-def self.create_pull_request(repo, title, head, base, body)
-  url = "#{API_URL}/repos/#{repo}/pulls"
-  data = { title:, head:, base:, body:, maintainer_can_modify: true }
-  scopes = CREATE_ISSUE_FORK_OR_PR_SCOPES
-  API.open_rest(url, data:, scopes:)
-end
-
-
- -
-

- - .dispatch_event(user, repo, event, **payload) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-233
-234
-235
-236
-237
-238
-
-
# File 'utils/github.rb', line 233
-
-def self.dispatch_event(user, repo, event, **payload)
-  url = "#{API_URL}/repos/#{user}/#{repo}/dispatches"
-  API.open_rest(url, data:           { event_type: event, client_payload: payload },
-                     request_method: :POST,
-                     scopes:         CREATE_ISSUE_FORK_OR_PR_SCOPES)
-end
-
-
- -
-

- - .download_artifact(url, artifact_id) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Download an artifact from GitHub Actions and unpack it into the current working directory.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    URL to download from

    -
    - -
  • - -
  • - - artifact_id - - - (String) - - - - — -

    a value that uniquely identifies the downloaded artifact

    -
    - -
  • - -
- -

Raises:

- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'utils/github/artifacts.rb', line 13
-
-def self.download_artifact(url, artifact_id)
-  raise API::MissingAuthenticationError if API.credentials == :none
-
-  # We use a download strategy here to leverage the Homebrew cache
-  # to avoid repeated downloads of (possibly large) bottles.
-  token = API.credentials
-  downloader = GitHubArtifactDownloadStrategy.new(url, artifact_id, token:)
-  downloader.fetch
-  downloader.stage
-end
-
-
- -
-

- - .fetch_open_pull_requests(name, tap_remote_repo, version: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-592
-593
-594
-595
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-
-
# File 'utils/github.rb', line 592
-
-def self.fetch_open_pull_requests(name, tap_remote_repo, version: nil)
-  return [] if tap_remote_repo.blank?
-
-  # Bust the cache every three minutes.
-  cache_expiry = 3 * 60
-  cache_epoch = Time.now - (Time.now.to_i % cache_expiry)
-  cache_key = "#{tap_remote_repo}_#{cache_epoch.to_i}"
-
-  @open_pull_requests ||= {}
-  @open_pull_requests[cache_key] ||= begin
-    query = <<~EOS
-      query($owner: String!, $repo: String!, $states: [PullRequestState!], $after: String) {
-        repository(owner: $owner, name: $repo) {
-          pullRequests(states: $states, first: 100, after: $after) {
-            nodes {
-              number
-              title
-              url
-            }
-            pageInfo {
-              hasNextPage
-              endCursor
-            }
-          }
-        }
-      }
-    EOS
-    owner, repo = tap_remote_repo.split("/")
-    variables = { owner:, repo:, states: ["OPEN"] }
-
-    pull_requests = []
-    API.paginate_graphql(query, variables:) do |result|
-      data = result.dig("repository", "pullRequests")
-      pull_requests.concat(data["nodes"])
-      data["pageInfo"]
-    end
-    pull_requests
-  end
-
-  regex = pull_request_title_regex(name, version)
-  @open_pull_requests[cache_key].select { |pr| regex.match?(pr["title"]) }
-                                .map { |pr| pr.merge("html_url" => pr.delete("url")) }
-rescue API::RateLimitExceededError => e
-  opoo e.message
-  pull_requests || []
-end
-
-
- -
-

- - .fetch_pull_requests(name, tap_remote_repo, state: nil, version: nil) ⇒ Array<Hash{String => T.untyped}> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - tap_remote_repo - - - (String) - - - -
  • - -
  • - - state - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - version - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-567
-568
-569
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-
-
# File 'utils/github.rb', line 533
-
-def self.fetch_pull_requests(name, tap_remote_repo, state: nil, version: nil)
-  return [] if Homebrew::EnvConfig.no_github_api?
-
-  regex = pull_request_title_regex(name, version)
-  query = "is:pr #{name} #{version}".strip
-
-  # Unauthenticated users cannot use GraphQL so use search REST API instead.
-  # Limit for this is 30/minute so is usually OK unless you're spamming bump PRs (e.g. CI).
-  if API.credentials_type == :none
-    return issues_for_formula(query, tap_remote_repo:, state:).select do |pr|
-      pr["html_url"].include?("/pull/") && regex.match?(pr["title"])
-    end
-  elsif state == "open" && ENV["GITHUB_REPOSITORY_OWNER"] == "Homebrew"
-    # Try use PR API, which might be cheaper on rate limits in some cases.
-    # The rate limit of the search API under GraphQL is unclear as it
-    # costs the same as any other query according to /rate_limit.
-    # The PR API is also not very scalable so limit to Homebrew CI.
-    return fetch_open_pull_requests(name, tap_remote_repo, version:)
-  end
-
-  query += " repo:#{tap_remote_repo} in:title"
-  query += " state:#{state}" if state.present?
-  graphql_query = <<~EOS
-    query($query: String!, $after: String) {
-      search(query: $query, type: ISSUE, first: 100, after: $after) {
-        nodes {
-          ... on PullRequest {
-            number
-            title
-            url
-            state
-          }
-        }
-        pageInfo {
-          hasNextPage
-          endCursor
-        }
-      }
-    }
-  EOS
-  variables = { query: }
-
-  pull_requests = []
-  API.paginate_graphql(graphql_query, variables:) do |result|
-    data = result["search"]
-    pull_requests.concat(data["nodes"].select { |pr| regex.match?(pr["title"]) })
-    data["pageInfo"]
-  end
-  pull_requests.map! do |pr|
-    pr.merge({
-      "html_url" => pr.delete("url"),
-      "state"    => pr.fetch("state").downcase,
-    })
-  end
-rescue API::RateLimitExceededError => e
-  opoo e.message
-  pull_requests || []
-end
-
-
- -
-

- - .fork_exists?(repo, org: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-
-
# File 'utils/github.rb', line 128
-
-def self.fork_exists?(repo, org: nil)
-  _, reponame = repo.split("/")
-
-  username = org || API.open_rest(url_to("user")) { |json| json["login"] }
-  json = API.open_rest(url_to("repos", username, reponame))
-
-  return false if json["message"] == "Not Found"
-
-  true
-end
-
-
- -
-

- - .forked_repo_info!(tap_remote_repo, org: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-679
-680
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-
-
# File 'utils/github.rb', line 679
-
-def self.forked_repo_info!(tap_remote_repo, org: nil)
-  response = create_fork(tap_remote_repo, org:)
-  # GitHub API responds immediately but fork takes a few seconds to be ready.
-  sleep 1 until fork_exists?(tap_remote_repo, org:)
-  remote_url = if system("git", "config", "--local", "--get-regexp", "remote..*.url", "git@github.com:.*")
-    response.fetch("ssh_url")
-  else
-    add_auth_token_to_url!(response.fetch("clone_url"))
-  end
-  username = response.fetch("owner").fetch("login")
-  [remote_url, username]
-end
-
-
- -
-

- - .generate_release_notes(user, repo, tag, previous_tag: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-257
-258
-259
-260
-261
-262
-
-
# File 'utils/github.rb', line 257
-
-def self.generate_release_notes(user, repo, tag, previous_tag: nil)
-  url = "#{API_URL}/repos/#{user}/#{repo}/releases/generate-notes"
-  data = { tag_name: tag }
-  data[:previous_tag_name] = previous_tag if previous_tag.present?
-  API.open_rest(url, data:, request_method: :POST, scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES)
-end
-
-
- -
-

- - .get_artifact_urls(workflow_array) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-
-
# File 'utils/github.rb', line 340
-
-def self.get_artifact_urls(workflow_array)
-  check_suite, user, repo, pr, workflow_id, scopes, artifact_pattern = *workflow_array
-  if check_suite.empty?
-    raise API::Error, <<~EOS
-      No matching check suite found for these criteria!
-        Pull request: #{pr}
-        Workflow:     #{workflow_id}
-    EOS
-  end
-
-  status = check_suite.last["status"].sub("_", " ").downcase
-  if status != "completed"
-    raise API::Error, <<~EOS
-      The newest workflow run for ##{pr} is still #{status}!
-        #{Formatter.url check_suite.last["workflowRun"]["url"]}
-    EOS
-  end
-
-  run_id = check_suite.last["workflowRun"]["databaseId"]
-  artifacts = []
-  per_page = 50
-  API.paginate_rest("#{API_URL}/repos/#{user}/#{repo}/actions/runs/#{run_id}/artifacts",
-                    per_page:, scopes:) do |result|
-    result = result["artifacts"]
-    artifacts.concat(result)
-    break if result.length < per_page
-  end
-
-  matching_artifacts =
-    artifacts
-    .group_by { |art| art["name"] }
-    .select { |name| File.fnmatch?(artifact_pattern, name, File::FNM_EXTGLOB) }
-    .map { |_, arts| arts.last }
-
-  if matching_artifacts.empty?
-    raise API::Error, <<~EOS
-      No artifacts with the pattern `#{artifact_pattern}` were found!
-        #{Formatter.url check_suite.last["workflowRun"]["url"]}
-    EOS
-  end
-
-  matching_artifacts.map { |art| art["archive_download_url"] }
-end
-
-
- -
-

- - .get_latest_release(user, repo) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-252
-253
-254
-255
-
-
# File 'utils/github.rb', line 252
-
-def self.get_latest_release(user, repo)
-  url = "#{API_URL}/repos/#{user}/#{repo}/releases/latest"
-  API.open_rest(url, request_method: :GET)
-end
-
-
- -
-

- - .get_pull_request_changed_files(tap_remote_repo, pull_request) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-668
-669
-670
-
-
# File 'utils/github.rb', line 668
-
-def self.get_pull_request_changed_files(tap_remote_repo, pull_request)
-  API.open_rest(url_to("repos", tap_remote_repo, "pulls", pull_request, "files"))
-end
-
-
- -
-

- - .get_release(user, repo, tag) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-247
-248
-249
-250
-
-
# File 'utils/github.rb', line 247
-
-def self.get_release(user, repo, tag)
-  url = "#{API_URL}/repos/#{user}/#{repo}/releases/tags/#{tag}"
-  API.open_rest(url, request_method: :GET)
-end
-
-
- -
-

- - .get_repo_license(user, repo, ref: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-510
-511
-512
-513
-514
-515
-516
-517
-518
-519
-520
-521
-
-
# File 'utils/github.rb', line 510
-
-def self.get_repo_license(user, repo, ref: nil)
-  url = "#{API_URL}/repos/#{user}/#{repo}/license"
-  url += "?ref=#{ref}" if ref.present?
-  response = API.open_rest(url)
-  return unless response.key?("license")
-
-  response["license"]["spdx_id"]
-rescue API::HTTPNotFoundError
-  nil
-rescue API::AuthenticationFailedError => e
-  raise unless e.message.match?(API::GITHUB_IP_ALLOWLIST_ERROR)
-end
-
-
- -
-

- - .get_workflow_run(user, repo, pull_request, workflow_id: "tests.yml", artifact_pattern: "bottles{,_*}") ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-
-
# File 'utils/github.rb', line 287
-
-def self.get_workflow_run(user, repo, pull_request, workflow_id: "tests.yml", artifact_pattern: "bottles{,_*}")
-  scopes = CREATE_ISSUE_FORK_OR_PR_SCOPES
-
-  # GraphQL unfortunately has no way to get the workflow yml name, so we need an extra REST call.
-  workflow_api_url = "#{API_URL}/repos/#{user}/#{repo}/actions/workflows/#{workflow_id}"
-  workflow_payload = API.open_rest(workflow_api_url, scopes:)
-  workflow_id_num = workflow_payload["id"]
-
-  query = <<~EOS
-    query ($user: String!, $repo: String!, $pr: Int!) {
-      repository(owner: $user, name: $repo) {
-        pullRequest(number: $pr) {
-          commits(last: 1) {
-            nodes {
-              commit {
-                checkSuites(first: 100) {
-                  nodes {
-                    status,
-                    workflowRun {
-                      databaseId,
-                      url,
-                      workflow {
-                        databaseId
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  EOS
-  variables = {
-    user:,
-    repo:,
-    pr:   pull_request.to_i,
-  }
-  result = API.open_graphql(query, variables:, scopes:)
-
-  commit_node = result["repository"]["pullRequest"]["commits"]["nodes"].first
-  check_suite = if commit_node.present?
-    commit_node["commit"]["checkSuites"]["nodes"].select do |suite|
-      suite.dig("workflowRun", "workflow", "databaseId") == workflow_id_num
-    end
-  else
-    []
-  end
-
-  [check_suite, user, repo, pull_request, workflow_id, scopes, artifact_pattern]
-end
-
-
- -
-

- - .issues(repo:, **filters) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-32
-33
-
-
# File 'utils/github.rb', line 29
-
-def self.issues(repo:, **filters)
-  uri = url_to("repos", repo, "issues")
-  uri.query = URI.encode_www_form(filters)
-  API.open_rest(uri)
-end
-
-
- -
-

- - .issues_for_formula(name, tap: CoreTap.instance, tap_remote_repo: tap&.full_name, state: nil, type: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-
-
# File 'utils/github.rb', line 59
-
-def self.issues_for_formula(name, tap: CoreTap.instance, tap_remote_repo: tap&.full_name, state: nil, type: nil)
-  return [] unless tap_remote_repo
-
-  search_issues(name, repo: tap_remote_repo, state:, type:, in: "title")
-end
-
-
- -
-

- - .last_commit(user, repo, ref, version) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-812
-813
-814
-815
-816
-817
-818
-819
-820
-821
-822
-823
-824
-825
-826
-827
-828
-
-
# File 'utils/github.rb', line 812
-
-def self.last_commit(user, repo, ref, version)
-  return if Homebrew::EnvConfig.no_github_api?
-
-  output, _, status = Utils::Curl.curl_output(
-    "--silent", "--head", "--location",
-    "--header", "Accept: application/vnd.github.sha",
-    url_to("repos", user, repo, "commits", ref).to_s
-  )
-
-  return unless status.success?
-
-  commit = output[/^ETag: "(\h+)"/, 1]
-  return if commit.blank?
-
-  version.update_commit(commit)
-  commit
-end
-
-
- -
-

- - .members_by_team(org, team) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-
-
# File 'utils/github.rb', line 396
-
-def self.members_by_team(org, team)
-  query = <<~EOS
-      { organization(login: "#{org}") {
-        teams(first: 100) {
-          nodes {
-            ... on Team { name }
-          }
-        }
-        team(slug: "#{team}") {
-          members(first: 100) {
-            nodes {
-              ... on User { login name }
-            }
-          }
-        }
-      }
-    }
-  EOS
-  result = API.open_graphql(query, scopes: ["read:org", "user"])
-
-  if result["organization"]["teams"]["nodes"].blank?
-    raise API::Error,
-          "Your token needs the 'read:org' scope to access this API"
-  end
-  raise API::Error, "The team #{org}/#{team} does not exist" if result["organization"]["team"].blank?
-
-  result["organization"]["team"]["members"]["nodes"].to_h { |member| [member["login"], member["name"]] }
-end
-
-
- -
-

- - .merge_pull_request(repo, number:, sha:, merge_method:, commit_message: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-90
-91
-92
-93
-94
-95
-
-
# File 'utils/github.rb', line 90
-
-def self.merge_pull_request(repo, number:, sha:, merge_method:, commit_message: nil)
-  url = "#{API_URL}/repos/#{repo}/pulls/#{number}/merge"
-  data = { sha:, merge_method: }
-  data[:commit_message] = commit_message if commit_message
-  API.open_rest(url, data:, request_method: :PUT, scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES)
-end
-
-
- -
-

- - .multiple_short_commits_exist?(user, repo, commit) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-830
-831
-832
-833
-834
-835
-836
-837
-838
-839
-840
-841
-842
-843
-
-
# File 'utils/github.rb', line 830
-
-def self.multiple_short_commits_exist?(user, repo, commit)
-  return false if Homebrew::EnvConfig.no_github_api?
-
-  output, _, status = Utils::Curl.curl_output(
-    "--silent", "--head", "--location",
-    "--header", "Accept: application/vnd.github.sha",
-    url_to("repos", user, repo, "commits", commit).to_s
-  )
-
-  return true unless status.success?
-  return true if output.blank?
-
-  output[/^Status: (200)/, 1] != "200"
-end
-
-
- -
-

- - .pat_blurb(scopes = ALL_SCOPES) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-
-
# File 'utils/github/api.rb', line 11
-
-def self.pat_blurb(scopes = ALL_SCOPES)
-  <<~EOS
-    Create a GitHub personal access token:
-      #{Formatter.url(
-        "https://github.com/settings/tokens/new?scopes=#{scopes.join(",")}&description=Homebrew",
-      )}
-    #{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
-  EOS
-end
-
-
- -
-

- - .permission(repo, user) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'utils/github.rb', line 69
-
-def self.permission(repo, user)
-  API.open_rest("#{API_URL}/repos/#{repo}/collaborators/#{user}/permission")
-end
-
-
- -
-
-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-
-
# File 'utils/github.rb', line 97
-
-def self.print_pull_requests_matching(query, only = nil)
-  open_or_closed_prs = search_issues(query, is: only, type: "pr", user: "Homebrew")
-
-  open_prs, closed_prs = open_or_closed_prs.partition { |pr| pr["state"] == "open" }
-                                           .map { |prs| prs.map { |pr| "#{pr["title"]} (#{pr["html_url"]})" } }
-
-  if open_prs.present?
-    ohai "Open pull requests"
-    open_prs.each { |pr| puts pr }
-  end
-
-  if closed_prs.present?
-    puts if open_prs.present?
-
-    ohai "Closed pull requests"
-    closed_prs.take(20).each { |pr| puts pr }
-
-    puts "..." if closed_prs.count > 20
-  end
-
-  puts "No pull requests found for #{query.inspect}" if open_prs.blank? && closed_prs.blank?
-end
-
-
- -
-

- - .private_repo?(full_name) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-146
-147
-148
-149
-
-
# File 'utils/github.rb', line 146
-
-def self.private_repo?(full_name)
-  uri = url_to "repos", full_name
-  API.open_rest(uri) { |json| json["private"] }
-end
-
-
- -
-

- - .public_member_usernames(org, per_page: 100) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-
-
# File 'utils/github.rb', line 384
-
-def self.public_member_usernames(org, per_page: 100)
-  url = "#{API_URL}/orgs/#{org}/public_members"
-  members = []
-
-  API.paginate_rest(url, per_page:) do |result|
-    result = result.map { |member| member["login"] }
-    members.concat(result)
-
-    return members if result.length < per_page
-  end
-end
-
-
- -
-

- - .pull_request_commits(user, repo, pull_request, per_page: 100) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-786
-787
-788
-789
-790
-791
-792
-793
-794
-795
-796
-797
-798
-799
-800
-801
-802
-803
-804
-805
-
-
# File 'utils/github.rb', line 786
-
-def self.pull_request_commits(user, repo, pull_request, per_page: 100)
-  pr_data = API.open_rest(url_to("repos", user, repo, "pulls", pull_request))
-  commits_api = pr_data["commits_url"]
-  commit_count = pr_data["commits"]
-  commits = []
-
-  if commit_count > API_MAX_ITEMS
-    raise API::Error, "Getting #{commit_count} commits would exceed limit of #{API_MAX_ITEMS} API items!"
-  end
-
-  API.paginate_rest(commits_api, per_page:) do |result, page|
-    commits.concat(result.map { |c| c["sha"] })
-
-    return commits if commits.length == commit_count
-
-    if result.empty? || page * per_page >= commit_count
-      raise API::Error, "Expected #{commit_count} commits but actually got #{commits.length}!"
-    end
-  end
-end
-
-
- -
-

- - .pull_request_labels(user, repo, pull_request) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-807
-808
-809
-810
-
-
# File 'utils/github.rb', line 807
-
-def self.pull_request_labels(user, repo, pull_request)
-  pr_data = API.open_rest(url_to("repos", user, repo, "pulls", pull_request))
-  pr_data["labels"].map { |label| label["name"] }
-end
-
-
- -
-

- - .pull_request_title_regex(name, version = nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-523
-524
-525
-526
-527
-
-
# File 'utils/github.rb', line 523
-
-def self.pull_request_title_regex(name, version = nil)
-  return /(^|\s)#{Regexp.quote(name)}(:|,|\s|$)/i if version.blank?
-
-  /(^|\s)#{Regexp.quote(name)}(:|,|\s)(.*\s)?#{Regexp.quote(version)}(:|,|\s|$)/i
-end
-
-
- -
-

- - .pull_requests(repo, **options) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-85
-86
-87
-88
-
-
# File 'utils/github.rb', line 85
-
-def self.pull_requests(repo, **options)
-  url = "#{API_URL}/repos/#{repo}/pulls?#{URI.encode_www_form(options)}"
-  API.open_rest(url)
-end
-
-
- -
-

- - .repo_commits_for_user(nwo, user, filter, from, to, max) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-845
-846
-847
-848
-849
-850
-851
-852
-853
-854
-855
-856
-857
-858
-859
-860
-861
-
-
# File 'utils/github.rb', line 845
-
-def self.repo_commits_for_user(nwo, user, filter, from, to, max)
-  return if Homebrew::EnvConfig.no_github_api?
-
-  params = ["#{filter}=#{user}"]
-  params << "since=#{DateTime.parse(from).iso8601}" if from.present?
-  params << "until=#{DateTime.parse(to).iso8601}" if to.present?
-
-  commits = []
-  API.paginate_rest("#{API_URL}/repos/#{nwo}/commits", additional_query_params: params.join("&")) do |result|
-    commits.concat(result.map { |c| c["sha"] })
-    if max.present? && commits.length >= max
-      opoo "#{user} exceeded #{max} #{nwo} commits as #{filter}, stopped counting!"
-      break
-    end
-  end
-  commits
-end
-
-
- -
-

- - .repository(user, repo) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-55
-56
-57
-
-
# File 'utils/github.rb', line 55
-
-def self.repository(user, repo)
-  API.open_rest(url_to("repos", user, repo))
-end
-
-
- -
-

- - .search(entity, *queries, **qualifiers) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-176
-177
-178
-179
-180
-
-
# File 'utils/github.rb', line 176
-
-def self.search(entity, *queries, **qualifiers)
-  uri = url_to "search", entity
-  uri.query = search_query_string(*queries, **qualifiers)
-  API.open_rest(uri)
-end
-
-
- -
-

- - .search_issues(query, **qualifiers) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'utils/github.rb', line 35
-
-def self.search_issues(query, **qualifiers)
-  search_results_items("issues", query, **qualifiers)
-end
-
-
- -
-

- - .search_query_string(*main_params, **qualifiers) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-
-
# File 'utils/github.rb', line 151
-
-def self.search_query_string(*main_params, **qualifiers)
-  params = main_params
-
-  from = qualifiers.fetch(:from, nil)
-  to = qualifiers.fetch(:to, nil)
-
-  params << if from && to
-    "created:#{from}..#{to}"
-  elsif from
-    "created:>=#{from}"
-  elsif to
-    "created:<=#{to}"
-  end
-
-  params += qualifiers.except(:args, :from, :to).flat_map do |key, value|
-    Array(value).map { |v| "#{key.to_s.tr("_", "-")}:#{v}" }
-  end
-
-  "q=#{URI.encode_www_form_component(params.compact.join(" "))}&per_page=100"
-end
-
-
- -
-

- - .search_results_count(entity, *queries, **qualifiers) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-187
-188
-189
-190
-
-
# File 'utils/github.rb', line 187
-
-def self.search_results_count(entity, *queries, **qualifiers)
-  json = search(entity, *queries, **qualifiers)
-  json.fetch("total_count", 0)
-end
-
-
- -
-

- - .search_results_items(entity, *queries, **qualifiers) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-182
-183
-184
-185
-
-
# File 'utils/github.rb', line 182
-
-def self.search_results_items(entity, *queries, **qualifiers)
-  json = search(entity, *queries, **qualifiers)
-  json.fetch("items", [])
-end
-
-
- -
-

- - .sponsorships(user) ⇒ Array<Hash> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - user - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-
-
# File 'utils/github.rb', line 436
-
-def self.sponsorships(user)
-  has_next_page = T.let(true, T::Boolean)
-  after = ""
-  sponsorships = T.let([], T::Array[Hash])
-  errors = T.let([], T::Array[Hash])
-  while has_next_page
-    query = <<~EOS
-        { organization(login: "#{user}") {
-          sponsorshipsAsMaintainer(first: 100 #{after}) {
-            pageInfo {
-              startCursor
-              hasNextPage
-              endCursor
-            }
-            totalCount
-            nodes {
-              tier {
-                monthlyPriceInDollars
-                closestLesserValueTier {
-                  monthlyPriceInDollars
-                }
-              }
-              sponsorEntity {
-                __typename
-                ... on Organization { login name }
-                ... on User { login name }
-              }
-            }
-          }
-        }
-      }
-    EOS
-    # Some organisations do not permit themselves to be queried through the
-    # API like this and raise an error so handle these errors later.
-    # This has been reported to GitHub.
-    result = API.open_graphql(query, scopes: ["user"], raise_errors: false)
-    errors += result["errors"] if result["errors"].present?
-
-    current_sponsorships = result["data"]["organization"]["sponsorshipsAsMaintainer"]
-
-    # The organisations mentioned above will show up as nil nodes.
-    if (nodes = current_sponsorships["nodes"].compact.presence)
-      sponsorships += nodes
-    end
-
-    if (page_info = current_sponsorships["pageInfo"].presence) &&
-       page_info["hasNextPage"].presence
-      after = %Q(, after: "#{page_info["endCursor"]}")
-    else
-      has_next_page = false
-    end
-  end
-
-  # Only raise errors if we didn't get any sponsorships.
-  if sponsorships.blank? && errors.present?
-    raise API::Error, errors.map { |e| "#{e["type"]}: #{e["message"]}" }.join("\n")
-  end
-
-  sponsorships.map do |sponsorship|
-    sponsor = sponsorship["sponsorEntity"]
-    tier = sponsorship["tier"].presence || {}
-    monthly_amount = tier["monthlyPriceInDollars"].presence || 0
-    closest_tier = tier["closestLesserValueTier"].presence || {}
-    closest_tier_monthly_amount = closest_tier["monthlyPriceInDollars"].presence || 0
-
-    {
-      name:                        sponsor["name"].presence || sponsor["login"],
-      login:                       sponsor["login"],
-      monthly_amount:,
-      closest_tier_monthly_amount:,
-    }
-  end
-end
-
-
- -
-

- - .too_many_open_prs?(tap) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tap - - - (Tap, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-880
-881
-882
-883
-884
-885
-886
-887
-888
-889
-890
-891
-892
-893
-894
-895
-896
-897
-898
-899
-900
-901
-902
-903
-904
-905
-906
-907
-908
-909
-910
-911
-912
-913
-914
-915
-916
-917
-918
-919
-920
-921
-922
-923
-924
-925
-926
-927
-928
-929
-930
-931
-
-
# File 'utils/github.rb', line 880
-
-def self.too_many_open_prs?(tap)
-  # We don't enforce unofficial taps.
-  return false if tap.nil? || !tap.official?
-
-  # BrewTestBot can open as many PRs as it wants.
-  return false if ENV["HOMEBREW_TEST_BOT_AUTOBUMP"].present?
-
-  odie "Cannot count PRs, HOMEBREW_NO_GITHUB_API set!" if Homebrew::EnvConfig.no_github_api?
-
-  query = <<~EOS
-    query {
-      viewer {
-        login
-        pullRequests(first: 100, states: OPEN) {
-          nodes {
-            headRepositoryOwner {
-              login
-            }
-          }
-          pageInfo {
-            hasNextPage
-          }
-        }
-      }
-    }
-  EOS
-  graphql_result = API.open_graphql(query)
-  puts
-
-  github_user = graphql_result.dig("viewer", "login")
-  odie "Cannot count PRs, cannot get GitHub username from GraphQL API!" if github_user.blank?
-
-  # BrewTestBot can open as many PRs as it wants.
-  return false if github_user.casecmp("brewtestbot").zero?
-
-  prs = graphql_result.dig("viewer", "pullRequests", "nodes")
-  more_graphql_data = graphql_result.dig("viewer", "pullRequests", "pageInfo", "hasNextPage")
-  return false if !more_graphql_data && prs.length < MAXIMUM_OPEN_PRS
-
-  homebrew_prs_count = graphql_result.dig("viewer", "pullRequests", "nodes").count do |pr|
-    pr["headRepositoryOwner"]["login"] == "Homebrew"
-  end
-  return true if homebrew_prs_count >= MAXIMUM_OPEN_PRS
-  return false unless more_graphql_data
-  return false if tap.nil?
-
-  url = "#{API_URL}/repos/#{tap.full_name}/issues?state=open&creator=#{github_user}"
-  rest_result = API.open_rest(url)
-  repo_prs_count = rest_result.count { |issue_or_pr| issue_or_pr.key?("pull_request") }
-
-  repo_prs_count >= MAXIMUM_OPEN_PRS
-end
-
-
- -
-

- - .upload_release_asset(user, repo, id, local_file: nil, remote_file: nil) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-281
-282
-283
-284
-285
-
-
# File 'utils/github.rb', line 281
-
-def self.upload_release_asset(user, repo, id, local_file: nil, remote_file: nil)
-  url = "https://uploads.github.com/repos/#{user}/#{repo}/releases/#{id}/assets"
-  url += "?name=#{remote_file}" if remote_file
-  API.open_rest(url, data_binary_path: local_file, request_method: :POST, scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES)
-end
-
-
- -
-

- - .url_to(*subroutes) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-172
-173
-174
-
-
# File 'utils/github.rb', line 172
-
-def self.url_to(*subroutes)
-  URI.parse([API_URL, *subroutes].join("/"))
-end
-
-
- -
-

- - .userObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-65
-66
-67
-
-
# File 'utils/github.rb', line 65
-
-def self.user
-  @user ||= API.open_rest("#{API_URL}/user")
-end
-
-
- -
-

- - .workflow_dispatch_event(user, repo, workflow, ref, **inputs) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-240
-241
-242
-243
-244
-245
-
-
# File 'utils/github.rb', line 240
-
-def self.workflow_dispatch_event(user, repo, workflow, ref, **inputs)
-  url = "#{API_URL}/repos/#{user}/#{repo}/actions/workflows/#{workflow}/dispatches"
-  API.open_rest(url, data:           { ref:, inputs: },
-                     request_method: :POST,
-                     scopes:         CREATE_ISSUE_FORK_OR_PR_SCOPES)
-end
-
-
- -
-

- - .write_access?(repo, user = nil) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-73
-74
-75
-76
-
-
# File 'utils/github.rb', line 73
-
-def self.write_access?(repo, user = nil)
-  user ||= self.user["login"]
-  ["admin", "write"].include?(permission(repo, user)["permission"])
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub/API.html b/docs/GitHub/API.html deleted file mode 100644 index dd4a53132..000000000 --- a/docs/GitHub/API.html +++ /dev/null @@ -1,1393 +0,0 @@ - - - - - - - Module: GitHub::API - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: GitHub::API - - - -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
utils/github/api.rb
-
- -
- -

Overview

-
-

- This module is part of an internal API. - This module may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for accessing the GitHub API.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: AuthenticationFailedError, Error, HTTPNotFoundError, MissingAuthenticationError, RateLimitExceededError, ValidationFailedError - - -

- - -

- Constant Summary - collapse -

- -
- -
GITHUB_IP_ALLOWLIST_ERROR = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Regexp.new("Although you appear to have the correct authorization credentials, " \
-"the `(.+)` organization has an IP allow list enabled, " \
-"and your IP address is not permitted to access this resource").freeze
- -
NO_CREDENTIALS_MESSAGE = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
<<~MESSAGE.freeze
-  No GitHub credentials found in macOS Keychain, GitHub CLI or the environment.
-  #{GitHub.pat_blurb}
-MESSAGE
- -
ERRORS = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  AuthenticationFailedError,
-  HTTPNotFoundError,
-  RateLimitExceededError,
-  Error,
-  JSON::ParserError,
-].freeze
- -
CREDENTIAL_NAMES = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  env_token:                  "HOMEBREW_GITHUB_API_TOKEN",
-  github_cli_token:           "GitHub CLI login",
-  keychain_username_password: "macOS Keychain GitHub",
-}.freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .credentialsObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-183
-184
-185
-
-
# File 'utils/github/api.rb', line 183
-
-def self.credentials
-  @credentials ||= Homebrew::EnvConfig.github_api_token || github_cli_token || keychain_username_password
-end
-
-
- -
-

- - .credentials_error_message(response_headers, needed_scopes) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Given an API response from GitHub, warn the user if their credentials -have insufficient permissions.

- - -
-
-
- - -
- - - - -
-
-
-
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-
-
# File 'utils/github/api.rb', line 208
-
-def self.credentials_error_message(response_headers, needed_scopes)
-  return if response_headers.empty?
-
-  scopes = response_headers["x-accepted-oauth-scopes"].to_s.split(", ")
-  needed_scopes = Set.new(scopes || needed_scopes)
-  credentials_scopes = response_headers["x-oauth-scopes"]
-  return if needed_scopes.subset?(Set.new(credentials_scopes.to_s.split(", ")))
-
-  github_permission_link = GitHub.pat_blurb(needed_scopes.to_a)
-  needed_scopes = needed_scopes.to_a.join(", ").presence || "none"
-  credentials_scopes = "none" if credentials_scopes.blank?
-
-  what = CREDENTIAL_NAMES.fetch(credentials_type)
-  @credentials_error_message ||= onoe <<~EOS
-    Your #{what} credentials do not have sufficient scope!
-    Scopes required: #{needed_scopes}
-    Scopes present:  #{credentials_scopes}
-    #{github_permission_link}
-  EOS
-end
-
-
- -
-

- - .credentials_typeSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-
-
# File 'utils/github/api.rb', line 188
-
-def self.credentials_type
-  if Homebrew::EnvConfig.github_api_token.present?
-    :env_token
-  elsif github_cli_token.present?
-    :github_cli_token
-  elsif keychain_username_password.present?
-    :keychain_username_password
-  else
-    :none
-  end
-end
-
-
- -
-

- - .github_cli_tokenString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the token from the GitHub CLI for github.com.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-
-
# File 'utils/github/api.rb', line 141
-
-def self.github_cli_token
-  Utils::UID.drop_euid do
-    # Avoid `Formula["gh"].opt_bin` so this method works even with `HOMEBREW_DISABLE_LOAD_FORMULA`.
-    env = {
-      "PATH" => PATH.new(HOMEBREW_PREFIX/"opt/gh/bin", ENV.fetch("PATH")),
-      "HOME" => Etc.getpwuid(Process.uid)&.dir,
-    }
-    gh_out, _, result = system_command "gh",
-                                       args:         ["auth", "token", "--hostname", "github.com"],
-                                       env:,
-                                       print_stderr: false
-    return unless result.success?
-
-    gh_out.chomp
-  end
-end
-
-
- -
-

- - .keychain_username_passwordString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the password field from git-credential-osxkeychain for github.com, -but only if that password looks like a GitHub Personal Access Token.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-
-
# File 'utils/github/api.rb', line 161
-
-def self.keychain_username_password
-  Utils::UID.drop_euid do
-    git_credential_out, _, result = system_command "git",
-                                                   args:         ["credential-osxkeychain", "get"],
-                                                   input:        ["protocol=https\n", "host=github.com\n"],
-                                                   env:          { "HOME" => Etc.getpwuid(Process.uid)&.dir },
-                                                   print_stderr: false
-    return unless result.success?
-
-    github_username = git_credential_out[/username=(.+)/, 1]
-    github_password = git_credential_out[/password=(.+)/, 1]
-    return unless github_username
-
-    # Don't use passwords from the keychain unless they look like
-    # GitHub Personal Access Tokens:
-    #   https://github.com/Homebrew/brew/issues/6862#issuecomment-572610344
-    return unless GITHUB_PERSONAL_ACCESS_TOKEN_REGEX.match?(github_password)
-
-    github_password
-  end
-end
-
-
- -
-

- - .open_graphql(query, variables: nil, scopes: [].freeze, raise_errors: true) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-
-
# File 'utils/github/api.rb', line 319
-
-def self.open_graphql(query, variables: nil, scopes: [].freeze, raise_errors: true)
-  data = { query:, variables: }
-  result = open_rest("#{API_URL}/graphql", scopes:, data:, request_method: "POST")
-
-  if raise_errors
-    if result["errors"].present?
-      raise Error, result["errors"].map { |e| "#{e["type"]}: #{e["message"]}" }.join("\n")
-    end
-
-    result["data"]
-  else
-    result
-  end
-end
-
-
- -
-

- - .open_rest(url, data: nil, data_binary_path: nil, request_method: nil, scopes: [].freeze, parse_json: true) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-
-
# File 'utils/github/api.rb', line 229
-
-def self.open_rest(
-  url, data: nil, data_binary_path: nil, request_method: nil, scopes: [].freeze, parse_json: true
-)
-  # This is a no-op if the user is opting out of using the GitHub API.
-  return block_given? ? yield({}) : {} if Homebrew::EnvConfig.no_github_api?
-
-  # This is a Curl format token, not a Ruby one.
-  # rubocop:disable Style/FormatStringToken
-  args = ["--header", "Accept: application/vnd.github+json", "--write-out", "\n%{http_code}"]
-  # rubocop:enable Style/FormatStringToken
-
-  token = credentials
-  args += ["--header", "Authorization: token #{token}"] if credentials_type != :none
-  args += ["--header", "X-GitHub-Api-Version:2022-11-28"]
-
-  data_tmpfile = nil
-  if data
-    begin
-      data = JSON.pretty_generate data
-      data_tmpfile = Tempfile.new("github_api_post", HOMEBREW_TEMP)
-    rescue JSON::ParserError => e
-      raise Error, "Failed to parse JSON request:\n#{e.message}\n#{data}", e.backtrace
-    end
-  end
-
-  if data_binary_path.present?
-    args += ["--data-binary", "@#{data_binary_path}"]
-    args += ["--header", "Content-Type: application/gzip"]
-  end
-
-  headers_tmpfile = Tempfile.new("github_api_headers", HOMEBREW_TEMP)
-  begin
-    if data_tmpfile
-      data_tmpfile.write data
-      data_tmpfile.close
-      args += ["--data", "@#{data_tmpfile.path}"]
-
-      args += ["--request", request_method.to_s] if request_method
-    end
-
-    args += ["--dump-header", T.must(headers_tmpfile.path)]
-
-    output, errors, status = Utils::Curl.curl_output("--location", url.to_s, *args, secrets: [token])
-    output, _, http_code = output.rpartition("\n")
-    output, _, http_code = output.rpartition("\n") if http_code == "000"
-    headers = headers_tmpfile.read
-  ensure
-    if data_tmpfile
-      data_tmpfile.close
-      data_tmpfile.unlink
-    end
-    headers_tmpfile.close
-    headers_tmpfile.unlink
-  end
-
-  begin
-    raise_error(output, errors, http_code, headers, scopes) if !http_code.start_with?("2") || !status.success?
-
-    return if http_code == "204" # No Content
-
-    output = JSON.parse output if parse_json
-    if block_given?
-      yield output
-    else
-      output
-    end
-  rescue JSON::ParserError => e
-    raise Error, "Failed to parse JSON response\n#{e.message}", e.backtrace
-  end
-end
-
-
- -
-

- - .paginate_graphql(query, variables: nil, &_block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - query - - - (String) - - - -
  • - -
  • - - variables - - - (Hash{Symbol => T.untyped}, nil) - - - (defaults to: nil) - - -
  • - -
  • - - _block - - - (T.proc.params(data: T::Hash[String, T.untyped]).returns(T::Hash[String, T.untyped])) - - - -
  • - -
- - -
- - - - -
-
-
-
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-
-
# File 'utils/github/api.rb', line 341
-
-def self.paginate_graphql(query, variables: nil, &_block)
-  result = API.open_graphql(query, variables:)
-
-  has_next_page = T.let(true, T::Boolean)
-  variables ||= {}
-  while has_next_page
-    page_info = yield result
-    has_next_page = page_info["hasNextPage"]
-    if has_next_page
-      variables[:after] = page_info["endCursor"]
-      result = API.open_graphql(query, variables:)
-    end
-  end
-end
-
-
- -
-

- - .paginate_rest(url, additional_query_params: nil, per_page: 100, scopes: [].freeze) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-
-
# File 'utils/github/api.rb', line 300
-
-def self.paginate_rest(url, additional_query_params: nil, per_page: 100, scopes: [].freeze)
-  (1..API_MAX_PAGES).each do |page|
-    retry_count = 1
-    result = begin
-      API.open_rest("#{url}?per_page=#{per_page}&page=#{page}&#{additional_query_params}", scopes:)
-    rescue Error
-      if retry_count < PAGINATE_RETRY_COUNT
-        retry_count += 1
-        retry
-      end
-
-      raise
-    end
-    break if result.blank?
-
-    yield(result, page)
-  end
-end
-
-
- -
-

- - .raise_error(output, errors, http_code, headers, scopes) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-
-
# File 'utils/github/api.rb', line 356
-
-def self.raise_error(output, errors, http_code, headers, scopes)
-  json = begin
-    JSON.parse(output)
-  rescue
-    nil
-  end
-  message = json&.[]("message") || "curl failed! #{errors}"
-
-  meta = {}
-  headers.lines.each do |l|
-    key, _, value = l.delete(":").partition(" ")
-    key = key.downcase.strip
-    next if key.empty?
-
-    meta[key] = value.strip
-  end
-
-  credentials_error_message(meta, scopes)
-
-  case http_code
-  when "401"
-    raise AuthenticationFailedError.new(credentials_type, message)
-  when "403"
-    if meta.fetch("x-ratelimit-remaining", 1).to_i <= 0
-      reset = meta.fetch("x-ratelimit-reset").to_i
-      raise RateLimitExceededError.new(reset, message)
-    end
-
-    raise AuthenticationFailedError.new(credentials_type, message)
-  when "404"
-    raise MissingAuthenticationError if credentials_type == :none && scopes.present?
-
-    raise HTTPNotFoundError, message
-  when "422"
-    errors = json&.[]("errors") || []
-    raise ValidationFailedError.new(message, errors)
-  else
-    raise Error, message
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub/API/AuthenticationFailedError.html b/docs/GitHub/API/AuthenticationFailedError.html deleted file mode 100644 index 9b4f693f0..000000000 --- a/docs/GitHub/API/AuthenticationFailedError.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - Exception: GitHub::API::AuthenticationFailedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: GitHub::API::AuthenticationFailedError - - - Private -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/github/api.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when authentication fails.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#github_message

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(credentials_type, github_message) ⇒ AuthenticationFailedError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of AuthenticationFailedError.

- - -
-
-
- - -
- - - - -
-
-
-
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-
-
# File 'utils/github/api.rb', line 83
-
-def initialize(credentials_type, github_message)
-  @github_message = github_message
-  message = +"GitHub API Error: #{github_message}\n"
-  message << case credentials_type
-  when :github_cli_token
-    <<~EOS
-      Your GitHub CLI login session may be invalid.
-      Refresh it with:
-        gh auth login --hostname github.com
-    EOS
-  when :keychain_username_password
-    <<~EOS
-      The GitHub credentials in the macOS keychain may be invalid.
-      Clear them with:
-        printf "protocol=https\\nhost=github.com\\n" | git credential-osxkeychain erase
-    EOS
-  when :env_token
-    <<~EOS
-      HOMEBREW_GITHUB_API_TOKEN may be invalid or expired; check:
-        #{Formatter.url("https://github.com/settings/tokens")}
-    EOS
-  when :none
-    NO_CREDENTIALS_MESSAGE
-  end
-  super message.freeze
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub/API/Error.html b/docs/GitHub/API/Error.html deleted file mode 100644 index 2fbc3512a..000000000 --- a/docs/GitHub/API/Error.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - Exception: GitHub::API::Error - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: GitHub::API::Error - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/github/api.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Generic API error.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

- - - - - - - -
-

Instance Attribute Details

- - - -
-

- - #github_messageObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-
-
# File 'utils/github/api.rb', line 45
-
-def github_message
-  @github_message
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub/API/HTTPNotFoundError.html b/docs/GitHub/API/HTTPNotFoundError.html deleted file mode 100644 index 4dd60b184..000000000 --- a/docs/GitHub/API/HTTPNotFoundError.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - Exception: GitHub::API::HTTPNotFoundError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: GitHub::API::HTTPNotFoundError - - - Private -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/github/api.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when the requested URL is not found.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#github_message

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(github_message) ⇒ HTTPNotFoundError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of HTTPNotFoundError.

- - -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-
-
# File 'utils/github/api.rb', line 50
-
-def initialize(github_message)
-  @github_message = github_message
-  super
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub/API/MissingAuthenticationError.html b/docs/GitHub/API/MissingAuthenticationError.html deleted file mode 100644 index 4fdafc4dd..000000000 --- a/docs/GitHub/API/MissingAuthenticationError.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - Exception: GitHub::API::MissingAuthenticationError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: GitHub::API::MissingAuthenticationError - - - Private -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/github/api.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when the user has no GitHub API credentials set at all (macOS keychain, GitHub CLI or envvar).

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#github_message

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initializeMissingAuthenticationError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of MissingAuthenticationError.

- - -
-
-
- - -
- - - - -
-
-
-
-113
-114
-115
-
-
# File 'utils/github/api.rb', line 113
-
-def initialize
-  super NO_CREDENTIALS_MESSAGE
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub/API/RateLimitExceededError.html b/docs/GitHub/API/RateLimitExceededError.html deleted file mode 100644 index df8face95..000000000 --- a/docs/GitHub/API/RateLimitExceededError.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - - Exception: GitHub::API::RateLimitExceededError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: GitHub::API::RateLimitExceededError - - - Private -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/github/api.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when the API rate limit is exceeded.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#github_message

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(reset, github_message) ⇒ RateLimitExceededError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of RateLimitExceededError.

- - -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'utils/github/api.rb', line 58
-
-def initialize(reset, github_message)
-  @github_message = github_message
-  new_pat_message = ", or:\n#{GitHub.pat_blurb}" if API.credentials.blank?
-  super <<~EOS
-    GitHub API Error: #{github_message}
-    Try again in #{pretty_ratelimit_reset(reset)}#{new_pat_message}
-  EOS
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #pretty_ratelimit_reset(reset) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'utils/github/api.rb', line 67
-
-def pretty_ratelimit_reset(reset)
-  pretty_duration(Time.at(reset) - Time.now)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub/API/ValidationFailedError.html b/docs/GitHub/API/ValidationFailedError.html deleted file mode 100644 index e6c470008..000000000 --- a/docs/GitHub/API/ValidationFailedError.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - Exception: GitHub::API::ValidationFailedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: GitHub::API::ValidationFailedError - - - Private -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/github/api.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when the API returns a validation error.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#github_message

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(github_message, errors) ⇒ ValidationFailedError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ValidationFailedError.

- - -
-
-
- - -
- - - - -
-
-
-
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
-
# File 'utils/github/api.rb', line 120
-
-def initialize(github_message, errors)
-  @github_message = if errors.empty?
-    github_message
-  else
-    "#{github_message}: #{errors}"
-  end
-
-  super(@github_message)
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub/Actions.html b/docs/GitHub/Actions.html deleted file mode 100644 index 495e1b691..000000000 --- a/docs/GitHub/Actions.html +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - - Module: GitHub::Actions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: GitHub::Actions - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/github/actions.rb
-
- -
- -

Overview

-
-

- This module is part of an internal API. - This module may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for interacting with GitHub Actions.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Annotation - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .env_set?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'utils/github/actions.rb', line 39
-
-def self.env_set?
-  ENV.fetch("GITHUB_ACTIONS", false).present?
-end
-
-
- -
-

- - .escape(string) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - string - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-
-
# File 'utils/github/actions.rb', line 13
-
-def self.escape(string)
-  # See https://github.community/t/set-output-truncates-multiline-strings/16852/3.
-  string.gsub("%", "%25")
-        .gsub("\n", "%0A")
-        .gsub("\r", "%0D")
-end
-
-
- -
-

- - .format_multiline_string(name, value) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - value - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'utils/github/actions.rb', line 21
-
-def self.format_multiline_string(name, value)
-  # Format multiline strings for environment files
-  # See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
-
-  delimiter = "ghadelimiter_#{SecureRandom.uuid}"
-
-  if name.include?(delimiter) || value.include?(delimiter)
-    raise "`name` and `value` must not contain the delimiter"
-  end
-
-  <<~EOS
-    #{name}<<#{delimiter}
-    #{value}
-    #{delimiter}
-  EOS
-end
-
-
- -
-

- - .puts_annotation_if_env_set(type, message, file: nil, line: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - type - - - (Symbol) - - - -
  • - -
  • - - message - - - (String) - - - -
  • - -
  • - - file - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - line - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'utils/github/actions.rb', line 50
-
-def self.puts_annotation_if_env_set(type, message, file: nil, line: nil)
-  # Don't print annotations during tests, too messy to handle these.
-  return if ENV.fetch("HOMEBREW_TESTS", false)
-  return unless env_set?
-
-  std = (type == :notice) ? $stdout : $stderr
-  std.puts Annotation.new(type, message)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHub/Actions/Annotation.html b/docs/GitHub/Actions/Annotation.html deleted file mode 100644 index 33aeea200..000000000 --- a/docs/GitHub/Actions/Annotation.html +++ /dev/null @@ -1,588 +0,0 @@ - - - - - - - Class: GitHub::Actions::Annotation - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: GitHub::Actions::Annotation - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/github/actions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for formatting annotations on GitHub Actions.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
ANNOTATION_TYPES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:notice, :warning, :error].freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(type, message, file: nil, title: nil, line: nil, end_line: nil, column: nil, end_column: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - type - - - (Symbol) - - - -
  • - -
  • - - message - - - (String) - - - -
  • - -
  • - - file - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - title - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - line - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
  • - - end_line - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
  • - - column - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
  • - - end_column - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'utils/github/actions.rb', line 84
-
-def initialize(type, message, file: nil, title: nil, line: nil, end_line: nil, column: nil, end_column: nil)
-  raise ArgumentError, "Unsupported type: #{type.inspect}" if ANNOTATION_TYPES.exclude?(type)
-
-  @type = type
-  @message = Tty.strip_ansi(message)
-  @file = self.class.path_relative_to_workspace(file) if file.present?
-  @title = Tty.strip_ansi(title) if title
-  @line = Integer(line) if line
-  @end_line = Integer(end_line) if end_line
-  @column = Integer(column) if column
-  @end_column = Integer(end_column) if end_column
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .path_relative_to_workspace(path) ⇒ Pathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-64
-65
-66
-67
-68
-69
-70
-
-
# File 'utils/github/actions.rb', line 64
-
-def self.path_relative_to_workspace(path)
-  workspace = Pathname(ENV.fetch("GITHUB_WORKSPACE", Dir.pwd)).realpath
-  path = Pathname(path)
-  return path unless path.exist?
-
-  path.realpath.relative_path_from(workspace)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #relevant?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An annotation is only relevant if the corresponding file is relative to -the GITHUB_WORKSPACE directory or if no file is specified.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-122
-123
-124
-125
-126
-
-
# File 'utils/github/actions.rb', line 122
-
-def relevant?
-  return true if @file.blank?
-
-  @file.descend.next.to_s != ".."
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHubArtifactDownloadStrategy.html b/docs/GitHubArtifactDownloadStrategy.html deleted file mode 100644 index 5f6993310..000000000 --- a/docs/GitHubArtifactDownloadStrategy.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - Class: GitHubArtifactDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: GitHubArtifactDownloadStrategy - - - Private -

-
- -
-
Inherits:
-
- AbstractFileDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/github/artifacts.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for downloading an artifact from GitHub Actions.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractFileDownloadStrategy

-

#basename, #cached_location, #symlink_location, #temporary_path

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, artifact_id, token:) ⇒ GitHubArtifactDownloadStrategy - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of GitHubArtifactDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-30
-31
-
-
# File 'utils/github/artifacts.rb', line 27
-
-def initialize(url, artifact_id, token:)
-  super(url, "artifact", artifact_id)
-  @cache = HOMEBREW_CACHE/"gh-actions-artifact"
-  @token = token
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #fetch(timeout: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'utils/github/artifacts.rb', line 33
-
-def fetch(timeout: nil)
-  ohai "Downloading #{url}"
-  if cached_location.exist?
-    puts "Already downloaded: #{cached_location}"
-  else
-    begin
-      Utils::Curl.curl("--location", "--create-dirs", "--output", temporary_path, url,
-                       "--header", "Authorization: token #{@token}",
-                       secrets: [@token],
-                       timeout:)
-    rescue ErrorDuringExecution
-      raise CurlDownloadStrategyError, url
-    end
-    ignore_interrupts do
-      cached_location.dirname.mkpath
-      temporary_path.rename(cached_location)
-      symlink_location.dirname.mkpath
-    end
-  end
-  FileUtils.ln_s cached_location.relative_path_from(symlink_location.dirname), symlink_location, force: true
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHubGitDownloadStrategy.html b/docs/GitHubGitDownloadStrategy.html deleted file mode 100644 index 788b1054e..000000000 --- a/docs/GitHubGitDownloadStrategy.html +++ /dev/null @@ -1,584 +0,0 @@ - - - - - - - Class: GitHubGitDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: GitHubGitDownloadStrategy - - - -

-
- -
-
Inherits:
-
- GitDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a Git repository from GitHub.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from VCSDownloadStrategy

-

VCSDownloadStrategy::REF_TYPES

- - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from GitDownloadStrategy

-

#last_commit, #source_modified_time

- - - - - - - - - -

Methods inherited from VCSDownloadStrategy

-

#fetch, #fetch_last_commit, #head?, #last_commit

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ GitHubGitDownloadStrategy - - - - - -

-
-

Returns a new instance of GitHubGitDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-1099
-1100
-1101
-1102
-1103
-1104
-1105
-1106
-1107
-
-
# File 'download_strategy.rb', line 1099
-
-def initialize(url, name, version, **meta)
-  super
-
-  match_data = %r{^https?://github\.com/(?<user>[^/]+)/(?<repo>[^/]+)\.git$}.match(@url)
-  return unless match_data
-
-  @user = match_data[:user]
-  @repo = match_data[:repo]
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #commit_outdated?(commit) ⇒ Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1109
-1110
-1111
-1112
-1113
-1114
-1115
-1116
-1117
-1118
-1119
-1120
-1121
-1122
-1123
-1124
-
-
# File 'download_strategy.rb', line 1109
-
-def commit_outdated?(commit)
-  @last_commit ||= GitHub.last_commit(@user, @repo, @ref, version)
-  if @last_commit
-    return true unless commit
-    return true unless @last_commit.start_with?(commit)
-
-    if GitHub.multiple_short_commits_exist?(@user, @repo, commit)
-      true
-    else
-      version.update_commit(commit)
-      false
-    end
-  else
-    super
-  end
-end
-
-
- -
-

- - #default_branchString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-1136
-1137
-1138
-1139
-1140
-1141
-1142
-1143
-1144
-1145
-1146
-1147
-1148
-
-
# File 'download_strategy.rb', line 1136
-
-def default_branch
-  return @default_branch if defined?(@default_branch)
-
-  command! "git",
-           args:  ["remote", "set-head", "origin", "--auto"],
-           chdir: cached_location
-
-  result = command! "git",
-                    args:  ["symbolic-ref", "refs/remotes/origin/HEAD"],
-                    chdir: cached_location
-
-  @default_branch = result.stdout[%r{^refs/remotes/origin/(.*)$}, 1]
-end
-
-
- -
-

- - #default_refspecString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1127
-1128
-1129
-1130
-1131
-1132
-1133
-
-
# File 'download_strategy.rb', line 1127
-
-def default_refspec
-  if default_branch
-    "+refs/heads/#{default_branch}:refs/remotes/origin/#{default_branch}"
-  else
-    super
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHubPackages.html b/docs/GitHubPackages.html deleted file mode 100644 index c0e43c723..000000000 --- a/docs/GitHubPackages.html +++ /dev/null @@ -1,951 +0,0 @@ - - - - - - - Class: GitHubPackages - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: GitHubPackages - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Context, SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
github_packages.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

GitHub Packages client.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
URL_DOMAIN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"ghcr.io"
- -
URL_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%r{(?:#{Regexp.escape(URL_PREFIX)}|#{Regexp.escape(DOCKER_PREFIX)})([\w-]+)/([\w-]+)}
- -
VALID_OCI_TAG_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Valid OCI tag characters -https://github.com/opencontainers/distribution-spec/blob/main/spec.md#workflow-categories

- - -
-
-
- - -
-
-
/^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}$/
- -
INVALID_OCI_TAG_CHARS_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/[^a-zA-Z0-9._-]/
- -
TAB_ARCH_TO_PLATFORM_ARCHITECTURE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Translate Homebrew tab.arch to OCI platform.architecture

- - -
-
-
- - -
-
-
{
-  "arm64"  => "arm64",
-  "x86_64" => "amd64",
-}.freeze
- -
BUILT_ON_OS_TO_PLATFORM_OS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Translate Homebrew built_on.os to OCI platform.os

- - -
-
-
- - -
-
-
{
-  "Linux"     => "linux",
-  "Macintosh" => "darwin",
-}.freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - - -
-

Class Method Details

- - -
-

- - .image_formula_name(formula_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-117
-118
-119
-120
-121
-122
-123
-
-
# File 'github_packages.rb', line 117
-
-def self.image_formula_name(formula_name)
-  # Invalid docker name characters:
-  # - `/` makes sense because we already use it to separate repository/formula.
-  # - `x` makes sense because we already use it in `Formulary`.
-  formula_name.tr("@", "/")
-              .tr("+", "x")
-end
-
-
- -
-

- - .image_version_rebuild(version_rebuild) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-125
-126
-127
-128
-129
-130
-131
-
-
# File 'github_packages.rb', line 125
-
-def self.image_version_rebuild(version_rebuild)
-  return version_rebuild if version_rebuild.match?(VALID_OCI_TAG_REGEX)
-
-  odisabled "GitHub Packages versions that do not match #{VALID_OCI_TAG_REGEX.source}",
-            "declaring a new `version` without these characters"
-  version_rebuild.gsub(INVALID_OCI_TAG_CHARS_REGEX, ".")
-end
-
-
- -
-

- - .repo_without_prefix(repo) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-96
-97
-98
-99
-
-
# File 'github_packages.rb', line 96
-
-def self.repo_without_prefix(repo)
-  # Remove redundant repository prefix for a shorter name.
-  repo.delete_prefix("homebrew-")
-end
-
-
- -
-

- - .root_url(org, repo, prefix = URL_PREFIX) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-101
-102
-103
-104
-105
-106
-
-
# File 'github_packages.rb', line 101
-
-def self.root_url(org, repo, prefix = URL_PREFIX)
-  # `docker`/`skopeo` insist on lowercase organisation (“repository name”).
-  org = org.downcase
-
-  "#{prefix}#{org}/#{repo_without_prefix(repo)}"
-end
-
-
- -
-

- - .root_url_if_match(url) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-108
-109
-110
-111
-112
-113
-114
-115
-
-
# File 'github_packages.rb', line 108
-
-def self.root_url_if_match(url)
-  return if url.blank?
-
-  _, org, repo, = *url.to_s.match(URL_REGEX)
-  return if org.blank? || repo.blank?
-
-  root_url(org, repo)
-end
-
-
- -
-

- - .version_rebuild(version, rebuild, bottle_tag = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-
-
# File 'github_packages.rb', line 82
-
-def self.version_rebuild(version, rebuild, bottle_tag = nil)
-  bottle_tag = (".#{bottle_tag}" if bottle_tag.present?)
-
-  rebuild = if rebuild.to_i.positive?
-    if bottle_tag
-      ".#{rebuild}"
-    else
-      "-#{rebuild}"
-    end
-  end
-
-  "#{version}#{bottle_tag}#{rebuild}"
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #upload_bottles(bottles_hash, keep_old:, dry_run:, warn_on_error:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - bottles_hash - - - (Hash{String => T.untyped}) - - - -
  • - -
  • - - keep_old - - - (Boolean) - - - -
  • - -
  • - - dry_run - - - (Boolean) - - - -
  • - -
  • - - warn_on_error - - - (Boolean) - - - -
  • - -
- -

Raises:

- - -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'github_packages.rb', line 52
-
-def upload_bottles(bottles_hash, keep_old:, dry_run:, warn_on_error:)
-  user = Homebrew::EnvConfig.github_packages_user
-  token = Homebrew::EnvConfig.github_packages_token
-
-  raise UsageError, "HOMEBREW_GITHUB_PACKAGES_USER is unset." if user.blank?
-  raise UsageError, "HOMEBREW_GITHUB_PACKAGES_TOKEN is unset." if token.blank?
-
-  skopeo = ensure_executable!("skopeo", reason: "upload")
-
-  require "json_schemer"
-
-  load_schemas!
-
-  bottles_hash.each do |formula_full_name, bottle_hash|
-    # First, check that we won't encounter an error in the middle of uploading bottles.
-    preupload_check(user, token, skopeo, formula_full_name, bottle_hash,
-                    keep_old:, dry_run:, warn_on_error:)
-  end
-
-  # We intentionally iterate over `bottles_hash` twice to
-  # avoid erroring out in the middle of uploading bottles.
-  # rubocop:disable Style/CombinableLoops
-  bottles_hash.each do |formula_full_name, bottle_hash|
-    # Next, upload the bottles after checking them all.
-    upload_bottle(user, token, skopeo, formula_full_name, bottle_hash,
-                  keep_old:, dry_run:, warn_on_error:)
-  end
-  # rubocop:enable Style/CombinableLoops
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHubReleases.html b/docs/GitHubReleases.html deleted file mode 100644 index c84afc3fe..000000000 --- a/docs/GitHubReleases.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - Class: GitHubReleases - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: GitHubReleases - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Context
-
- - - - - - -
-
Defined in:
-
github_releases.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

GitHub Releases client.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
URL_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%r{https://github\.com/([\w-]+)/([\w-]+)?/releases/download/(.+)}
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - - -
-

Instance Method Details

- - -
-

- - #upload_bottles(bottles_hash) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - bottles_hash - - - (Hash{String => T.untyped}) - - - -
  • - -
- - -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'github_releases.rb', line 14
-
-def upload_bottles(bottles_hash)
-  bottles_hash.each_value do |bottle_hash|
-    root_url = bottle_hash["bottle"]["root_url"]
-    url_match = root_url.match URL_REGEX
-    _, user, repo, tag = *url_match
-
-    # Ensure a release is created.
-    release = begin
-      rel = GitHub.get_release user, repo, tag
-      odebug "Existing GitHub release \"#{tag}\" found"
-      rel
-    rescue GitHub::API::HTTPNotFoundError
-      odebug "Creating new GitHub release \"#{tag}\""
-      GitHub.create_or_update_release user, repo, tag
-    end
-
-    # Upload bottles as release assets.
-    bottle_hash["bottle"]["tags"].each_value do |tag_hash|
-      remote_file = tag_hash["filename"]
-      local_file = tag_hash["local_filename"]
-      odebug "Uploading #{remote_file}"
-      GitHub.upload_release_asset user, repo, release["id"], local_file:, remote_file:
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHubRunner.html b/docs/GitHubRunner.html deleted file mode 100644 index aedde1a57..000000000 --- a/docs/GitHubRunner.html +++ /dev/null @@ -1,1003 +0,0 @@ - - - - - - - Class: GitHubRunner - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: GitHubRunner - - - -

-
- -
-
Inherits:
-
- T::Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
github_runner.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(platform:, arch:, spec:, macos_version: nil, active: false) ⇒ void - - - - - -

-
- - -
-
-
-

Parameters:

-
    - -
  • - - platform - - - (Symbol) - - - -
  • - -
  • - - arch - - - (Symbol) - - - -
  • - -
  • - - spec - - - (LinuxRunnerSpec, MacOSRunnerSpec) - - - -
  • - -
  • - - macos_version - - - (MacOSVersion, nil) - - - (defaults to: nil) - - -
  • - -
  • - - active - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :platform, Symbol
-const :arch, Symbol
-const :spec, T.any(LinuxRunnerSpec, MacOSRunnerSpec)
-const :macos_version, T.nilable(MacOSVersion)
-prop  :active, T::Boolean, default: false
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #activeBoolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop active.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-prop  :active, T::Boolean, default: false
-
-
- - - -
-

- - #archSymbol (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop arch.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :arch, Symbol
-
-
- - - -
-

- - #macos_versionMacOSVersion? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop macos_version.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :macos_version, T.nilable(MacOSVersion)
-
-
- - - -
-

- - #platformSymbol (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop platform.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :platform, Symbol
-
-
- - - -
-

- - #specLinuxRunnerSpec, MacOSRunnerSpec (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop spec.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :spec, T.any(LinuxRunnerSpec, MacOSRunnerSpec)
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #arm64?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'github_runner.rb', line 30
-
-def arm64?
-  arch == :arm64
-end
-
-
- -
-

- - #linux?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'github_runner.rb', line 20
-
-def linux?
-  platform == :linux
-end
-
-
- -
-

- - #macos?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'github_runner.rb', line 15
-
-def macos?
-  platform == :macos
-end
-
-
- -
-

- - #x86_64?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'github_runner.rb', line 25
-
-def x86_64?
-  arch == :x86_64
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitHubRunnerMatrix.html b/docs/GitHubRunnerMatrix.html deleted file mode 100644 index 5447f8cb7..000000000 --- a/docs/GitHubRunnerMatrix.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - Class: GitHubRunnerMatrix - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: GitHubRunnerMatrix - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
github_runner_matrix.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(testing_formulae, deleted_formulae, all_supported:, dependent_matrix:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - testing_formulae - - - (Array<TestRunnerFormula>) - - - -
  • - -
  • - - deleted_formulae - - - (Array<String>) - - - -
  • - -
  • - - all_supported - - - (Boolean) - - - -
  • - -
  • - - dependent_matrix - - - (Boolean) - - - -
  • - -
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'github_runner_matrix.rb', line 43
-
-def initialize(testing_formulae, deleted_formulae, all_supported:, dependent_matrix:)
-  if all_supported && (testing_formulae.present? || deleted_formulae.present? || dependent_matrix)
-    raise ArgumentError, "all_supported is mutually exclusive to other arguments"
-  end
-
-  @testing_formulae = T.let(testing_formulae, T::Array[TestRunnerFormula])
-  @deleted_formulae = T.let(deleted_formulae, T::Array[String])
-  @all_supported = T.let(all_supported, T::Boolean)
-  @dependent_matrix = T.let(dependent_matrix, T::Boolean)
-
-  @runners = T.let([], T::Array[GitHubRunner])
-  generate_runners!
-
-  freeze
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #runnersObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'github_runner_matrix.rb', line 33
-
-def runners
-  @runners
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #active_runner_specs_hashArray<RunnerSpecHash> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<RunnerSpecHash>) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-
-
# File 'github_runner_matrix.rb', line 60
-
-def active_runner_specs_hash
-  runners.select(&:active)
-         .map(&:spec)
-         .map(&:to_h)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/GitRepository.html b/docs/GitRepository.html deleted file mode 100644 index 977133d62..000000000 --- a/docs/GitRepository.html +++ /dev/null @@ -1,1684 +0,0 @@ - - - - - - - Class: GitRepository - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: GitRepository - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
git_repository.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Given a Pathname, provides methods for querying Git repository information.

- - -
-
-
- - -

See Also:

- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(pathname) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - pathname - - - (Pathname) - - - -
  • - -
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'git_repository.rb', line 14
-
-def initialize(pathname)
-  @pathname = pathname
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #pathnamePathname (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'git_repository.rb', line 11
-
-def pathname
-  @pathname
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #branch_name(safe: false) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the name of the currently checked-out branch, or HEAD if the repository is in a detached HEAD state.

- - -
-
-
-

Parameters:

-
    - -
  • - - safe - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-
-
# File 'git_repository.rb', line 60
-
-def branch_name(safe: false)
-  popen_git("rev-parse", "--abbrev-ref", "HEAD", safe:)
-end
-
-
- -
-

- - #commit_message(commit = "HEAD", safe: false) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the full commit message of the specified commit, or of the HEAD commit if unspecified.

- - -
-
-
-

Parameters:

-
    - -
  • - - commit - - - (String) - - - (defaults to: "HEAD") - - -
  • - -
  • - - safe - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-107
-108
-109
-
-
# File 'git_repository.rb', line 107
-
-def commit_message(commit = "HEAD", safe: false)
-  popen_git("log", "-1", "--pretty=%B", commit, "--", safe:, err: :out)&.strip
-end
-
-
- -
-

- - #default_origin_branch?Boolean? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns true if the repository's current branch matches the default origin branch.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-85
-86
-
-
# File 'git_repository.rb', line 84
-
-def default_origin_branch?
-  origin_branch_name == branch_name
-end
-
-
- -
-

- - #git_repository?Boolean - - - - Also known as: - git_repo? - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'git_repository.rb', line 19
-
-def git_repository?
-  pathname.join(".git").exist?
-end
-
-
- -
-

- - #head_ref(safe: false) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the full commit hash of the HEAD commit.

- - -
-
-
-

Parameters:

-
    - -
  • - - safe - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-41
-42
-43
-
-
# File 'git_repository.rb', line 41
-
-def head_ref(safe: false)
-  popen_git("rev-parse", "--verify", "--quiet", "HEAD", safe:)
-end
-
-
- -
-

- - #last_commit_dateString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the date of the last commit, in YYYY-MM-DD format.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'git_repository.rb', line 90
-
-def last_commit_date
-  popen_git("show", "-s", "--format=%cd", "--date=short", "HEAD")
-end
-
-
- -
-

- - #last_committedString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the relative date of the last commit, e.g. "1 hour ago"

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-55
-56
-
-
# File 'git_repository.rb', line 54
-
-def last_committed
-  popen_git("show", "-s", "--format=%cr", "HEAD")
-end
-
-
- -
-

- - #origin_branch_nameString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the name of the default origin HEAD branch.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-79
-80
-
-
# File 'git_repository.rb', line 78
-
-def origin_branch_name
-  popen_git("symbolic-ref", "-q", "--short", "refs/remotes/origin/HEAD")&.split("/")&.last
-end
-
-
- -
-

- - #origin_has_branch?(branch) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns true if the given branch exists on origin

- - -
-
-
-

Parameters:

-
    - -
  • - - branch - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-97
-98
-
-
# File 'git_repository.rb', line 96
-
-def origin_has_branch?(branch)
-  popen_git("ls-remote", "--heads", "origin", branch).present?
-end
-
-
- -
-

- - #origin_urlString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the URL of the Git origin remote.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'git_repository.rb', line 27
-
-def origin_url
-  popen_git("config", "--get", "remote.origin.url")
-end
-
-
- -
-

- - #origin_url=(origin) ⇒ Boolean? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sets the URL of the Git origin remote.

- - -
-
-
-

Parameters:

-
    - -
  • - - origin - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-
-
# File 'git_repository.rb', line 33
-
-def origin_url=(origin)
-  return if !git_repo? || !Utils::Git.available?
-
-  safe_system Utils::Git.git, "remote", "set-url", "origin", origin, chdir: pathname
-end
-
-
- -
-

- - #rename_branch(old:, new:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Change the name of a local branch

- - -
-
-
-

Parameters:

-
    - -
  • - - old - - - (String) - - - -
  • - -
  • - - new - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'git_repository.rb', line 66
-
-def rename_branch(old:, new:)
-  popen_git("branch", "-m", old, new)
-end
-
-
- -
-

- - #set_head_origin_autovoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'git_repository.rb', line 101
-
-def set_head_origin_auto
-  popen_git("remote", "set-head", "origin", "--auto")
-end
-
-
- -
-

- - #set_upstream_branch(local:, origin:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Set an upstream branch for a local branch to track

- - -
-
-
-

Parameters:

-
    - -
  • - - local - - - (String) - - - -
  • - -
  • - - origin - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-72
-73
-74
-
-
# File 'git_repository.rb', line 72
-
-def set_upstream_branch(local:, origin:)
-  popen_git("branch", "-u", "origin/#{origin}", local)
-end
-
-
- -
-

- - #short_head_ref(length: nil, safe: false) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets a short commit hash of the HEAD commit.

- - -
-
-
-

Parameters:

-
    - -
  • - - length - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
  • - - safe - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-50
-
-
# File 'git_repository.rb', line 47
-
-def short_head_ref(length: nil, safe: false)
-  short_arg = length.present? ? "--short=#{length}" : "--short"
-  popen_git("rev-parse", short_arg, "--verify", "--quiet", "HEAD", safe:)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Hardware.html b/docs/Hardware.html deleted file mode 100644 index 2a7a6a6b6..000000000 --- a/docs/Hardware.html +++ /dev/null @@ -1,464 +0,0 @@ - - - - - - - Module: Hardware - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hardware - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/mac/hardware.rb,
- extend/os/mac/hardware/cpu.rb,
extend/os/linux/hardware/cpu.rb,
hardware.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for querying hardware information.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: CPU - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .cores_as_wordsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-
-
# File 'hardware.rb', line 189
-
-def cores_as_words
-  case Hardware::CPU.cores
-  when 1 then "single"
-  when 2 then "dual"
-  when 4 then "quad"
-  when 6 then "hexa"
-  when 8 then "octa"
-  when 12 then "dodeca"
-  else
-    Hardware::CPU.cores
-  end
-end
-
-
- -
-

- - .oldest_cpu(_version = nil) ⇒ Symbol - - - - Also known as: - generic_oldest_cpu - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (Version, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'extend/os/mac/hardware.rb', line 6
-
-def self.oldest_cpu(version = nil)
-  version = if version
-    MacOSVersion.new(version.to_s)
-  else
-    MacOS.version
-  end
-  if CPU.arch == :arm64
-    :arm_vortex_tempest
-  # This cannot use a newer CPU e.g. haswell because Rosetta 2 does not
-  # support AVX instructions in bottles:
-  #   https://github.com/Homebrew/homebrew-core/issues/67713
-  elsif version >= :ventura
-    :westmere
-  elsif version >= :mojave
-    :nehalem
-  else
-    generic_oldest_cpu
-  end
-end
-
-
- -
-

- - .rustflags_target_cpuString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a Rust flag to set the target CPU if necessary. -Defaults to nil.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-
-
# File 'hardware.rb', line 230
-
-def rustflags_target_cpu
-  # Rust already defaults to the oldest supported cpu for each target-triplet
-  # so it's safe to ignore generic archs such as :armv6 here.
-  # Rust defaults to apple-m1 since Rust 1.71 for aarch64-apple-darwin.
-  @target_cpu ||= case (cpu = oldest_cpu)
-  when :core
-    :prescott
-  when :native, :ivybridge, :sandybridge, :westmere, :nehalem, :core2
-    cpu
-  end
-  return if @target_cpu.blank?
-
-  "--codegen target-cpu=#{@target_cpu}"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Hardware/CPU.html b/docs/Hardware/CPU.html deleted file mode 100644 index e395208f5..000000000 --- a/docs/Hardware/CPU.html +++ /dev/null @@ -1,3277 +0,0 @@ - - - - - - - Class: Hardware::CPU - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hardware::CPU - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
hardware.rb,
- extend/os/mac/hardware/cpu.rb,
extend/os/linux/hardware/cpu.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper module for querying CPU information.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
INTEL_32BIT_ARCHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:i386].freeze
- -
INTEL_64BIT_ARCHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:x86_64].freeze
- -
INTEL_ARCHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(INTEL_32BIT_ARCHS + INTEL_64BIT_ARCHS).freeze
- -
PPC_32BIT_ARCHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:ppc, :ppc32, :ppc7400, :ppc7450, :ppc970].freeze
- -
PPC_64BIT_ARCHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:ppc64, :ppc64le, :ppc970].freeze
- -
PPC_ARCHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(PPC_32BIT_ARCHS + PPC_64BIT_ARCHS).freeze
- -
ARM_64BIT_ARCHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:arm64, :aarch64].freeze
- -
ARM_ARCHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
ARM_64BIT_ARCHS
- -
ALL_ARCHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  *INTEL_ARCHS,
-  *PPC_ARCHS,
-  *ARM_ARCHS,
-].freeze
- -
INTEL_64BIT_OLDEST_CPU = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
:core2
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .aes?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 58
-
-def aes?
-  sysctl_bool("hw.optional.aes")
-end
-
-
- -
-

- - .altivec?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 62
-
-def altivec?
-  sysctl_bool("hw.optional.altivec")
-end
-
-
- -
-

- - .amd_family(family) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-
-
# File 'extend/os/linux/hardware/cpu.rb', line 76
-
-def amd_family(family)
-  case family
-  when 0x06
-    :amd_k7
-  when 0x0f
-    :amd_k8
-  when 0x10
-    :amd_k10
-  when 0x11
-    :amd_k8_k10_hybrid
-  when 0x12
-    :amd_k12
-  when 0x14
-    :bobcat
-  when 0x15
-    :bulldozer
-  when 0x16
-    :jaguar
-  when 0x17
-    :zen
-  when 0x19
-    :zen3
-  end
-end
-
-
- -
-

- - .archObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'hardware.rb', line 73
-
-def arch
-  case bits
-  when 32
-    arch_32_bit
-  when 64
-    arch_64_bit
-  else
-    :dunno
-  end
-end
-
-
- -
-

- - .arch_32_bitSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'hardware.rb', line 46
-
-def arch_32_bit
-  if arm?
-    :arm
-  elsif intel?
-    :i386
-  elsif ppc32?
-    :ppc32
-  else
-    :dunno
-  end
-end
-
-
- -
-

- - .arch_64_bitSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'hardware.rb', line 59
-
-def arch_64_bit
-  if arm?
-    :arm64
-  elsif intel?
-    :x86_64
-  elsif ppc64le?
-    :ppc64le
-  elsif ppc64?
-    :ppc64
-  else
-    :dunno
-  end
-end
-
-
- -
-

- - .arch_flag(arch) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-175
-176
-177
-178
-179
-
-
# File 'hardware.rb', line 175
-
-def arch_flag(arch)
-  return "-mcpu=#{arch}" if ppc?
-
-  "-march=#{arch}"
-end
-
-
- -
-

- - .arm?Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether the CPU architecture is ARM.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-151
-152
-153
-
-
# File 'hardware.rb', line 151
-
-def arm?
-  type == :arm
-end
-
-
- -
-

- - .avx2?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 70
-
-def avx2?
-  sysctl_bool("hw.optional.avx2_0")
-end
-
-
- -
-

- - .avx?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 66
-
-def avx?
-  sysctl_bool("hw.optional.avx1_0")
-end
-
-
- -
-

- - .big_endian?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-159
-160
-161
-
-
# File 'hardware.rb', line 159
-
-def big_endian?
-  [1].pack("I") == [1].pack("N")
-end
-
-
- -
-

- - .bitsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-107
-108
-109
-110
-111
-112
-
-
# File 'hardware.rb', line 107
-
-def bits
-  @bits ||= case RUBY_PLATFORM
-  when /x86_64/, /ppc64|powerpc64/, /aarch64|arm64/ then 64
-  when /i\d86/, /ppc/, /arm/ then 32
-  end
-end
-
-
- -
-

- - .coresObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'hardware.rb', line 99
-
-def cores
-  return @cores if @cores
-
-  @cores = Utils.popen_read("getconf", "_NPROCESSORS_ONLN").chomp.to_i
-  @cores = 1 unless $CHILD_STATUS.success?
-  @cores
-end
-
-
- -
-

- - .extmodelObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-54
-55
-56
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 54
-
-def extmodel
-  sysctl_int("machdep.cpu.extmodel")
-end
-
-
- -
-

- - .familySymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 24
-
-def family
-  if arm?
-    arm_family
-  elsif intel?
-    intel_family
-  else
-    :dunno
-  end
-end
-
-
- -
-

- - .feature?(name) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-171
-172
-173
-
-
# File 'hardware.rb', line 171
-
-def feature?(name)
-  features.include?(name)
-end
-
-
- -
-

- - .featuresObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Compatibility with Mac method, which returns lowercase symbols -instead of strings.

- - -
-
-
- - -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-115
-
-
# File 'extend/os/linux/hardware/cpu.rb', line 109
-
-def features
-  @features ||= sysctl_n(
-    "machdep.cpu.features",
-    "machdep.cpu.extfeatures",
-    "machdep.cpu.leaf7_features",
-  ).split.map { |s| s.downcase.to_sym }
-end
-
-
- -
-

- - .flagsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Supported CPU instructions

- - -
-
-
- - -
- - - - -
-
-
-
-102
-103
-104
-105
-
-
# File 'extend/os/linux/hardware/cpu.rb', line 102
-
-def flags
-  @flags ||= cpuinfo[/^(?:flags|Features)\s*: (.*)/, 1]&.split
-  @flags ||= []
-end
-
-
- -
-

- - .in_rosetta2?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True when running under an Intel-based shell via Rosetta 2 on an -Apple Silicon Mac. This can be detected via seeing if there's a -conflict between what uname reports and the underlying sysctl flags, -since the sysctl flags don't change behaviour under Rosetta 2.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 38
-
-def in_rosetta2?
-  sysctl_bool("sysctl.proc_translated")
-end
-
-
- -
-

- - .intel?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-127
-128
-129
-
-
# File 'hardware.rb', line 127
-
-def intel?
-  type == :intel
-end
-
-
- -
-

- - .intel_family(family, cpu_model) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 129
-
-def intel_family(_family = nil, _cpu_model = nil)
-  case sysctl_int("hw.cpufamily")
-  when 0x73d67300 # Yonah: Core Solo/Duo
-    :core
-  when 0x426f69ef # Merom: Core 2 Duo
-    :core2
-  when 0x78ea4fbc # Penryn
-    :penryn
-  when 0x6b5a4cd2 # Nehalem
-    :nehalem
-  when 0x573b5eec # Westmere
-    :westmere
-  when 0x5490b78c # Sandy Bridge
-    :sandybridge
-  when 0x1f65e835 # Ivy Bridge
-    :ivybridge
-  when 0x10b282dc # Haswell
-    :haswell
-  when 0x582ed09c # Broadwell
-    :broadwell
-  when 0x37fc219f # Skylake
-    :skylake
-  when 0x0f817246 # Kaby Lake
-    :kabylake
-  when 0x38435547 # Ice Lake
-    :icelake
-  when 0x1cf8a03e # Comet Lake
-    :cometlake
-  else
-    :dunno
-  end
-end
-
-
- -
-

- - .is_32_bit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-119
-120
-121
-
-
# File 'hardware.rb', line 119
-
-def is_32_bit?
-  bits == 32
-end
-
-
- -
-

- - .is_64_bit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-123
-124
-125
-
-
# File 'hardware.rb', line 123
-
-def is_64_bit?
-  bits == 64
-end
-
-
- -
-

- - .little_endian?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-155
-156
-157
-
-
# File 'hardware.rb', line 155
-
-def little_endian?
-  !big_endian?
-end
-
-
- -
-

- - .optimization_flagsObject - - - - Also known as: - generic_optimization_flags - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-
-
# File 'extend/os/linux/hardware/cpu.rb', line 7
-
-def optimization_flags
-  @optimization_flags ||= begin
-    flags = generic_optimization_flags.dup
-    flags[:native] = arch_flag(Homebrew::EnvConfig.arch)
-    flags
-  end
-end
-
-
- -
-

- - .physical_cpu_arm64?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- Note: -

This is more reliable than checking uname. sysctl returns -the right answer even when running in Rosetta 2.

-
-
- - - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-88
-89
-90
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 88
-
-def physical_cpu_arm64?
-  sysctl_bool("hw.optional.arm64")
-end
-
-
- -
-

- - .ppc32?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-135
-136
-137
-
-
# File 'hardware.rb', line 135
-
-def ppc32?
-  ppc? && is_32_bit?
-end
-
-
- -
-

- - .ppc64?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-143
-144
-145
-
-
# File 'hardware.rb', line 143
-
-def ppc64?
-  ppc? && is_64_bit? && big_endian?
-end
-
-
- -
-

- - .ppc64le?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-139
-140
-141
-
-
# File 'hardware.rb', line 139
-
-def ppc64le?
-  ppc? && is_64_bit? && little_endian?
-end
-
-
- -
-

- - .ppc?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-131
-132
-133
-
-
# File 'hardware.rb', line 131
-
-def ppc?
-  type == :ppc
-end
-
-
- -
-

- - .sse3?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-74
-75
-76
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 74
-
-def sse3?
-  sysctl_bool("hw.optional.sse3")
-end
-
-
- -
-

- - .sse4?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 50
-
-def sse4?
-  sysctl_bool("hw.optional.sse4_1")
-end
-
-
- -
-

- - .sse4_2?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-82
-83
-84
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 82
-
-def sse4_2?
-  sysctl_bool("hw.optional.sse4_2")
-end
-
-
- -
-

- - .ssse3?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-79
-80
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 78
-
-def ssse3?
-  sysctl_bool("hw.optional.supplementalsse3")
-end
-
-
- -
-

- - .typeSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

These methods use info spewed out by sysctl. -Look in for decoding info.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 13
-
-def type
-  case sysctl_int("hw.cputype")
-  when MachO::Headers::CPU_TYPE_I386
-    :intel
-  when MachO::Headers::CPU_TYPE_ARM64
-    :arm
-  else
-    :dunno
-  end
-end
-
-
- -
-

- - .virtualized?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-92
-93
-94
-
-
# File 'extend/os/mac/hardware/cpu.rb', line 92
-
-def virtualized?
-  sysctl_bool("kern.hv_vmm_present")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Hash.html b/docs/Hash.html deleted file mode 100644 index 5d4a983b1..000000000 --- a/docs/Hash.html +++ /dev/null @@ -1,1585 +0,0 @@ - - - - - - - Class: Hash - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hash - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/hash/keys.rb,
- extend/blank.rb,
extend/enumerable.rb,
extend/hash/deep_merge.rb,
extend/object/deep_dup.rb,
extend/hash/deep_transform_values.rb,
extend/hash/keys.rbi,
extend/enumerable.rbi,
extend/hash/deep_merge.rbi,
extend/hash/deep_transform_values.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-

Direct Known Subclasses

-

Utils::TopologicalHash

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #assert_valid_keys(*valid_keys) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Validates all keys in a hash match *valid_keys, raising -ArgumentError on a mismatch.

- -

Note that keys are treated differently than HashWithIndifferentAccess, -meaning that string and symbol keys will not match.

- -

Example

- -
{ name: 'Rob', years: '28' }.assert_valid_keys(:name, :age)
-# => raises "ArgumentError: Unknown key: :years. Valid keys are: :name, :age"
-{ name: 'Rob', age: '28' }.assert_valid_keys('name', 'age')
-# => raises "ArgumentError: Unknown key: :name. Valid keys are: 'name', 'age'"
-{ name: 'Rob', age: '28' }.assert_valid_keys(:name, :age)   # => passes, raises nothing
-
- - -
-
-
-

Parameters:

-
    - -
  • - - valid_keys - - - (T.untyped) - - - -
  • - -
- - -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'extend/hash/keys.rb', line 21
-
-def assert_valid_keys(*valid_keys)
-  valid_keys.flatten!
-  each_key do |k|
-    next if valid_keys.include?(k)
-
-    raise ArgumentError,
-          "Unknown key: #{T.unsafe(k).inspect}. Valid keys are: #{valid_keys.map(&:inspect).join(", ")}"
-  end
-end
-
-
- -
-

- - #blank?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A hash is blank if it's empty:

- -
{}.blank?                # => true
-{ key: 'value' }.blank?  # => false
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-114
-
-
# File 'extend/blank.rb', line 114
-
-def blank? = empty?
-
-
- -
-

- - #compact_blankHash{Hash::K => Hash::V} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

#reject has its own definition, so this needs one too.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{Hash::K => Hash::V}) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-
-
# File 'extend/enumerable.rb', line 37
-
-def compact_blank = reject { |_k, v| T.unsafe(v).blank? }
-
-
- -
-

- - #deep_dupT.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a deep copy of hash.

- -

hash = { a: { b: 'b' } } - dup = hash.deep_dup - dup[:a][:c] = 'c'

- -

hash[:a][:c] # => nil - dup[:a][:c] # => "c"

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-
-
# File 'extend/object/deep_dup.rb', line 47
-
-def deep_dup
-  hash = dup
-  each_pair do |key, value|
-    case key
-    when ::String, ::Symbol
-      hash[key] = T.unsafe(value).deep_dup
-    else
-      hash.delete(key)
-      hash[T.unsafe(key).deep_dup] = T.unsafe(value).deep_dup
-    end
-  end
-  hash
-end
-
-
- -
-

- - #deep_merge(other_hash, &block) ⇒ Hash{Hash::K, T.type_parameter(:k2) => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new hash with self and other_hash merged recursively.

- -

Examples

- -
h1 = { a: true, b: { c: [1, 2, 3] } }
-h2 = { a: false, b: { x: [3, 4, 5] } }
-
-h1.deep_merge(h2) # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } }
-
- -

Like with Hash#merge in the standard library, a block can be provided -to merge values:

- -
h1 = { a: 100, b: 200, c: { c1: 100 } }
-h2 = { b: 250, c: { c1: 200 } }
-h1.deep_merge(h2) { |key, this_val, other_val| this_val + other_val }
-# => { a: 100, b: 450, c: { c1: 300 } }
-
- - -
-
-
-

Parameters:

-
    - -
  • - - other_hash - - - (Hash{T.type_parameter(:k2) => T.untyped}) - - - -
  • - -
  • - - block - - - (T.proc.params(k: T.untyped, v1: T.untyped, v2: T.untyped).returns(T.untyped), nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Hash::K, T.type_parameter(:k2) => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'extend/hash/deep_merge.rb', line 25
-
-def deep_merge(other_hash, &block)
-  dup.deep_merge!(other_hash, &block)
-end
-
-
- -
-

- - #deep_merge!(other_hash, &block) ⇒ Hash{Hash::K, T.type_parameter(:k2) => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Same as #deep_merge, but modifies self.

- - -
-
-
-

Parameters:

-
    - -
  • - - other_hash - - - (Hash{T.type_parameter(:k2) => T.untyped}) - - - -
  • - -
  • - - block - - - (T.proc.params(k: T.untyped, v1: T.untyped, v2: T.untyped).returns(T.untyped), nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Hash::K, T.type_parameter(:k2) => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'extend/hash/deep_merge.rb', line 30
-
-def deep_merge!(other_hash, &block)
-  merge!(other_hash) do |key, this_val, other_val|
-    if T.unsafe(this_val).is_a?(Hash) && other_val.is_a?(Hash)
-      T.unsafe(this_val).deep_merge(other_val, &block)
-    elsif block
-      yield(key, this_val, other_val)
-    else
-      other_val
-    end
-  end
-end
-
-
- -
-

- - #deep_stringify_keysHash{String => V} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new hash with all keys converted to strings. -This includes the keys from the root hash and from all -nested hashes and arrays.

- -

Example

- -
hash = { person: { name: 'Rob', age: '28' } }
-
-hash.deep_stringify_keys
-# => {"person"=>{"name"=>"Rob", "age"=>"28"}}
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-62
-
-
# File 'extend/hash/keys.rb', line 62
-
-def deep_stringify_keys = T.unsafe(self).deep_transform_keys(&:to_s)
-
-
- -
-

- - #deep_stringify_keys!Hash{String => V} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Destructively converts all keys to strings. -This includes the keys from the root hash and from all -nested hashes and arrays.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-67
-
-
# File 'extend/hash/keys.rb', line 67
-
-def deep_stringify_keys! = T.unsafe(self).deep_transform_keys!(&:to_s)
-
-
- -
-

- - #deep_symbolize_keysHash{Symbol => V} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new hash with all keys converted to symbols, as long as -they respond to to_sym. This includes the keys from the root hash -and from all nested hashes and arrays.

- -

Example

- -
hash = { 'person' => { 'name' => 'Rob', 'age' => '28' } }
-
-hash.deep_symbolize_keys
-# => {:person=>{:name=>"Rob", :age=>"28"}}
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-81
-82
-83
-84
-85
-86
-87
-
-
# File 'extend/hash/keys.rb', line 81
-
-def deep_symbolize_keys
-  deep_transform_keys do |key|
-    T.unsafe(key).to_sym
-  rescue
-    key
-  end
-end
-
-
- -
-

- - #deep_symbolize_keys!Hash{Symbol => V} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Destructively converts all keys to symbols, as long as they respond -to to_sym. This includes the keys from the root hash and from all -nested hashes and arrays.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-92
-93
-94
-95
-96
-97
-98
-
-
# File 'extend/hash/keys.rb', line 92
-
-def deep_symbolize_keys!
-  deep_transform_keys! do |key|
-    T.unsafe(key).to_sym
-  rescue
-    key
-  end
-end
-
-
- -
-

- - #deep_transform_keys(&block) ⇒ Hash{T.type_parameter(:out) => V} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new hash with all keys converted by the block operation. -This includes the keys from the root hash and from all -nested hashes and arrays.

- -

Example

- -
hash = { person: { name: 'Rob', age: '28' } }
-
-hash.deep_transform_keys{ |key| key.to_s.upcase }
-# => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}}
-
- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.params(o: K).returns(T.type_parameter(:out))) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{T.type_parameter(:out) => V}) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-
-
# File 'extend/hash/keys.rb', line 43
-
-def deep_transform_keys(&block) = _deep_transform_keys_in_object(self, &block)
-
-
- -
-

- - #deep_transform_keys!(&block) ⇒ Hash{T.type_parameter(:out) => V} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Destructively converts all keys by using the block operation. -This includes the keys from the root hash and from all -nested hashes and arrays.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.params(o: K).returns(T.type_parameter(:out))) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{T.type_parameter(:out) => V}) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'extend/hash/keys.rb', line 48
-
-def deep_transform_keys!(&block) = _deep_transform_keys_in_object!(self, &block)
-
-
- -
-

- - #deep_transform_values(&block) ⇒ Hash{Hash::K => T.type_parameter(:out)} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new hash with all values converted by the block operation. -This includes the values from the root hash and from all -nested hashes and arrays.

- -

Example

- -
hash = { person: { name: 'Rob', age: '28' } }
-
-hash.deep_transform_values{ |value| value.to_s.upcase }
-# => {person: {name: "ROB", age: "28"}}
-
- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.params(o: Hash::V).returns(T.type_parameter(:out))) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Hash::K => T.type_parameter(:out)}) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'extend/hash/deep_transform_values.rb', line 17
-
-def deep_transform_values(&block) = _deep_transform_values_in_object(self, &block)
-
-
- -
-

- - #deep_transform_values!(&block) ⇒ Hash{Hash::K => T.type_parameter(:out)} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Destructively converts all values by using the block operation. -This includes the values from the root hash and from all -nested hashes and arrays.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.params(o: Hash::V).returns(T.type_parameter(:out))) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Hash::K => T.type_parameter(:out)}) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-
-
# File 'extend/hash/deep_transform_values.rb', line 22
-
-def deep_transform_values!(&block) = _deep_transform_values_in_object!(self, &block)
-
-
- -
-

- - #present?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-117
-
-
# File 'extend/blank.rb', line 117
-
-def present? = !empty? # :nodoc:
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/HeadSoftwareSpec.html b/docs/HeadSoftwareSpec.html deleted file mode 100644 index 396aedd56..000000000 --- a/docs/HeadSoftwareSpec.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - Class: HeadSoftwareSpec - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: HeadSoftwareSpec - - - -

-
- -
-
Inherits:
-
- SoftwareSpec - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
software_spec.rb
-
- -
- - - - -

Constant Summary

- -

Constants inherited - from SoftwareSpec

-

SoftwareSpec::PREDEFINED_OPTIONS

- - - - -

Instance Attribute Summary

- -

Attributes inherited from SoftwareSpec

-

#bottle_specification, #build, #compiler_failures, #dependency_collector, #deprecated_flags, #deprecated_options, #full_name, #name, #options, #owner, #patches, #resources

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from SoftwareSpec

-

#add_dep_option, #bottle, #bottle_defined?, #bottle_tag?, #bottled?, #declared_deps, #depends_on, #deprecated_option, #deps, #fails_with, #freeze, #go_resource, #initialize_dup, #needs, #option, #option_defined?, #patch, #recursive_dependencies, #recursive_requirements, #requirements, #resource, #resource_defined?, #url, #uses_from_macos

- - - - - - - - - - -

Methods included from OnSystem::MacOSAndLinux

-

included

-
-

Constructor Details

- -
-

- - #initialize(flags: []) ⇒ HeadSoftwareSpec - - - - - -

-
-

Returns a new instance of HeadSoftwareSpec.

- - -
-
-
- - -
- - - - -
-
-
-
-278
-279
-280
-281
-
-
# File 'software_spec.rb', line 278
-
-def initialize(flags: [])
-  super
-  @resource.version(Version.new("HEAD"))
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #verify_download_integrity(_filename) ⇒ Object - - - - - -

- - - - -
-
-
-
-283
-284
-285
-
-
# File 'software_spec.rb', line 283
-
-def verify_download_integrity(_filename)
-  # no-op
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew.html b/docs/Homebrew.html deleted file mode 100644 index 3e69b6369..000000000 --- a/docs/Homebrew.html +++ /dev/null @@ -1,3567 +0,0 @@ - - - - - - - Module: Homebrew - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew - - - Private -

-
- - - - -
-
Extended by:
-
Context, FileUtils
-
- - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
extend/os/mac/cleanup.rb,
- extend/os/linux/parser.rb,
extend/os/linux/cleanup.rb,
extend/os/linux/install.rb,
extend/os/mac/diagnostic.rb,
extend/os/linux/diagnostic.rb,
extend/os/mac/dev-cmd/bottle.rb,
extend/os/mac/missing_formula.rb,
extend/os/mac/simulate_system.rb,
extend/os/linux/simulate_system.rb,
extend/os/linux/cmd/update-report.rb,
extend/os/linux/dev-cmd/update-test.rb,
api.rb,
help.rb,
fetch.rb,
style.rb,
utils.rb,
global.rb,
search.rb,
unlink.rb,
cleanup.rb,
cmd/log.rb,
cmd/pin.rb,
cmd/tap.rb,
install.rb,
service.rb,
upgrade.rb,
api/cask.rb,
cli/args.rb,
cmd/deps.rb,
cmd/desc.rb,
cmd/docs.rb,
cmd/help.rb,
cmd/home.rb,
cmd/info.rb,
cmd/link.rb,
cmd/list.rb,
cmd/uses.rb,
manpages.rb,
settings.rb,
cmd/--env.rb,
cmd/fetch.rb,
cmd/unpin.rb,
cmd/untap.rb,
reinstall.rb,
uninstall.rb,
cli/parser.rb,
cmd/config.rb,
cmd/doctor.rb,
cmd/leaves.rb,
cmd/search.rb,
cmd/unlink.rb,
dev-cmd/sh.rb,
diagnostic.rb,
env_config.rb,
utils/gems.rb,
api/formula.rb,
attestation.rb,
cmd/--cache.rb,
cmd/cleanup.rb,
cmd/command.rb,
cmd/install.rb,
cmd/migrate.rb,
cmd/missing.rb,
cmd/options.rb,
cmd/readall.rb,
cmd/upgrade.rb,
completions.rb,
dev-cmd/cat.rb,
dev-cmd/irb.rb,
tap_auditor.rb,
api/download.rb,
cmd/--cellar.rb,
cmd/--prefix.rb,
cmd/commands.rb,
cmd/outdated.rb,
cmd/tap-info.rb,
dev-cmd/bump.rb,
dev-cmd/edit.rb,
dev-cmd/prof.rb,
dev-cmd/ruby.rb,
dev-cmd/test.rb,
api/analytics.rb,
cmd/analytics.rb,
cmd/developer.rb,
cmd/gist-logs.rb,
cmd/reinstall.rb,
cmd/uninstall.rb,
dev-cmd/audit.rb,
dev-cmd/style.rb,
dev-cmd/tests.rb,
bundle_version.rb,
cli/named_args.rb,
cmd/--caskroom.rb,
cmd/autoremove.rb,
cmd/pyenv-sync.rb,
cmd/rbenv-sync.rb,
dev-cmd/bottle.rb,
dev-cmd/create.rb,
dev-cmd/unpack.rb,
sorbet/parlour.rb,
cmd/completions.rb,
cmd/nodenv-sync.rb,
cmd/postinstall.rb,
dev-cmd/extract.rb,
dev-cmd/formula.rb,
dev-cmd/linkage.rb,
dev-cmd/pr-pull.rb,
dev-cmd/release.rb,
dev-cmd/rubydoc.rb,
dev-cmd/tap-new.rb,
formula_auditor.rb,
formula_creator.rb,
livecheck/error.rb,
missing_formula.rb,
simulate_system.rb,
source_location.rb,
abstract_command.rb,
cmd/--repository.rb,
resource_auditor.rb,
cmd/update-report.rb,
dev-cmd/livecheck.rb,
dev-cmd/pr-upload.rb,
dev-cmd/typecheck.rb,
dev-cmd/unbottled.rb,
formula_free_port.rb,
dev-cmd/pr-publish.rb,
formula_assertions.rb,
livecheck/strategy.rb,
bump_version_parser.rb,
dev-cmd/update-test.rb,
dev-cmd/vendor-gems.rb,
livecheck/constants.rb,
livecheck/livecheck.rb,
dev-cmd/bump-cask-pr.rb,
dev-cmd/pr-automerge.rb,
manpages/parser/ronn.rb,
dev-cmd/bump-revision.rb,
dev-cmd/contributions.rb,
livecheck/strategy/git.rb,
livecheck/strategy/gnu.rb,
livecheck/strategy/npm.rb,
livecheck/strategy/xml.rb,
dev-cmd/bump-formula-pr.rb,
dev-cmd/update-sponsors.rb,
livecheck/strategy/cpan.rb,
livecheck/strategy/json.rb,
livecheck/strategy/pypi.rb,
livecheck/strategy/xorg.rb,
livecheck/strategy/yaml.rb,
manpages/converter/roff.rb,
livecheck/strategy/crate.rb,
livecheck/strategy/gnome.rb,
unversioned_cask_checker.rb,
dev-cmd/generate-cask-api.rb,
livecheck/skip_conditions.rb,
livecheck/strategy/apache.rb,
dev-cmd/update-maintainers.rb,
livecheck/strategy/hackage.rb,
livecheck/strategy/sparkle.rb,
dev-cmd/update-license-data.rb,
livecheck/livecheck_version.rb,
manpages/converter/kramdown.rb,
dev-cmd/generate-formula-api.rb,
dev-cmd/install-bundler-gems.rb,
livecheck/strategy/bitbucket.rb,
livecheck/strategy/launchpad.rb,
dev-cmd/dispatch-build-bottle.rb,
livecheck/strategy/page_match.rb,
dev-cmd/bump-unversioned-casks.rb,
dev-cmd/determine-test-runners.rb,
livecheck/strategy/sourceforge.rb,
dev-cmd/update-python-resources.rb,
livecheck/strategy/header_match.rb,
dev-cmd/generate-man-completions.rb,
livecheck/strategy/extract_plist.rb,
livecheck/strategy/github_latest.rb,
livecheck/strategy/github_releases.rb,
livecheck/strategy/electron_builder.rb,
global.rbi,
service.rbi,
utils/gems.rbi,
sorbet/rbi/parlour.rbi,
livecheck/livecheck.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: API, Assertions, Attestation, CLI, Cmd, Completions, DevCmd, Diagnostic, EnvConfig, Fetch, FreePort, Help, Install, Livecheck, Manpages, MissingFormula, Parlour, Search, Settings, Style, Uninstall, Unlink, Upgrade - - - - Classes: AbstractCommand, BumpVersionParser, BundleVersion, Cleanup, FormulaAuditor, FormulaCreator, ResourceAuditor, Service, SimulateSystem, SourceLocation, TapAuditor, UnversionedCaskChecker - - -

- - -

- Constant Summary - collapse -

- -
- -
DEFAULT_PREFIX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.let(ENV.fetch("HOMEBREW_DEFAULT_PREFIX").freeze, String)
- -
DEFAULT_REPOSITORY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.let(ENV.fetch("HOMEBREW_DEFAULT_REPOSITORY").freeze, String)
- -
DEFAULT_CELLAR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"#{DEFAULT_PREFIX}/Cellar".freeze
- -
DEFAULT_MACOS_CELLAR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"#{HOMEBREW_DEFAULT_PREFIX}/Cellar".freeze
- -
DEFAULT_MACOS_ARM_CELLAR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"#{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}/Cellar".freeze
- -
DEFAULT_LINUX_CELLAR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"#{HOMEBREW_LINUX_DEFAULT_PREFIX}/Cellar".freeze
- -
HOMEBREW_BUNDLER_VERSION = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Keep in sync with the Gemfile.lock's BUNDLED WITH. -After updating this, run brew vendor-gems --update=--bundler.

- - -
-
-
- - -
-
-
"2.5.9"
- -
- - - - - -

Class Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, debug?, quiet?, verbose?, with_context

- - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- -
-

Class Attribute Details

- - - -
-

- - .auditing=(value) ⇒ Object (writeonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-84
-85
-86
-
-
# File 'global.rb', line 84
-
-def auditing=(value)
-  @auditing = value
-end
-
-
- - - -
-

- - .failed=(value) ⇒ Object (writeonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-84
-85
-86
-
-
# File 'global.rb', line 84
-
-def failed=(value)
-  @failed = value
-end
-
-
- - - -
-

- - .raise_deprecation_exceptions=(value) ⇒ Object (writeonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-84
-85
-86
-
-
# File 'global.rb', line 84
-
-def raise_deprecation_exceptions=(value)
-  @raise_deprecation_exceptions = value
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - ._system(cmd, *args, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-
-
# File 'utils.rb', line 29
-
-def self._system(cmd, *args, **options)
-  pid = fork do
-    yield if block_given?
-    args.map!(&:to_s)
-    begin
-      exec(cmd, *args, **options)
-    rescue
-      nil
-    end
-    exit! 1 # never gets here unless exec failed
-  end
-  Process.wait(T.must(pid))
-  $CHILD_STATUS.success?
-end
-
-
- -
-

- - .auditing?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-107
-108
-109
-
-
# File 'global.rb', line 107
-
-def auditing?
-  @auditing == true
-end
-
-
- -
-

- - .auto_update_command?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-124
-125
-126
-
-
# File 'global.rb', line 124
-
-def auto_update_command?
-  ENV.fetch("HOMEBREW_AUTO_UPDATE_COMMAND", false).present?
-end
-
-
- -
-

- - .backup(keg) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-
-
# File 'reinstall.rb', line 82
-
-def backup(keg)
-  keg.unlink
-  begin
-    keg.rename backup_path(keg)
-  rescue Errno::EACCES, Errno::ENOTEMPTY
-    odie <<~EOS
-      Could not rename #{keg.name} keg! Check/fix its permissions:
-        sudo chown -R #{ENV.fetch("USER", "$(whoami)")} #{keg}
-    EOS
-  end
-end
-
-
- -
-

- - .backup_path(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-105
-106
-107
-
-
# File 'reinstall.rb', line 105
-
-def backup_path(path)
-  Pathname.new "#{path}.reinstall"
-end
-
-
- -
-

- - .default_prefix?(prefix = HOMEBREW_PREFIX) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether Homebrew is using the default prefix.

- - -
-
-
-

Parameters:

-
    - -
  • - - prefix - - - (Pathname, String) - - - (defaults to: HOMEBREW_PREFIX) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'global.rb', line 90
-
-def default_prefix?(prefix = HOMEBREW_PREFIX)
-  prefix.to_s == DEFAULT_PREFIX
-end
-
-
- -
-

- - .failed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-94
-95
-96
-97
-
-
# File 'global.rb', line 94
-
-def failed?
-  @failed ||= false
-  @failed == true
-end
-
-
- -
-

- - .forget_user_gem_groups!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-209
-210
-211
-212
-
-
# File 'utils/gems.rb', line 209
-
-def forget_user_gem_groups!
-  GEM_GROUPS_FILE.truncate(0) if GEM_GROUPS_FILE.exist?
-  @user_gem_groups = []
-end
-
-
- -
-

- - .inject_dump_stats!(the_module, pattern) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-
-
# File 'utils.rb', line 55
-
-def self.inject_dump_stats!(the_module, pattern)
-  @injected_dump_stat_modules ||= {}
-  @injected_dump_stat_modules[the_module] ||= []
-  injected_methods = @injected_dump_stat_modules[the_module]
-  the_module.module_eval do
-    instance_methods.grep(pattern).each do |name|
-      next if injected_methods.include? name
-
-      method = instance_method(name)
-      define_method(name) do |*args, &block|
-        time = Time.now
-
-        begin
-          method.bind_call(self, *args, &block)
-        ensure
-          $times[name] ||= 0
-          $times[name] += Time.now - time
-        end
-      end
-    end
-  end
-
-  return unless $times.nil?
-
-  $times = {}
-  at_exit do
-    col_width = [$times.keys.map(&:size).max.to_i + 2, 15].max
-    $times.sort_by { |_k, v| v }.each do |method, time|
-      puts format("%<method>-#{col_width}s %<time>0.4f sec", method: "#{method}:", time:)
-    end
-  end
-end
-
-
- -
-

- - .install_bundler!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-
-
# File 'utils/gems.rb', line 161
-
-def install_bundler!
-  old_bundler_version = ENV.fetch("BUNDLER_VERSION", nil)
-
-  setup_gem_environment!
-
-  ENV["BUNDLER_VERSION"] = HOMEBREW_BUNDLER_VERSION # Set so it correctly finds existing installs
-  install_gem_setup_path!(
-    "bundler",
-    version:               HOMEBREW_BUNDLER_VERSION,
-    executable:            "bundle",
-    setup_gem_environment: false,
-  )
-ensure
-  ENV["BUNDLER_VERSION"] = old_bundler_version
-end
-
-
- -
-

- - .install_bundler_gems!(only_warn_on_failure: false, setup_path: true, groups: []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-
-
# File 'utils/gems.rb', line 223
-
-def install_bundler_gems!(only_warn_on_failure: false, setup_path: true, groups: [])
-  old_path = ENV.fetch("PATH", nil)
-  old_gem_path = ENV.fetch("GEM_PATH", nil)
-  old_gem_home = ENV.fetch("GEM_HOME", nil)
-  old_bundle_gemfile = ENV.fetch("BUNDLE_GEMFILE", nil)
-  old_bundle_with = ENV.fetch("BUNDLE_WITH", nil)
-  old_bundle_frozen = ENV.fetch("BUNDLE_FROZEN", nil)
-
-  invalid_groups = groups - valid_gem_groups
-  raise ArgumentError, "Invalid gem groups: #{invalid_groups.join(", ")}" unless invalid_groups.empty?
-
-  # Tests should not modify the state of the repository.
-  if ENV["HOMEBREW_TESTS"]
-    setup_gem_environment!
-    return
-  end
-
-  install_bundler!
-
-  # Combine the passed groups with the ones stored in settings.
-  groups |= (user_gem_groups & valid_gem_groups)
-  groups.sort!
-
-  if (homebrew_bundle_user_cache = ENV.fetch("HOMEBREW_BUNDLE_USER_CACHE", nil))
-    ENV["BUNDLE_USER_CACHE"] = homebrew_bundle_user_cache
-  end
-  ENV["BUNDLE_GEMFILE"] = gemfile
-  ENV["BUNDLE_WITH"] = groups.join(" ")
-  ENV["BUNDLE_FROZEN"] = "true"
-
-  if @bundle_installed_groups != groups
-    bundle = File.join(find_in_path("bundle"), "bundle")
-    bundle_check_output = `#{bundle} check 2>&1`
-    bundle_check_failed = !$CHILD_STATUS.success?
-
-    # for some reason sometimes the exit code lies so check the output too.
-    bundle_install_required = bundle_check_failed || bundle_check_output.include?("Install missing gems")
-
-    if user_vendor_version != VENDOR_VERSION
-      # Check if the install is intact. This is useful if any gems are added to gitignore.
-      # We intentionally map over everything and then call `any?` so that we remove the spec of each bad gem.
-      specs = bundler_definition.resolve.materialize(bundler_definition.locked_dependencies)
-      vendor_reinstall_required = specs.map do |spec|
-        spec_file = "#{Gem.dir}/specifications/#{spec.full_name}.gemspec"
-        next false unless File.exist?(spec_file)
-
-        cache_file = "#{Gem.dir}/cache/#{spec.full_name}.gem"
-        if File.exist?(cache_file)
-          require "rubygems/package"
-          package = Gem::Package.new(cache_file)
-
-          package_install_intact = begin
-            contents = package.contents
-
-            # If the gem has contents, ensure we have every file installed it contains.
-            contents&.all? do |gem_file|
-              File.exist?("#{Gem.dir}/gems/#{spec.full_name}/#{gem_file}")
-            end
-          rescue Gem::Package::Error, Gem::Security::Exception
-            # Malformed, assume broken
-            File.unlink(cache_file)
-            false
-          end
-
-          next false if package_install_intact
-        end
-
-        # Mark gem for reinstallation
-        File.unlink(spec_file)
-        true
-      end.any?
-
-      VENDOR_VERSION_FILE.dirname.mkpath
-      VENDOR_VERSION_FILE.write(VENDOR_VERSION.to_s)
-
-      bundle_install_required ||= vendor_reinstall_required
-    end
-
-    bundle_installed = if bundle_install_required
-      if system bundle, "install", out: :err
-        true
-      else
-        message = <<~EOS
-          failed to run `#{bundle} install`!
-        EOS
-        if only_warn_on_failure
-          opoo_if_defined message
-        else
-          odie_if_defined message
-        end
-        false
-      end
-    elsif system bundle, "clean", out: :err # even if we have nothing to install, we may have removed gems
-      true
-    else
-      message = <<~EOS
-        failed to run `#{bundle} clean`!
-      EOS
-      if only_warn_on_failure
-        opoo_if_defined message
-      else
-        odie_if_defined message
-      end
-      false
-    end
-
-    if bundle_installed
-      write_user_gem_groups(groups)
-      @bundle_installed_groups = groups
-    end
-  end
-
-  setup_gem_environment!
-ensure
-  unless setup_path
-    # Reset the paths. We need to have at least temporarily changed them while invoking `bundle`.
-    ENV["PATH"] = old_path
-    ENV["GEM_PATH"] = old_gem_path
-    ENV["GEM_HOME"] = old_gem_home
-    ENV["BUNDLE_GEMFILE"] = old_bundle_gemfile
-    ENV["BUNDLE_WITH"] = old_bundle_with
-    ENV["BUNDLE_FROZEN"] = old_bundle_frozen
-  end
-end
-
-
- -
-

- - .install_gem!(name, version: nil, setup_gem_environment: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-
-
# File 'utils/gems.rb', line 117
-
-def install_gem!(name, version: nil, setup_gem_environment: true)
-  setup_gem_environment! if setup_gem_environment
-
-  specs = Gem::Specification.find_all_by_name(name, version)
-
-  if specs.empty?
-    ohai_if_defined "Installing '#{name}' gem"
-    # `document: []` is equivalent to --no-document
-    # `build_args: []` stops ARGV being used as a default
-    # `env_shebang: true` makes shebangs generic to allow switching between system and Portable Ruby
-    specs = Gem.install name, version, document: [], build_args: [], env_shebang: true
-  end
-
-  specs += specs.flat_map(&:runtime_dependencies)
-                .flat_map(&:to_specs)
-
-  # Add the specs to the $LOAD_PATH.
-  specs.each do |spec|
-    spec.require_paths.each do |path|
-      full_path = File.join(spec.full_gem_path, path)
-      $LOAD_PATH.unshift full_path unless $LOAD_PATH.include?(full_path)
-    end
-  end
-rescue Gem::UnsatisfiableDependencyError
-  odie_if_defined "failed to install the '#{name}' gem."
-end
-
-
- -
-

- - .install_gem_setup_path!(name, version: nil, executable: name, setup_gem_environment: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-144
-145
-146
-147
-148
-149
-150
-151
-152
-
-
# File 'utils/gems.rb', line 144
-
-def install_gem_setup_path!(name, version: nil, executable: name, setup_gem_environment: true)
-  install_gem!(name, version:, setup_gem_environment:)
-  return if find_in_path(executable)
-
-  odie_if_defined <<~EOS
-    the '#{name}' gem is installed but couldn't find '#{executable}' in the PATH:
-      #{ENV.fetch("PATH")}
-  EOS
-end
-
-
- -
-

- - .messagesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'global.rb', line 99
-
-def messages
-  @messages ||= Messages.new
-end
-
-
- -
-

- - .migrate_gcc_dependents_if_neededObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'extend/os/linux/cmd/update-report.rb', line 11
-
-def migrate_gcc_dependents_if_needed
-  return if Settings.read("gcc-rpaths.fixed") == "true"
-
-  Formula.installed.each do |formula|
-    next unless formula.tap&.core_tap?
-
-    recursive_runtime_dependencies = Dependency.expand(
-      formula,
-      cache_key: "update-report",
-    ) do |_, dependency|
-      Dependency.prune if dependency.build? || dependency.test?
-    end
-    next unless recursive_runtime_dependencies.map(&:name).include? "gcc"
-
-    keg = formula.installed_kegs.last
-    tab = keg.tab
-    # Force reinstallation upon `brew upgrade` to fix the bottle RPATH.
-    tab.source["versions"]["version_scheme"] = -1
-    tab.write
-  rescue TapFormulaUnavailableError
-    nil
-  end
-
-  Settings.write "gcc-rpaths.fixed", true
-end
-
-
- -
-

- - .no_changes_messageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'extend/os/linux/cmd/update-report.rb', line 7
-
-def no_changes_message
-  "No changes to formulae."
-end
-
-
- -
-

- - .odie_if_defined(message) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-
-
# File 'utils/gems.rb', line 77
-
-def odie_if_defined(message)
-  if defined?(odie)
-    odie message
-  else
-    $stderr.puts "Error: #{message}"
-    exit 1
-  end
-end
-
-
- -
-

- - .ohai_if_defined(message) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-
-
# File 'utils/gems.rb', line 61
-
-def ohai_if_defined(message)
-  if defined?(ohai)
-    $stderr.ohai message
-  else
-    $stderr.puts "==> #{message}"
-  end
-end
-
-
- -
-

- - .opoo_if_defined(message) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-75
-
-
# File 'utils/gems.rb', line 69
-
-def opoo_if_defined(message)
-  if defined?(opoo)
-    $stderr.opoo message
-  else
-    $stderr.puts "Warning: #{message}"
-  end
-end
-
-
- -
-

- - .owner_uidObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-116
-117
-118
-
-
# File 'global.rb', line 116
-
-def owner_uid
-  @owner_uid ||= HOMEBREW_BREW_FILE.stat.uid
-end
-
-
- -
-

- - .raise_deprecation_exceptions?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-103
-104
-105
-
-
# File 'global.rb', line 103
-
-def raise_deprecation_exceptions?
-  @raise_deprecation_exceptions == true
-end
-
-
- -
-

- - .reinstall_formula(formula, flags:, installed_on_request: false, force_bottle: false, build_from_source_formulae: [], interactive: false, keep_tmp: false, debug_symbols: false, force: false, debug: false, quiet: false, verbose: false, git: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'reinstall.rb', line 11
-
-def reinstall_formula(
-  formula,
-  flags:,
-  installed_on_request: false,
-  force_bottle: false,
-  build_from_source_formulae: [],
-  interactive: false,
-  keep_tmp: false,
-  debug_symbols: false,
-  force: false,
-  debug: false,
-  quiet: false,
-  verbose: false,
-  git: false
-)
-  if formula.opt_prefix.directory?
-    keg = Keg.new(formula.opt_prefix.resolved_path)
-    tab = keg.tab
-    keg_had_linked_opt = true
-    keg_was_linked = keg.linked?
-    backup keg
-  end
-
-  build_options = BuildOptions.new(Options.create(flags), formula.options)
-  options = build_options.used_options
-  options |= formula.build.used_options
-  options &= formula.options
-
-  fi = FormulaInstaller.new(
-    formula,
-    **{
-      options:,
-      link_keg:                   keg_had_linked_opt ? keg_was_linked : nil,
-      installed_as_dependency:    tab&.installed_as_dependency,
-      installed_on_request:       installed_on_request || tab&.installed_on_request,
-      build_bottle:               tab&.built_bottle?,
-      force_bottle:,
-      build_from_source_formulae:,
-      git:,
-      interactive:,
-      keep_tmp:,
-      debug_symbols:,
-      force:,
-      debug:,
-      quiet:,
-      verbose:,
-    }.compact,
-  )
-  fi.prelude
-  fi.fetch
-
-  oh1 "Reinstalling #{Formatter.identifier(formula.full_name)} #{options.to_a.join " "}"
-
-  fi.install
-  fi.finish
-rescue FormulaInstallationAlreadyAttemptedError
-  nil
-rescue Exception # rubocop:disable Lint/RescueException
-  ignore_interrupts { restore_backup(keg, keg_was_linked, verbose:) }
-  raise
-else
-  begin
-    backup_path(keg).rmtree if backup_path(keg).exist?
-  rescue Errno::EACCES, Errno::ENOTEMPTY
-    odie <<~EOS
-      Could not remove #{backup_path(keg).parent.basename} backup keg! Do so manually:
-        sudo rm -rf #{backup_path(keg)}
-    EOS
-  end
-end
-
-
- -
-

- - .restore_backup(keg, keg_was_linked, verbose:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-
-
# File 'reinstall.rb', line 94
-
-def restore_backup(keg, keg_was_linked, verbose:)
-  path = backup_path(keg)
-
-  return unless path.directory?
-
-  Pathname.new(keg).rmtree if keg.exist?
-
-  path.rename keg
-  keg.link(verbose:) if keg_was_linked
-end
-
-
- -
-

- - .ruby_bindirObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-57
-58
-59
-
-
# File 'utils/gems.rb', line 57
-
-def ruby_bindir
-  "#{RbConfig::CONFIG["prefix"]}/bin"
-end
-
-
- -
-

- - .running_as_root?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-111
-112
-113
-114
-
-
# File 'global.rb', line 111
-
-def running_as_root?
-  @process_euid ||= Process.euid
-  @process_euid.zero?
-end
-
-
- -
-

- - .running_as_root_but_not_owned_by_root?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-120
-121
-122
-
-
# File 'global.rb', line 120
-
-def running_as_root_but_not_owned_by_root?
-  running_as_root? && !owner_uid.zero?
-end
-
-
- -
-

- - .setup_gem_environment!(setup_path: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-
-
# File 'utils/gems.rb', line 86
-
-def setup_gem_environment!(setup_path: true)
-  require "rubygems"
-  raise "RubyGems too old!" if Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.2.0")
-
-  ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"] = "1"
-
-  # Match where our bundler gems are.
-  gem_home = "#{RUBY_BUNDLE_VENDOR_DIRECTORY}/#{RbConfig::CONFIG["ruby_version"]}"
-  Gem.paths = {
-    "GEM_HOME" => gem_home,
-    "GEM_PATH" => gem_home,
-  }
-
-  # Set TMPDIR so Xcode's `make` doesn't fall back to `/var/tmp/`,
-  # which may be not user-writable.
-  ENV["TMPDIR"] = ENV.fetch("HOMEBREW_TEMP", nil)
-
-  return unless setup_path
-
-  # Add necessary Ruby and Gem binary directories to `PATH`.
-  paths = ENV.fetch("PATH").split(":")
-  paths.unshift(ruby_bindir) unless paths.include?(ruby_bindir)
-  paths.unshift(Gem.bindir) unless paths.include?(Gem.bindir)
-  ENV["PATH"] = paths.compact.join(":")
-
-  # Set envs so the above binaries can be invoked.
-  # We don't do this unless requested as some formulae may invoke system Ruby instead of ours.
-  ENV["GEM_HOME"] = gem_home
-  ENV["GEM_PATH"] = gem_home
-end
-
-
- -
-

- - .system(cmd, *args, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'utils.rb', line 44
-
-def self.system(cmd, *args, **options)
-  if verbose?
-    out = (options[:out] == :err) ? $stderr : $stdout
-    out.puts "#{cmd} #{args * " "}".gsub(RUBY_PATH, "ruby")
-                                   .gsub($LOAD_PATH.join(File::PATH_SEPARATOR).to_s, "$LOAD_PATH")
-  end
-  _system(cmd, *args, **options)
-end
-
-
- -
-

- - .valid_gem_groupsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'utils/gems.rb', line 45
-
-def valid_gem_groups
-  install_bundler!
-  require "bundler"
-
-  Bundler.with_unbundled_env do
-    ENV["BUNDLE_GEMFILE"] = gemfile
-    groups = bundler_definition.groups
-    groups.delete(:default)
-    groups.map(&:to_s)
-  end
-end
-
-
- -
-

- - .with_no_api_env(&block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.returns(T.untyped)) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-196
-197
-198
-199
-200
-
-
# File 'api.rb', line 196
-
-def self.with_no_api_env(&block)
-  return yield if Homebrew::EnvConfig.no_install_from_api?
-
-  with_env(HOMEBREW_NO_INSTALL_FROM_API: "1", HOMEBREW_AUTOMATICALLY_SET_NO_INSTALL_FROM_API: "1", &block)
-end
-
-
- -
-

- - .with_no_api_env_if_needed(condition, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - condition - - - (Boolean) - - - -
  • - -
  • - - block - - - (T.proc.returns(T.untyped)) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-203
-204
-205
-206
-207
-
-
# File 'api.rb', line 203
-
-def self.with_no_api_env_if_needed(condition, &block)
-  return yield unless condition
-
-  with_no_api_env(&block)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #gem_user_bindirString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-
-
# File 'utils/gems.rbi', line 8
-
-def gem_user_bindir; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/API.html b/docs/Homebrew/API.html deleted file mode 100644 index dedebde2f..000000000 --- a/docs/Homebrew/API.html +++ /dev/null @@ -1,1035 +0,0 @@ - - - - - - - Module: Homebrew::API - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::API - - - Private -

-
- - - - -
-
Extended by:
-
Cachable
-
- - - - - - - - -
-
Defined in:
-
api.rb,
- api/cask.rb,
api/formula.rb,
api/download.rb,
api/analytics.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for using Homebrew's formulae.brew.sh API.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Analytics, Cask, Formula - - - - Classes: Download, DownloadStrategy - - -

- - -

- Constant Summary - collapse -

- -
- -
HOMEBREW_CACHE_API = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_CACHE/"api").freeze
- -
HOMEBREW_CACHE_API_SOURCE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_CACHE/"api-source").freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

- - -
-

Class Method Details

- - -
-

- - .fetch(endpoint) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - endpoint - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'api.rb', line 22
-
-def self.fetch(endpoint)
-  return cache[endpoint] if cache.present? && cache.key?(endpoint)
-
-  api_url = "#{Homebrew::EnvConfig.api_domain}/#{endpoint}"
-  output = Utils::Curl.curl_output("--fail", api_url)
-  if !output.success? && Homebrew::EnvConfig.api_domain != HOMEBREW_API_DEFAULT_DOMAIN
-    # Fall back to the default API domain and try again
-    api_url = "#{HOMEBREW_API_DEFAULT_DOMAIN}/#{endpoint}"
-    output = Utils::Curl.curl_output("--fail", api_url)
-  end
-  raise ArgumentError, "No file found at #{Tty.underline}#{api_url}#{Tty.reset}" unless output.success?
-
-  cache[endpoint] = JSON.parse(output.stdout, freeze: true)
-rescue JSON::ParserError
-  raise ArgumentError, "Invalid JSON file: #{Tty.underline}#{api_url}#{Tty.reset}"
-end
-
-
- -
-

- - .fetch_json_api_file(endpoint, target: HOMEBREW_CACHE_API/endpoint, stale_seconds: Homebrew::EnvConfig.api_auto_update_secs.to_i) ⇒ Array([Array, Hash], Boolean) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - endpoint - - - (String) - - - -
  • - -
  • - - target - - - (Pathname) - - - (defaults to: HOMEBREW_CACHE_API/endpoint) - - -
  • - -
  • - - stale_seconds - - - (Integer) - - - (defaults to: Homebrew::EnvConfig.api_auto_update_secs.to_i) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-
-
# File 'api.rb', line 42
-
-def self.fetch_json_api_file(endpoint, target: HOMEBREW_CACHE_API/endpoint,
-                             stale_seconds: Homebrew::EnvConfig.api_auto_update_secs.to_i)
-  retry_count = 0
-  url = "#{Homebrew::EnvConfig.api_domain}/#{endpoint}"
-  default_url = "#{HOMEBREW_API_DEFAULT_DOMAIN}/#{endpoint}"
-
-  if Homebrew.running_as_root_but_not_owned_by_root? &&
-     (!target.exist? || target.empty?)
-    odie "Need to download #{url} but cannot as root! Run `brew update` without `sudo` first then try again."
-  end
-
-  curl_args = Utils::Curl.curl_args(retries: 0) + %W[
-    --compressed
-    --speed-limit #{ENV.fetch("HOMEBREW_CURL_SPEED_LIMIT")}
-    --speed-time #{ENV.fetch("HOMEBREW_CURL_SPEED_TIME")}
-  ]
-
-  insecure_download = DevelopmentTools.ca_file_substitution_required? ||
-                      DevelopmentTools.curl_substitution_required?
-  skip_download = target.exist? &&
-                  !target.empty? &&
-                  (!Homebrew.auto_update_command? ||
-                    Homebrew::EnvConfig.no_auto_update? ||
-                  ((Time.now - stale_seconds) < target.mtime))
-  skip_download ||= Homebrew.running_as_root_but_not_owned_by_root?
-
-  json_data = begin
-    begin
-      args = curl_args.dup
-      args.prepend("--time-cond", target.to_s) if target.exist? && !target.empty?
-      if insecure_download
-        opoo DevelopmentTools.insecure_download_warning(endpoint)
-        args.append("--insecure")
-      end
-      unless skip_download
-        ohai "Downloading #{url}" if $stdout.tty? && !Context.current.quiet?
-        # Disable retries here, we handle them ourselves below.
-        Utils::Curl.curl_download(*args, url, to: target, retries: 0, show_error: false)
-      end
-    rescue ErrorDuringExecution
-      if url == default_url
-        raise unless target.exist?
-        raise if target.empty?
-      elsif retry_count.zero? || !target.exist? || target.empty?
-        # Fall back to the default API domain and try again
-        # This block will be executed only once, because we set `url` to `default_url`
-        url = default_url
-        target.unlink if target.exist? && target.empty?
-        skip_download = false
-
-        retry
-      end
-
-      opoo "#{target.basename}: update failed, falling back to cached version."
-    end
-
-    mtime = insecure_download ? Time.new(1970, 1, 1) : Time.now
-    FileUtils.touch(target, mtime:) unless skip_download
-    JSON.parse(target.read, freeze: true)
-  rescue JSON::ParserError
-    target.unlink
-    retry_count += 1
-    skip_download = false
-    odie "Cannot download non-corrupt #{url}!" if retry_count > Homebrew::EnvConfig.curl_retries.to_i
-
-    retry
-  end
-
-  if endpoint.end_with?(".jws.json")
-    success, data = verify_and_parse_jws(json_data)
-    unless success
-      target.unlink
-      odie <<~EOS
-        Failed to verify integrity (#{data}) of:
-          #{url}
-        Potential MITM attempt detected. Please run `brew update` and try again.
-      EOS
-    end
-    [data, !skip_download]
-  else
-    [json_data, !skip_download]
-  end
-end
-
-
- -
-

- - .internal_json_v3?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-190
-191
-192
-
-
# File 'api.rb', line 190
-
-def self.internal_json_v3?
-  ENV["HOMEBREW_INTERNAL_JSON_V3"].present?
-end
-
-
- -
-

- - .merge_variations(json) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - json - - - (Hash) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-
-
# File 'api.rb', line 127
-
-def self.merge_variations(json)
-  return json unless json.key?("variations")
-
-  bottle_tag = ::Utils::Bottles::Tag.new(system: Homebrew::SimulateSystem.current_os,
-                                         arch:   Homebrew::SimulateSystem.current_arch)
-
-  if (variation = json.dig("variations", bottle_tag.to_s).presence)
-    json = json.merge(variation)
-  end
-
-  json.except("variations")
-end
-
-
- -
-

- - .tap_from_source_download(path) ⇒ Tap? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Tap, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
-
# File 'api.rb', line 178
-
-def self.tap_from_source_download(path)
-  path = path.expand_path
-  source_relative_path = path.relative_path_from(Homebrew::API::HOMEBREW_CACHE_API_SOURCE)
-  return if source_relative_path.to_s.start_with?("../")
-
-  org, repo = source_relative_path.each_filename.first(2)
-  return if org.blank? || repo.blank?
-
-  Tap.fetch(org, repo)
-end
-
-
- -
-

- - .write_names_file(names, type, regenerate:) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - names - - - (Array<String>) - - - -
  • - -
  • - - type - - - (String) - - - -
  • - -
  • - - regenerate - - - (Boolean) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-141
-142
-143
-144
-145
-146
-147
-148
-149
-
-
# File 'api.rb', line 141
-
-def self.write_names_file(names, type, regenerate:)
-  names_path = HOMEBREW_CACHE_API/"#{type}_names.txt"
-  if !names_path.exist? || regenerate
-    names_path.write(names.join("\n"))
-    return true
-  end
-
-  false
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/API/Analytics.html b/docs/Homebrew/API/Analytics.html deleted file mode 100644 index 25fbe1be1..000000000 --- a/docs/Homebrew/API/Analytics.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - Module: Homebrew::API::Analytics - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::API::Analytics - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
api/analytics.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for using the analytics JSON API.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .analytics_api_pathString - - - - Also known as: - generic_analytics_api_path - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'api/analytics.rb', line 10
-
-def analytics_api_path
-  "analytics"
-end
-
-
- -
-

- - .fetch(category, days) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - category - - - (String) - - - -
  • - -
  • - - days - - - (Integer, String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'api/analytics.rb', line 16
-
-def fetch(category, days)
-  Homebrew::API.fetch "#{analytics_api_path}/#{category}/#{days}d.json"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/API/Cask.html b/docs/Homebrew/API/Cask.html deleted file mode 100644 index dc810c9b9..000000000 --- a/docs/Homebrew/API/Cask.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - - - - Module: Homebrew::API::Cask - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::API::Cask - - - Private -

-
- - - - -
-
Extended by:
-
Cachable
-
- - - - - - - - -
-
Defined in:
-
api/cask.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for using the cask JSON API.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

- - -
-

Class Method Details

- - -
-

- - .all_casksHash{String => Hash} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-68
-
-
# File 'api/cask.rb', line 61
-
-def self.all_casks
-  unless cache.key?("casks")
-    json_updated = download_and_cache_data!
-    write_names(regenerate: json_updated)
-  end
-
-  cache.fetch("casks")
-end
-
-
- -
-

- - .all_renamesHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'api/cask.rb', line 71
-
-def self.all_renames
-  unless cache.key?("renames")
-    json_updated = download_and_cache_data!
-    write_names(regenerate: json_updated)
-  end
-
-  cache.fetch("renames")
-end
-
-
- -
-

- - .fetch(token) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - token - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'api/cask.rb', line 16
-
-def self.fetch(token)
-  Homebrew::API.fetch "cask/#{token}.json"
-end
-
-
- -
-

- - .source_download(cask) ⇒ ::Cask::Cask - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
# File 'api/cask.rb', line 21
-
-def self.source_download(cask)
-  path = cask.ruby_source_path.to_s || "Casks/#{cask.token}.rb"
-  sha256 = cask.ruby_source_checksum[:sha256]
-  checksum = Checksum.new(sha256) if sha256
-  git_head = cask.tap_git_head || "HEAD"
-  tap = cask.tap&.full_name || "Homebrew/homebrew-cask"
-
-  download = Homebrew::API::Download.new(
-    "https://raw.githubusercontent.com/#{tap}/#{git_head}/#{path}",
-    checksum,
-    mirrors: [
-      "#{HOMEBREW_API_DEFAULT_DOMAIN}/cask-source/#{File.basename(path)}",
-    ],
-    cache:   HOMEBREW_CACHE_API_SOURCE/"#{tap}/#{git_head}/Cask",
-  )
-  download.fetch
-  ::Cask::CaskLoader::FromPathLoader.new(download.symlink_location)
-                                    .load(config: cask.config)
-end
-
-
- -
-

- - .write_names(regenerate: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - regenerate - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-81
-82
-83
-84
-85
-
-
# File 'api/cask.rb', line 81
-
-def self.write_names(regenerate: false)
-  download_and_cache_data! unless cache.key?("casks")
-
-  Homebrew::API.write_names_file(all_casks.keys, "cask", regenerate:)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/API/Download.html b/docs/Homebrew/API/Download.html deleted file mode 100644 index cddb5eb30..000000000 --- a/docs/Homebrew/API/Download.html +++ /dev/null @@ -1,468 +0,0 @@ - - - - - - - Class: Homebrew::API::Download - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::API::Download - - - Private -

-
- -
-
Inherits:
-
- Downloadable - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
api/download.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Downloadable

-

#checksum, #mirrors, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Downloadable

-

#cached_download, #clear_cache, #download_name, #download_strategy, #downloaded?, #downloader, #fetch, #freeze, #initialize_dup, #verify_download_integrity, #version

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(url, checksum, mirrors: [], cache: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - -
  • - -
  • - - checksum - - - (Checksum, nil) - - - -
  • - -
  • - - mirrors - - - (Array<String>) - - - (defaults to: []) - - -
  • - -
  • - - cache - - - (Pathname, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'api/download.rb', line 24
-
-def initialize(url, checksum, mirrors: [], cache: nil)
-  super()
-  @url = URL.new(url, using: API::DownloadStrategy)
-  @checksum = checksum
-  @mirrors = mirrors
-  @cache = cache
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #cachePathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'api/download.rb', line 33
-
-def cache
-  @cache || super
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'api/download.rb', line 38
-
-def symlink_location
-  T.cast(downloader, API::DownloadStrategy).symlink_location
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/API/DownloadStrategy.html b/docs/Homebrew/API/DownloadStrategy.html deleted file mode 100644 index c0ae4584e..000000000 --- a/docs/Homebrew/API/DownloadStrategy.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - Class: Homebrew::API::DownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::API::DownloadStrategy - - - Private -

-
- -
-
Inherits:
-
- CurlDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
api/download.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CurlDownloadStrategy

-

#mirrors

- - - -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CurlDownloadStrategy

-

#clear_cache, #fetch, #initialize, #resolved_time_file_size

- - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from AbstractFileDownloadStrategy

-

#basename, #cached_location, #temporary_path

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #initialize, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -

This class inherits a constructor from CurlDownloadStrategy

- -
- - -
-

Instance Method Details

- - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'api/download.rb', line 10
-
-def symlink_location
-  cache/name
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/API/Formula.html b/docs/Homebrew/API/Formula.html deleted file mode 100644 index ba92cfc1f..000000000 --- a/docs/Homebrew/API/Formula.html +++ /dev/null @@ -1,905 +0,0 @@ - - - - - - - Module: Homebrew::API::Formula - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::API::Formula - - - Private -

-
- - - - -
-
Extended by:
-
Cachable
-
- - - - - - - - -
-
Defined in:
-
api/formula.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for using the formula JSON API.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

- - -
-

Class Method Details

- - -
-

- - .all_aliasesHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'api/formula.rb', line 75
-
-def self.all_aliases
-  unless cache.key?("aliases")
-    json_updated = download_and_cache_data!
-    write_names_and_aliases(regenerate: json_updated)
-  end
-
-  cache["aliases"]
-end
-
-
- -
-

- - .all_formulaeHash{String => Hash} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'api/formula.rb', line 65
-
-def self.all_formulae
-  unless cache.key?("formulae")
-    json_updated = download_and_cache_data!
-    write_names_and_aliases(regenerate: json_updated)
-  end
-
-  cache["formulae"]
-end
-
-
- -
-

- - .all_renamesHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-85
-86
-87
-88
-89
-90
-91
-92
-
-
# File 'api/formula.rb', line 85
-
-def self.all_renames
-  unless cache.key?("renames")
-    json_updated = download_and_cache_data!
-    write_names_and_aliases(regenerate: json_updated)
-  end
-
-  cache["renames"]
-end
-
-
- -
-

- - .fetch(name) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'api/formula.rb', line 16
-
-def self.fetch(name)
-  Homebrew::API.fetch "formula/#{name}.json"
-end
-
-
- -
-

- - .source_download(formula) ⇒ ::Formula - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (::Formula) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'api/formula.rb', line 21
-
-def self.source_download(formula)
-  path = formula.ruby_source_path || "Formula/#{formula.name}.rb"
-  git_head = formula.tap_git_head || "HEAD"
-  tap = formula.tap&.full_name || "Homebrew/homebrew-core"
-
-  download = Homebrew::API::Download.new(
-    "https://raw.githubusercontent.com/#{tap}/#{git_head}/#{path}",
-    formula.ruby_source_checksum,
-    cache: HOMEBREW_CACHE_API_SOURCE/"#{tap}/#{git_head}/Formula",
-  )
-  download.fetch
-  Formulary.factory(download.symlink_location,
-                    formula.active_spec_sym,
-                    alias_path: formula.alias_path,
-                    flags:      formula.class.build_flags)
-end
-
-
- -
-

- - .tap_git_headString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-106
-107
-108
-109
-110
-111
-112
-113
-114
-
-
# File 'api/formula.rb', line 106
-
-def self.tap_git_head
-  # Note sure we need to reload here.
-  unless cache.key?("tap_git_head")
-    json_updated = download_and_cache_data!
-    write_names_and_aliases(regenerate: json_updated)
-  end
-
-  cache["tap_git_head"]
-end
-
-
- -
-

- - .tap_migrationsHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-95
-96
-97
-98
-99
-100
-101
-102
-103
-
-
# File 'api/formula.rb', line 95
-
-def self.tap_migrations
-  # Not sure that we need to reload here.
-  unless cache.key?("tap_migrations")
-    json_updated = download_and_cache_data!
-    write_names_and_aliases(regenerate: json_updated)
-  end
-
-  cache["tap_migrations"]
-end
-
-
- -
-

- - .write_names_and_aliases(regenerate: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - regenerate - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-
-
# File 'api/formula.rb', line 117
-
-def self.write_names_and_aliases(regenerate: false)
-  download_and_cache_data! unless cache.key?("formulae")
-
-  return unless Homebrew::API.write_names_file(all_formulae.keys, "formula", regenerate:)
-
-  (HOMEBREW_CACHE_API/"formula_aliases.txt").open("w") do |file|
-    all_aliases.each do |alias_name, real_name|
-      file.puts "#{alias_name}|#{real_name}"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/AbstractCommand.html b/docs/Homebrew/AbstractCommand.html deleted file mode 100644 index d0d7bf6e1..000000000 --- a/docs/Homebrew/AbstractCommand.html +++ /dev/null @@ -1,852 +0,0 @@ - - - - - - - Class: Homebrew::AbstractCommand - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::AbstractCommand - Abstract - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - - - - - - -
-
Defined in:
-
abstract_command.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

It cannot be directly instantiated. Subclasses must implement the abstract methods below.

-
-
-

Subclass this to implement a brew command. This is preferred to declaring a named function in the Homebrew -module, because:

- -
    -
  • Each Command lives in an isolated namespace.
  • -
  • Each Command implements a defined interface.
  • -
  • args is available as an instance method and thus does not need to be passed as an argument to helper methods.
  • -
  • Subclasses no longer need to reference CLI::Parser or parse args explicitly.
  • -
- -

To subclass, implement a run method and provide a cmd_args block to document the command and its allowed args. -To generate method signatures for command args, run brew typecheck --update.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Cmd::Analytics, Cmd::Autoremove, Cmd::Cache, Cmd::Caskroom, Cmd::Cellar, Cmd::CleanupCmd, Cmd::Command, Cmd::CommandsCmd, Cmd::CompletionsCmd, Cmd::Config, Cmd::Deps, Cmd::Desc, Cmd::Developer, Cmd::Docs, Cmd::Doctor, Cmd::Env, Cmd::FetchCmd, Cmd::GistLogs, Cmd::HelpCmd, Cmd::Home, Cmd::Info, Cmd::InstallCmd, Cmd::Leaves, Cmd::Link, Cmd::List, Cmd::Log, Cmd::Migrate, Cmd::Missing, Cmd::NodenvSync, Cmd::OptionsCmd, Cmd::Outdated, Cmd::Pin, Cmd::Postinstall, Cmd::Prefix, Cmd::PyenvSync, Cmd::RbenvSync, Cmd::ReadallCmd, Cmd::Reinstall, Cmd::Repository, Cmd::SearchCmd, Cmd::TapCmd, Cmd::TapInfo, Cmd::UninstallCmd, Cmd::UnlinkCmd, Cmd::Unpin, Cmd::Untap, Cmd::UpdateReport, Cmd::UpgradeCmd, Cmd::Uses, DevCmd::Audit, DevCmd::Bottle, DevCmd::Bump, DevCmd::BumpCaskPr, DevCmd::BumpFormulaPr, DevCmd::BumpRevision, DevCmd::BumpUnversionedCasks, DevCmd::Cat, DevCmd::Contributions, DevCmd::Create, DevCmd::DetermineTestRunners, DevCmd::DispatchBuildBottle, DevCmd::Edit, DevCmd::Extract, DevCmd::FormulaCmd, DevCmd::GenerateCaskApi, DevCmd::GenerateFormulaApi, DevCmd::GenerateManCompletions, DevCmd::InstallBundlerGems, DevCmd::Irb, DevCmd::Linkage, DevCmd::LivecheckCmd, DevCmd::PrAutomerge, DevCmd::PrPublish, DevCmd::PrPull, DevCmd::PrUpload, DevCmd::Prof, DevCmd::Release, DevCmd::Ruby, DevCmd::Rubydoc, DevCmd::Sh, DevCmd::StyleCmd, DevCmd::TapNew, DevCmd::Test, DevCmd::Tests, DevCmd::Typecheck, DevCmd::Unbottled, DevCmd::Unpack, DevCmd::UpdateLicenseData, DevCmd::UpdateMaintainers, DevCmd::UpdatePythonResources, DevCmd::UpdateSponsors, DevCmd::UpdateTest, DevCmd::VendorGems

-
- - - - -

Class Attribute Summary collapse

- - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(argv = ARGV.freeze) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - argv - - - (Array<String>) - - - (defaults to: ARGV.freeze) - - -
  • - -
- - -
- - - - -
-
-
-
-52
-53
-54
-
-
# File 'abstract_command.rb', line 52
-
-def initialize(argv = ARGV.freeze)
-  @args = T.let(self.class.parser.parse(argv), CLI::Args)
-end
-
-
- -
- -
-

Class Attribute Details

- - - -
-

- - .args_classT.class_of(CLI::Args)? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.class_of(CLI::Args), nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'abstract_command.rb', line 24
-
-def args_class
-  @args_class
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #argsCLI::Args (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'abstract_command.rb', line 49
-
-def args
-  @args
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .command(name) ⇒ T.class_of(AbstractCommand)? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the AbstractCommand subclass associated with the brew CLI command name.

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.class_of(AbstractCommand), nil) - - - - — -

    the AbstractCommand subclass associated with the brew CLI command name.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-31
-
-
# File 'abstract_command.rb', line 31
-
-def command(name) = subclasses.find { _1.command_name == name }
-
-
- -
-

- - .command_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'abstract_command.rb', line 27
-
-def command_name = Utils.underscore(T.must(name).split("::").fetch(-1)).tr("_", "-").delete_suffix("-cmd")
-
-
- -
-

- - .dev_cmd?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-34
-
-
# File 'abstract_command.rb', line 34
-
-def dev_cmd? = T.must(name).start_with?("Homebrew::DevCmd")
-
-
- -
-

- - .parserCLI::Parser - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-37
-
-
# File 'abstract_command.rb', line 37
-
-def parser = CLI::Parser.new(self, &@parser_block)
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-57
-
-
# File 'abstract_command.rb', line 57
-
-def run; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Assertions.html b/docs/Homebrew/Assertions.html deleted file mode 100644 index a9a022f80..000000000 --- a/docs/Homebrew/Assertions.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - - Module: Homebrew::Assertions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Assertions - - - Private -

-
- - - - - - -
-
Includes:
-
Context, Kernel, Minitest::Assertions
-
- - - - - - -
-
Defined in:
-
formula_assertions.rb,
- formula_assertions.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Instance Attribute Details

- - - -
-

- - #assertionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'formula_assertions.rb', line 15
-
-def assertions
-  @assertions ||= 0
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #pipe_output(cmd, input = nil, result = nil) ⇒ Object - - - - - -

-
-

Returns the output of running the cmd with the optional input and -optionally asserts the exit status.

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-
-
# File 'formula_assertions.rb', line 36
-
-def pipe_output(cmd, input = nil, result = nil)
-  ohai cmd
-  output = IO.popen(cmd, "w+") do |pipe|
-    pipe.write(input) unless input.nil?
-    pipe.close_write
-    pipe.read
-  end
-  assert_equal result, $CHILD_STATUS.exitstatus unless result.nil?
-  output
-rescue Minitest::Assertion
-  puts output if verbose?
-  raise
-end
-
-
- -
-

- - #shell_output(cmd, result = 0) ⇒ Object - - - - - -

-
-

Returns the output of running cmd and asserts the exit status.

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'formula_assertions.rb', line 22
-
-def shell_output(cmd, result = 0)
-  ohai cmd
-  output = `#{cmd}`
-  assert_equal result, $CHILD_STATUS.exitstatus
-  output
-rescue Minitest::Assertion
-  puts output if verbose?
-  raise
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Attestation.html b/docs/Homebrew/Attestation.html deleted file mode 100644 index c6ab42e00..000000000 --- a/docs/Homebrew/Attestation.html +++ /dev/null @@ -1,821 +0,0 @@ - - - - - - - Module: Homebrew::Attestation - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Attestation - - - Private -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
attestation.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: GhAuthNeeded, InvalidAttestationError - - -

- - -

- Constant Summary - collapse -

- -
- -
HOMEBREW_CORE_REPO = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Homebrew/homebrew-core"
- -
BACKFILL_REPO = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"trailofbits/homebrew-brew-verify"
- -
BACKFILL_CUTOFF = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

No backfill attestations after this date are considered valid.

- -

This date is shortly after the backfill operation for homebrew-core -completed, as can be seen here: https://github.com/trailofbits/homebrew-brew-verify/attestations.

- -

In effect, this means that, even if an attacker is able to compromise the backfill -signing workflow, they will be unable to convince a verifier to accept their newer, -malicious backfilled signatures.

- - -
-
-
- - -
-
-
T.let(DateTime.new(2024, 3, 14).freeze, DateTime)
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .check_attestation(bottle, signing_repo, signing_workflow = nil, subject = nil) ⇒ Hash{T.untyped => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Verifies the given bottle against a cryptographic attestation of build provenance.

- -

The provenance is verified as originating from signing_repository, which is a String -that should be formatted as a GitHub owner/repository.

- -

Callers may additionally pass in signing_workflow, which will scope the attestation -down to an exact GitHub Actions workflow, in -https://github/OWNER/REPO/.github/workflows/WORKFLOW.yml@REF format.

- - -
-
-
-

Parameters:

-
    - -
  • - - bottle - - - (Bottle) - - - -
  • - -
  • - - signing_repo - - - (String) - - - -
  • - -
  • - - signing_workflow - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - subject - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{T.untyped => T.untyped}) - - - - — -

    the JSON-decoded response.

    -
    - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-
-
# File 'attestation.rb', line 74
-
-def self.check_attestation(bottle, signing_repo, signing_workflow = nil, subject = nil)
-  cmd = ["attestation", "verify", bottle.cached_download, "--repo", signing_repo, "--format",
-         "json"]
-
-  cmd += ["--cert-identity", signing_workflow] if signing_workflow.present?
-
-  # Fail early if we have no credentials. The command below invariably
-  # fails without them, so this saves us a network roundtrip before
-  # presenting the user with the same error.
-  credentials = GitHub::API.credentials
-  raise GhAuthNeeded, "missing credentials" if credentials.blank?
-
-  begin
-    result = system_command!(gh_executable, args: cmd, env: { "GH_TOKEN" => credentials },
-                            secrets: [credentials])
-  rescue ErrorDuringExecution => e
-    # Even if we have credentials, they may be invalid or malformed.
-    raise GhAuthNeeded, "invalid credentials" if e.status.exitstatus == 4
-
-    raise InvalidAttestationError, "attestation verification failed: #{e}"
-  end
-
-  begin
-    attestations = JSON.parse(result.stdout)
-  rescue JSON::ParserError
-    raise InvalidAttestationError, "attestation verification returned malformed JSON"
-  end
-
-  # `gh attestation verify` returns a JSON array of one or more results,
-  # for all attestations that match the input's digest. We want to additionally
-  # filter these down to just the attestation whose subject matches the bottle's name.
-  subject = bottle.filename.to_s if subject.blank?
-
-  attestation = if bottle.tag.to_sym == :all
-    # :all-tagged bottles are created by `brew bottle --merge`, and are not directly
-    # bound to their own filename (since they're created by deduplicating other filenames).
-    # To verify these, we parse each attestation subject and look for one with a matching
-    # formula (name, version), but not an exact tag match.
-    # This is sound insofar as the signature has already been verified. However,
-    # longer term, we should also directly attest to `:all`-tagged bottles.
-    attestations.find do |a|
-      actual_subject = a.dig("verificationResult", "statement", "subject", 0, "name")
-      actual_subject.start_with? "#{bottle.filename.name}--#{bottle.filename.version}"
-    end
-  else
-    attestations.find do |a|
-      a.dig("verificationResult", "statement", "subject", 0, "name") == subject
-    end
-  end
-
-  raise InvalidAttestationError, "no attestation matches subject" if attestation.blank?
-
-  attestation
-end
-
-
- -
-

- - .check_core_attestation(bottle) ⇒ Hash{T.untyped => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Verifies the given bottle against a cryptographic attestation of build provenance -from homebrew-core's CI, falling back on a "backfill" attestation for older bottles.

- -

This is a specialization of check_attestation for homebrew-core.

- - -
-
-
-

Parameters:

-
    - -
  • - - bottle - - - (Bottle) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{T.untyped => T.untyped}) - - - - — -

    the JSON-decoded response

    -
    - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-
-
# File 'attestation.rb', line 140
-
-def self.check_core_attestation(bottle)
-  begin
-    # Ideally, we would also constrain the signing workflow here, but homebrew-core
-    # currently uses multiple signing workflows to produce bottles
-    # (e.g. `dispatch-build-bottle.yml`, `dispatch-rebottle.yml`, etc.).
-    #
-    # We could check each of these (1) explicitly (slow), (2) by generating a pattern
-    # to pass into `--cert-identity-regex` (requires us to build up a Go-style regex),
-    # or (3) by checking the resulting JSON for the expected signing workflow.
-    #
-    # Long term, we should probably either do (3) *or* switch to a single reusable
-    # workflow, which would then be our sole identity. However, GitHub's
-    # attestations currently do not include reusable workflow state by default.
-    attestation = check_attestation bottle, HOMEBREW_CORE_REPO
-    return attestation
-  rescue InvalidAttestationError
-    odebug "falling back on backfilled attestation for #{bottle}"
-
-    # Our backfilled attestation is a little unique: the subject is not just the bottle
-    # filename, but also has the bottle's hosted URL hash prepended to it.
-    # This was originally unintentional, but has a virtuous side effect of further
-    # limiting domain separation on the backfilled signatures (by committing them to
-    # their original bottle URLs).
-    url_sha256 = Digest::SHA256.hexdigest(bottle.url)
-    subject = "#{url_sha256}--#{bottle.filename}"
-
-    # We don't pass in a signing workflow for backfill signatures because
-    # some backfilled bottle signatures were signed from the 'backfill'
-    # branch, and others from 'main' of trailofbits/homebrew-brew-verify
-    # so the signing workflow is slightly different which causes some bottles to incorrectly
-    # fail when checking their attestation. This shouldn't meaningfully affect security
-    # because if somehow someone could generate false backfill attestations
-    # from a different workflow we will still catch it because the
-    # attestation would have been generated after our cutoff date.
-    backfill_attestation = check_attestation bottle, BACKFILL_REPO, nil, subject
-    timestamp = backfill_attestation.dig("verificationResult", "verifiedTimestamps",
-                                         0, "timestamp")
-
-    raise InvalidAttestationError, "backfill attestation is missing verified timestamp" if timestamp.nil?
-
-    if DateTime.parse(timestamp) > BACKFILL_CUTOFF
-      raise InvalidAttestationError, "backfill attestation post-dates cutoff"
-    end
-  end
-
-  backfill_attestation
-end
-
-
- -
-

- - .gh_executablePathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a path to a suitable gh executable for attestation verification.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-
-
# File 'attestation.rb', line 47
-
-def self.gh_executable
-  # NOTE: We disable HOMEBREW_VERIFY_ATTESTATIONS when installing `gh` itself,
-  #       to prevent a cycle during bootstrapping. This can eventually be resolved
-  #       by vendoring a pure-Ruby Sigstore verifier client.
-  @gh_executable ||= T.let(with_env("HOMEBREW_VERIFY_ATTESTATIONS" => nil) do
-    ensure_executable!("gh")
-  end, T.nilable(Pathname))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Attestation/GhAuthNeeded.html b/docs/Homebrew/Attestation/GhAuthNeeded.html deleted file mode 100644 index 6b2b0c967..000000000 --- a/docs/Homebrew/Attestation/GhAuthNeeded.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - Exception: Homebrew::Attestation::GhAuthNeeded - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Homebrew::Attestation::GhAuthNeeded - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
attestation.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised if attestation verification cannot continue due to missing -credentials.

- - -
-
-
- - -
- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Attestation/InvalidAttestationError.html b/docs/Homebrew/Attestation/InvalidAttestationError.html deleted file mode 100644 index 7839c06f2..000000000 --- a/docs/Homebrew/Attestation/InvalidAttestationError.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - Exception: Homebrew::Attestation::InvalidAttestationError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Homebrew::Attestation::InvalidAttestationError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
attestation.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when attestation verification fails.

- - -
-
-
- - -
- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/BumpVersionParser.html b/docs/Homebrew/BumpVersionParser.html deleted file mode 100644 index 894e6d7f7..000000000 --- a/docs/Homebrew/BumpVersionParser.html +++ /dev/null @@ -1,837 +0,0 @@ - - - - - - - Class: Homebrew::BumpVersionParser - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::BumpVersionParser - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
bump_version_parser.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class handling architecture-specific version information.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(general: nil, arm: nil, intel: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - general - - - (Version, String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - arm - - - (Version, String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - intel - - - (Version, String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Raises:

- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'bump_version_parser.rb', line 15
-
-def initialize(general: nil, arm: nil, intel: nil)
-  @general = T.let(parse_version(general), T.nilable(T.any(Version, Cask::DSL::Version))) if general.present?
-  @arm = T.let(parse_version(arm), T.nilable(T.any(Version, Cask::DSL::Version))) if arm.present?
-  @intel = T.let(parse_version(intel), T.nilable(T.any(Version, Cask::DSL::Version))) if intel.present?
-
-  return if @general.present?
-  raise UsageError, "`--version` must not be empty." if arm.blank? && intel.blank?
-  raise UsageError, "`--version-arm` must not be empty." if arm.blank?
-  raise UsageError, "`--version-intel` must not be empty." if intel.blank?
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #armVersion, ... (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'bump_version_parser.rb', line 8
-
-def arm
-  @arm
-end
-
-
- - - -
-

- - #generalVersion, ... (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'bump_version_parser.rb', line 8
-
-def general
-  @general
-end
-
-
- - - -
-

- - #intelVersion, ... (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'bump_version_parser.rb', line 8
-
-def intel
-  @intel
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #blank?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'bump_version_parser.rb', line 48
-
-def blank?
-  @general.blank? && @arm.blank? && @intel.blank?
-end
-
-
- -
-

- - #parse_cask_version(version) ⇒ Cask::DSL::Version? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'bump_version_parser.rb', line 39
-
-def parse_cask_version(version)
-  if version == "latest"
-    Cask::DSL::Version.new(:latest)
-  else
-    Cask::DSL::Version.new(version)
-  end
-end
-
-
- -
-

- - #parse_version(version) ⇒ Version, ... - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'bump_version_parser.rb', line 30
-
-def parse_version(version)
-  if version.is_a?(Version)
-    version
-  elsif version.is_a?(String)
-    parse_cask_version(version)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/BundleVersion.html b/docs/Homebrew/BundleVersion.html deleted file mode 100644 index c855ed16d..000000000 --- a/docs/Homebrew/BundleVersion.html +++ /dev/null @@ -1,889 +0,0 @@ - - - - - - - Class: Homebrew::BundleVersion - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::BundleVersion - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - -
-
Includes:
-
Comparable
-
- - - - - - -
-
Defined in:
-
bundle_version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Representation of a macOS bundle version, commonly found in Info.plist files.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- -
-

Constructor Details

- -
-

- - #initialize(short_version, version) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - short_version - - - (String, nil) - - - -
  • - -
  • - - version - - - (String, nil) - - - -
  • - -
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'bundle_version.rb', line 50
-
-def initialize(short_version, version)
-  # Remove version from short version, if present.
-  short_version = short_version&.sub(/\s*\(#{Regexp.escape(version)}\)\Z/, "") if version
-
-  @short_version = short_version.presence
-  @version = version.presence
-
-  return if @short_version || @version
-
-  raise ArgumentError, "`short_version` and `version` cannot both be `nil` or empty"
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #short_versionString? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'bundle_version.rb', line 47
-
-def short_version
-  @short_version
-end
-
-
- - - -
-

- - #versionString? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'bundle_version.rb', line 47
-
-def version
-  @version
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_info_plist(info_plist_path) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - info_plist_path - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-
-
# File 'bundle_version.rb', line 14
-
-def self.from_info_plist(info_plist_path)
-  plist = system_command!("plutil", args: ["-convert", "xml1", "-o", "-", info_plist_path]).plist
-  from_info_plist_content(plist)
-end
-
-
- -
-

- - .from_info_plist_content(plist) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - plist - - - (Hash{String => T.untyped}) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-
-
# File 'bundle_version.rb', line 20
-
-def self.from_info_plist_content(plist)
-  short_version = plist["CFBundleShortVersionString"].presence
-  version = plist["CFBundleVersion"].presence
-
-  new(short_version, version) if short_version || version
-end
-
-
- -
-

- - .from_package_info(package_info_path) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - package_info_path - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'bundle_version.rb', line 28
-
-def self.from_package_info(package_info_path)
-  require "rexml/document"
-
-  xml = REXML::Document.new(package_info_path.read)
-
-  bundle_version_bundle = xml.get_elements("//pkg-info//bundle-version//bundle").first
-  bundle_id = bundle_version_bundle["id"] if bundle_version_bundle
-  return if bundle_id.blank?
-
-  bundle = xml.get_elements("//pkg-info//bundle").find { |b| b["id"] == bundle_id }
-  return unless bundle
-
-  short_version = bundle["CFBundleShortVersionString"]
-  version = bundle["CFBundleVersion"]
-
-  new(short_version, version) if short_version || version
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #nice_versionString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Create a nicely formatted version (on a best effort basis).

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'bundle_version.rb', line 90
-
-def nice_version
-  nice_parts.join(",")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI.html b/docs/Homebrew/CLI.html deleted file mode 100644 index 59cc974ec..000000000 --- a/docs/Homebrew/CLI.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: Homebrew::CLI - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::CLI - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/linux/parser.rb,
- cli/args.rb,
cli/parser.rb,
cli/named_args.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args, InvalidConstraintError, MaxNamedArgumentsError, MinNamedArgumentsError, NamedArgs, NumberOfNamedArgumentsError, OptionConflictError, OptionConstraintError, Parser - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI/Args.html b/docs/Homebrew/CLI/Args.html deleted file mode 100644 index 90680bc15..000000000 --- a/docs/Homebrew/CLI/Args.html +++ /dev/null @@ -1,2197 +0,0 @@ - - - - - - - Class: Homebrew::CLI::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::CLI::Args - - - Private -

-
- -
-
Inherits:
-
- OpenStruct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cli/args.rbi,
- cli/args.rb,
sorbet/rbi/dsl/homebrew/cli/args.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This file contains global args as defined in Homebrew::CLI::Parser.global_options -Command-specific args are defined in the commands themselves, with type signatures -generated by the Tapioca::Compilers::Args compiler.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Homebrew::Cmd::Analytics::Args, Homebrew::Cmd::Autoremove::Args, Homebrew::Cmd::Cache::Args, Homebrew::Cmd::Caskroom::Args, Homebrew::Cmd::Cellar::Args, Homebrew::Cmd::CleanupCmd::Args, Homebrew::Cmd::Command::Args, Homebrew::Cmd::CommandsCmd::Args, Homebrew::Cmd::CompletionsCmd::Args, Homebrew::Cmd::Config::Args, Homebrew::Cmd::Deps::Args, Homebrew::Cmd::Desc::Args, Homebrew::Cmd::Developer::Args, Homebrew::Cmd::Docs::Args, Homebrew::Cmd::Doctor::Args, Homebrew::Cmd::Env::Args, Homebrew::Cmd::FetchCmd::Args, Homebrew::Cmd::GistLogs::Args, Homebrew::Cmd::HelpCmd::Args, Homebrew::Cmd::Home::Args, Homebrew::Cmd::Info::Args, Homebrew::Cmd::InstallCmd::Args, Homebrew::Cmd::Leaves::Args, Homebrew::Cmd::Link::Args, Homebrew::Cmd::List::Args, Homebrew::Cmd::Log::Args, Homebrew::Cmd::Migrate::Args, Homebrew::Cmd::Missing::Args, Homebrew::Cmd::NodenvSync::Args, Homebrew::Cmd::OptionsCmd::Args, Homebrew::Cmd::Outdated::Args, Homebrew::Cmd::Pin::Args, Homebrew::Cmd::Postinstall::Args, Homebrew::Cmd::Prefix::Args, Homebrew::Cmd::PyenvSync::Args, Homebrew::Cmd::RbenvSync::Args, Homebrew::Cmd::ReadallCmd::Args, Homebrew::Cmd::Reinstall::Args, Homebrew::Cmd::Repository::Args, Homebrew::Cmd::SearchCmd::Args, Homebrew::Cmd::TapCmd::Args, Homebrew::Cmd::TapInfo::Args, Homebrew::Cmd::UninstallCmd::Args, Homebrew::Cmd::UnlinkCmd::Args, Homebrew::Cmd::Unpin::Args, Homebrew::Cmd::Untap::Args, Homebrew::Cmd::UpdateReport::Args, Homebrew::Cmd::UpgradeCmd::Args, Homebrew::Cmd::Uses::Args, DevCmd::Audit::Args, DevCmd::Bottle::Args, DevCmd::Bump::Args, DevCmd::BumpCaskPr::Args, DevCmd::BumpFormulaPr::Args, DevCmd::BumpRevision::Args, DevCmd::BumpUnversionedCasks::Args, DevCmd::Cat::Args, DevCmd::Contributions::Args, DevCmd::Create::Args, DevCmd::DetermineTestRunners::Args, DevCmd::DispatchBuildBottle::Args, DevCmd::Edit::Args, DevCmd::Extract::Args, DevCmd::FormulaCmd::Args, DevCmd::GenerateCaskApi::Args, DevCmd::GenerateFormulaApi::Args, DevCmd::GenerateManCompletions::Args, DevCmd::InstallBundlerGems::Args, DevCmd::Irb::Args, DevCmd::Linkage::Args, DevCmd::LivecheckCmd::Args, DevCmd::PrAutomerge::Args, DevCmd::PrPublish::Args, DevCmd::PrPull::Args, DevCmd::PrUpload::Args, DevCmd::Prof::Args, DevCmd::Release::Args, DevCmd::Ruby::Args, DevCmd::Rubydoc::Args, DevCmd::Sh::Args, DevCmd::StyleCmd::Args, DevCmd::TapNew::Args, DevCmd::Test::Args, DevCmd::Tests::Args, DevCmd::Typecheck::Args, DevCmd::Unbottled::Args, DevCmd::Unpack::Args, DevCmd::UpdateLicenseData::Args, DevCmd::UpdateMaintainers::Args, DevCmd::UpdatePythonResources::Args, DevCmd::UpdateSponsors::Args, DevCmd::UpdateTest::Args, DevCmd::VendorGems::Args

-
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'cli/args.rb', line 15
-
-def initialize
-  require "cli/named_args"
-
-  super
-
-  @processed_options = []
-  @options_only = []
-  @flags_only = []
-  @cask_options = false
-
-  # Can set these because they will be overwritten by freeze_named_args!
-  # (whereas other values below will only be overwritten if passed).
-  self[:named] = NamedArgs.new(parent: self)
-  self[:remaining] = []
-end
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - -

- -
-

- - #method_missing(method_name, *args) ⇒ Object (private) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-
-
# File 'cli/args.rb', line 172
-
-def method_missing(method_name, *args)
-  return_value = super
-
-  # Once we are frozen, verify any arg method calls are already defined in the table.
-  # The default OpenStruct behaviour is to return nil for anything unknown.
-  if frozen? && args.empty? && !@table.key?(method_name)
-    raise NoMethodError, "CLI arg for `#{method_name}` is not declared for this command"
-  end
-
-  return_value
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #flags_onlyObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'cli/args.rb', line 9
-
-def flags_only
-  @flags_only
-end
-
-
- - - -
-

- - #options_onlyObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'cli/args.rb', line 9
-
-def options_only
-  @options_only
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #archString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- TODO: -

The methods below are not defined by Args, but are valid because Args inherits from OpenStruct

-
-
- -

We should instead be using type guards to check if the method is defined on the object before calling it

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'cli/args.rbi', line 27
-
-def arch; end
-
-
- -
-

- - #build_from_source?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'cli/args.rbi', line 30
-
-def build_from_source?; end
-
-
- -
-

- - #build_from_source_formulaeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-76
-
-
# File 'cli/args.rb', line 70
-
-def build_from_source_formulae
-  if build_from_source? || self[:HEAD?] || self[:build_bottle?]
-    named.to_formulae.map(&:full_name)
-  else
-    []
-  end
-end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'cli/args.rbi', line 33
-
-def cask?; end
-
-
- -
-

- - #contextContext::ContextStruct - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-95
-96
-97
-
-
# File 'cli/args.rb', line 95
-
-def context
-  Context::ContextStruct.new(debug: debug?, quiet: quiet?, verbose: verbose?)
-end
-
-
- -
-

- - #debug?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-
-
# File 'cli/args.rbi', line 9
-
-def debug?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'cli/args.rbi', line 36
-
-def formula?; end
-
-
- -
-

- - #freeze_named_args!(named_args, cask_options:, without_api:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'cli/args.rb', line 35
-
-def freeze_named_args!(named_args, cask_options:, without_api:)
-  options = {}
-  options[:force_bottle] = true if self[:force_bottle?]
-  options[:override_spec] = :head if self[:HEAD?]
-  options[:flags] = flags_only unless flags_only.empty?
-  self[:named] = NamedArgs.new(
-    *named_args.freeze,
-    parent:       self,
-    cask_options:,
-    without_api:,
-    **options,
-  )
-end
-
-
- -
-

- - #freeze_processed_options!(processed_options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'cli/args.rb', line 49
-
-def freeze_processed_options!(processed_options)
-  # Reset cache values reliant on processed_options
-  @cli_args = nil
-
-  @processed_options += processed_options
-  @processed_options.freeze
-
-  @options_only = cli_args.select { |a| a.start_with?("-") }.freeze
-  @flags_only = cli_args.select { |a| a.start_with?("--") }.freeze
-end
-
-
- -
-

- - #freeze_remaining_args!(remaining_args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'cli/args.rb', line 31
-
-def freeze_remaining_args!(remaining_args)
-  self[:remaining] = remaining_args.freeze
-end
-
-
- -
-

- - #help?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-
-
# File 'cli/args.rbi', line 12
-
-def help?; end
-
-
- -
-

- - #include_test?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'cli/args.rbi', line 39
-
-def include_test?; end
-
-
- -
-

- - #include_test_formulaeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-78
-79
-80
-81
-82
-83
-84
-
-
# File 'cli/args.rb', line 78
-
-def include_test_formulae
-  if include_test?
-    named.to_formulae.map(&:full_name)
-  else
-    []
-  end
-end
-
-
- -
-

- - #namedNamedArgs - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-61
-62
-63
-64
-
-
# File 'cli/args.rb', line 61
-
-def named
-  require "formula"
-  self[:named]
-end
-
-
- -
-

- - #no_named?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'cli/args.rb', line 66
-
-def no_named?
-  named.blank?
-end
-
-
- -
-

- - #only_formula_or_caskObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'cli/args.rb', line 99
-
-def only_formula_or_cask
-  if formula? && !cask?
-    :formula
-  elsif cask? && !formula?
-    :cask
-  end
-end
-
-
- -
-

- - #osString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'cli/args.rbi', line 42
-
-def os; end
-
-
- -
-

- - #os_arch_combinationsArray<Array(Symbol, Symbol)> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-
-
# File 'cli/args.rb', line 108
-
-def os_arch_combinations
-  skip_invalid_combinations = false
-
-  oses = case (os_sym = os&.to_sym)
-  when nil
-    [SimulateSystem.current_os]
-  when :all
-    skip_invalid_combinations = true
-
-    OnSystem::ALL_OS_OPTIONS
-  else
-    [os_sym]
-  end
-
-  arches = case (arch_sym = arch&.to_sym)
-  when nil
-    [SimulateSystem.current_arch]
-  when :all
-    skip_invalid_combinations = true
-    OnSystem::ARCH_OPTIONS
-  else
-    [arch_sym]
-  end
-
-  oses.product(arches).select do |os, arch|
-    if skip_invalid_combinations
-      bottle_tag = Utils::Bottles::Tag.new(system: os, arch:)
-      bottle_tag.valid_combination?
-    else
-      true
-    end
-  end
-end
-
-
- -
-

- - #quiet?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'cli/args.rbi', line 15
-
-def quiet?; end
-
-
- -
-

- - #remainingArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-18
-
-
# File 'cli/args.rbi', line 18
-
-def remaining; end
-
-
- -
-

- - #value(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-
-
# File 'cli/args.rb', line 86
-
-def value(name)
-  arg_prefix = "--#{name}="
-  flag_with_value = flags_only.find { |arg| arg.start_with?(arg_prefix) }
-  return unless flag_with_value
-
-  flag_with_value.delete_prefix(arg_prefix)
-end
-
-
- -
-

- - #verbose?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'cli/args.rbi', line 21
-
-def verbose?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI/InvalidConstraintError.html b/docs/Homebrew/CLI/InvalidConstraintError.html deleted file mode 100644 index 9d96f07cc..000000000 --- a/docs/Homebrew/CLI/InvalidConstraintError.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - Exception: Homebrew::CLI::InvalidConstraintError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Homebrew::CLI::InvalidConstraintError - - - Private -

-
- -
-
Inherits:
-
- UsageError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cli/parser.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from UsageError

-

#reason

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(arg1, arg2) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg1 - - - (String) - - - -
  • - -
  • - - arg2 - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-756
-757
-758
-
-
# File 'cli/parser.rb', line 756
-
-def initialize(arg1, arg2)
-  super "`#{arg1}` and `#{arg2}` cannot be mutually exclusive and mutually dependent simultaneously."
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI/MaxNamedArgumentsError.html b/docs/Homebrew/CLI/MaxNamedArgumentsError.html deleted file mode 100644 index 73b8a2dec..000000000 --- a/docs/Homebrew/CLI/MaxNamedArgumentsError.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - Exception: Homebrew::CLI::MaxNamedArgumentsError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Homebrew::CLI::MaxNamedArgumentsError - - - Private -

-
- -
-
Inherits:
-
- UsageError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cli/parser.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from UsageError

-

#reason

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(maximum, types: []) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - maximum - - - (Integer) - - - -
  • - -
  • - - types - - - (Array<Symbol>) - - - (defaults to: []) - - -
  • - -
- - -
- - - - -
-
-
-
-763
-764
-765
-766
-767
-768
-769
-770
-771
-772
-773
-774
-
-
# File 'cli/parser.rb', line 763
-
-def initialize(maximum, types: [])
-  super case maximum
-  when 0
-    "This command does not take named arguments."
-  else
-    types << :named if types.empty?
-    arg_types = types.map { |type| type.to_s.tr("_", " ") }
-                     .to_sentence two_words_connector: " or ", last_word_connector: " or "
-
-    "This command does not take more than #{maximum} #{arg_types} #{Utils.pluralize("argument", maximum)}."
-  end
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI/MinNamedArgumentsError.html b/docs/Homebrew/CLI/MinNamedArgumentsError.html deleted file mode 100644 index 490adf9e1..000000000 --- a/docs/Homebrew/CLI/MinNamedArgumentsError.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - Exception: Homebrew::CLI::MinNamedArgumentsError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Homebrew::CLI::MinNamedArgumentsError - - - Private -

-
- -
-
Inherits:
-
- UsageError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cli/parser.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from UsageError

-

#reason

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(minimum, types: []) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - minimum - - - (Integer) - - - -
  • - -
  • - - types - - - (Array<Symbol>) - - - (defaults to: []) - - -
  • - -
- - -
- - - - -
-
-
-
-779
-780
-781
-782
-783
-784
-785
-
-
# File 'cli/parser.rb', line 779
-
-def initialize(minimum, types: [])
-  types << :named if types.empty?
-  arg_types = types.map { |type| type.to_s.tr("_", " ") }
-                   .to_sentence two_words_connector: " or ", last_word_connector: " or "
-
-  super "This command requires at least #{minimum} #{arg_types} #{Utils.pluralize("argument", minimum)}."
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI/NamedArgs.html b/docs/Homebrew/CLI/NamedArgs.html deleted file mode 100644 index a50973c63..000000000 --- a/docs/Homebrew/CLI/NamedArgs.html +++ /dev/null @@ -1,2029 +0,0 @@ - - - - - - - Class: Homebrew::CLI::NamedArgs - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::CLI::NamedArgs - - - Private -

-
- -
-
Inherits:
-
- Array - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cli/named_args.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for loading formulae/casks from named arguments.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Array

-

#blank?, #deep_dup, #fifth, #fourth, #present?, #second, #third, #to_sentence

-
-

Constructor Details

- -
-

- - #initialize(*args, parent: Args.new, override_spec: T.unsafe(nil), force_bottle: T.unsafe(nil), flags: T.unsafe(nil), cask_options: false, without_api: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (String) - - - -
  • - -
  • - - parent - - - (Args) - - - (defaults to: Args.new) - - -
  • - -
  • - - override_spec - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - force_bottle - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - flags - - - (Array<String>) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - cask_options - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - without_api - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'cli/named_args.rb', line 23
-
-def initialize(
-  *args,
-  parent: Args.new,
-  override_spec: T.unsafe(nil),
-  force_bottle: T.unsafe(nil),
-  flags: T.unsafe(nil),
-  cask_options: false,
-  without_api: false
-)
-  require "cask/cask"
-  require "cask/cask_loader"
-  require "formulary"
-  require "keg"
-  require "missing_formula"
-
-  @args = args
-  @override_spec = override_spec
-  @force_bottle = force_bottle
-  @flags = flags
-  @cask_options = cask_options
-  @without_api = without_api
-  @parent = parent
-
-  super(@args)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #parentObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'cli/named_args.rb', line 49
-
-def parent
-  @parent
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #homebrew_tap_cask_namesArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-359
-360
-361
-
-
# File 'cli/named_args.rb', line 359
-
-def homebrew_tap_cask_names
-  downcased_unique_named.grep(HOMEBREW_CASK_TAP_CASK_REGEX)
-end
-
-
- -
-

- - #to_casksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'cli/named_args.rb', line 51
-
-def to_casks
-  @to_casks ||= to_formulae_and_casks(only: :cask).freeze
-end
-
-
- -
-

- - #to_default_kegsArray<Keg> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-
-
# File 'cli/named_args.rb', line 298
-
-def to_default_kegs
-  @to_default_kegs ||= begin
-    to_formulae_and_casks(only: :formula, method: :default_kegs).freeze
-  rescue NoSuchKegError => e
-    if (reason = MissingFormula.suggest_command(e.name, "uninstall"))
-      $stderr.puts reason
-    end
-    raise e
-  end
-end
-
-
- -
-

- - #to_formulaeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-55
-56
-57
-
-
# File 'cli/named_args.rb', line 55
-
-def to_formulae
-  @to_formulae ||= to_formulae_and_casks(only: :formula).freeze
-end
-
-
- -
-

- - #to_formulae_and_casks(only: parent&.only_formula_or_cask, ignore_unavailable: nil, method: T.unsafe(nil), uniq: true, warn: T.unsafe(nil)) ⇒ Array<Formula, Keg, Cask::Cask> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Convert named arguments to Formula or Cask objects. -If both a formula and cask with the same name exist, returns -the formula and prints a warning unless only is specified.

- - -
-
-
-

Parameters:

-
    - -
  • - - only - - - (Symbol, nil) - - - (defaults to: parent&.only_formula_or_cask) - - -
  • - -
  • - - ignore_unavailable - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - method - - - (Symbol, nil) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - uniq - - - (Boolean) - - - (defaults to: true) - - -
  • - -
  • - - warn - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-
-
# File 'cli/named_args.rb', line 71
-
-def to_formulae_and_casks(
-  only: parent&.only_formula_or_cask,
-  ignore_unavailable: nil,
-  method: T.unsafe(nil),
-  uniq: true,
-  warn: T.unsafe(nil)
-)
-  @to_formulae_and_casks ||= {}
-  @to_formulae_and_casks[only] ||= downcased_unique_named.flat_map do |name|
-    options = { warn: }.compact
-    load_formula_or_cask(name, only:, method:, **options)
-  rescue FormulaUnreadableError, FormulaClassUnavailableError,
-         TapFormulaUnreadableError, TapFormulaClassUnavailableError,
-         Cask::CaskUnreadableError
-    # Need to rescue before `*UnavailableError` (superclass of this)
-    # The formula/cask was found, but there's a problem with its implementation
-    raise
-  rescue NoSuchKegError, FormulaUnavailableError, Cask::CaskUnavailableError, FormulaOrCaskUnavailableError
-    ignore_unavailable ? [] : raise
-  end.freeze
-
-  if uniq
-    @to_formulae_and_casks[only].uniq.freeze
-  else
-    @to_formulae_and_casks[only]
-  end
-end
-
-
- -
-

- - #to_formulae_and_casks_and_unavailable(only: parent&.only_formula_or_cask, method: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-128
-129
-130
-131
-132
-133
-134
-135
-
-
# File 'cli/named_args.rb', line 128
-
-def to_formulae_and_casks_and_unavailable(only: parent&.only_formula_or_cask, method: nil)
-  @to_formulae_casks_unknowns ||= {}
-  @to_formulae_casks_unknowns[method] = downcased_unique_named.map do |name|
-    load_formula_or_cask(name, only:, method:)
-  rescue FormulaOrCaskUnavailableError => e
-    e
-  end.uniq.freeze
-end
-
-
- -
-

- - #to_formulae_and_casks_with_tapsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns formulae and casks after validating that a tap is present for each of them.

- - -
-
-
- - -
- - - - -
-
-
-
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-
-
# File 'cli/named_args.rb', line 107
-
-def to_formulae_and_casks_with_taps
-  formulae_and_casks_with_taps, formulae_and_casks_without_taps =
-    to_formulae_and_casks.partition do |formula_or_cask|
-      T.cast(formula_or_cask, T.any(Formula, Cask::Cask)).tap&.installed?
-    end
-
-  return formulae_and_casks_with_taps if formulae_and_casks_without_taps.blank?
-
-  types = []
-  types << "formulae" if formulae_and_casks_without_taps.any?(Formula)
-  types << "casks" if formulae_and_casks_without_taps.any?(Cask::Cask)
-
-  odie <<~ERROR
-    These #{types.join(" and ")} are not in any locally installed taps!
-
-      #{formulae_and_casks_without_taps.sort_by(&:to_s).join("\n  ")}
-
-    You may need to run `brew tap` to install additional taps.
-  ERROR
-end
-
-
- -
-

- - #to_formulae_to_casks(only: parent&.only_formula_or_cask, method: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-
-
# File 'cli/named_args.rb', line 99
-
-def to_formulae_to_casks(only: parent&.only_formula_or_cask, method: nil)
-  @to_formulae_to_casks ||= {}
-  @to_formulae_to_casks[[method, only]] = to_formulae_and_casks(only:, method:)
-                                          .partition { |o| o.is_a?(Formula) || o.is_a?(Keg) }
-                                          .map(&:freeze).freeze
-end
-
-
- -
-

- - #to_installed_tapsArray<Tap> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-352
-353
-354
-355
-356
-
-
# File 'cli/named_args.rb', line 352
-
-def to_installed_taps
-  @to_installed_taps ||= to_taps.each do |tap|
-    raise TapUnavailableError, tap.name unless tap.installed?
-  end.uniq.freeze
-end
-
-
- -
-

- - #to_kegsArray<Keg> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-
-
# File 'cli/named_args.rb', line 322
-
-def to_kegs
-  @to_kegs ||= begin
-    to_formulae_and_casks(only: :formula, method: :kegs).freeze
-  rescue NoSuchKegError => e
-    if (reason = MissingFormula.suggest_command(e.name, "uninstall"))
-      $stderr.puts reason
-    end
-    raise e
-  end
-end
-
-
- -
-

- - #to_kegs_to_casks(only: parent&.only_formula_or_cask, ignore_unavailable: nil, all_kegs: nil) ⇒ Array(Array<Keg>, Array<Cask::Cask>) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - only - - - (Symbol, nil) - - - (defaults to: parent&.only_formula_or_cask) - - -
  • - -
  • - - ignore_unavailable - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - all_kegs - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-337
-338
-339
-340
-341
-342
-343
-344
-
-
# File 'cli/named_args.rb', line 337
-
-def to_kegs_to_casks(only: parent&.only_formula_or_cask, ignore_unavailable: nil, all_kegs: nil)
-  method = all_kegs ? :kegs : :default_kegs
-  @to_kegs_to_casks ||= {}
-  @to_kegs_to_casks[method] ||=
-    to_formulae_and_casks(only:, ignore_unavailable:, method:)
-    .partition { |o| o.is_a?(Keg) }
-    .map(&:freeze).freeze
-end
-
-
- -
-

- - #to_latest_kegsArray<Keg> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-
-
# File 'cli/named_args.rb', line 310
-
-def to_latest_kegs
-  @to_latest_kegs ||= begin
-    to_formulae_and_casks(only: :formula, method: :latest_kegs).freeze
-  rescue NoSuchKegError => e
-    if (reason = MissingFormula.suggest_command(e.name, "uninstall"))
-      $stderr.puts reason
-    end
-    raise e
-  end
-end
-
-
- -
-

- - #to_paths(only: parent&.only_formula_or_cask, recurse_tap: false) ⇒ Array<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Keep existing paths and try to convert others to tap, formula or cask paths. -If a cask and formula with the same name exist, includes both their paths -unless only is specified.

- - -
-
-
-

Parameters:

-
    - -
  • - - only - - - (Symbol, nil) - - - (defaults to: parent&.only_formula_or_cask) - - -
  • - -
  • - - recurse_tap - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-
-
# File 'cli/named_args.rb', line 253
-
-def to_paths(only: parent&.only_formula_or_cask, recurse_tap: false)
-  @to_paths ||= {}
-  @to_paths[only] ||= Homebrew.with_no_api_env_if_needed(@without_api) do
-    downcased_unique_named.flat_map do |name|
-      path = Pathname(name).expand_path
-      if only.nil? && name.match?(LOCAL_PATH_REGEX) && path.exist?
-        path
-      elsif name.match?(TAP_NAME_REGEX)
-        tap = Tap.fetch(name)
-
-        if recurse_tap
-          next tap.formula_files if only == :formula
-          next tap.cask_files if only == :cask
-        end
-
-        tap.path
-      else
-        next Formulary.path(name) if only == :formula
-        next Cask::CaskLoader.path(name) if only == :cask
-
-        formula_path = Formulary.path(name)
-        cask_path = Cask::CaskLoader.path(name)
-
-        paths = []
-
-        if formula_path.exist? ||
-           (!Homebrew::EnvConfig.no_install_from_api? &&
-           !CoreTap.instance.installed? &&
-           Homebrew::API::Formula.all_formulae.key?(path.basename.to_s))
-          paths << formula_path
-        end
-        if cask_path.exist? ||
-           (!Homebrew::EnvConfig.no_install_from_api? &&
-           !CoreCaskTap.instance.installed? &&
-           Homebrew::API::Cask.all_casks.key?(path.basename.to_s))
-          paths << cask_path
-        end
-
-        paths.empty? ? path : paths
-      end
-    end.uniq.freeze
-  end
-end
-
-
- -
-

- - #to_resolved_formulae(uniq: true) ⇒ Array<Formula> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - uniq - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-236
-237
-238
-239
-
-
# File 'cli/named_args.rb', line 236
-
-def to_resolved_formulae(uniq: true)
-  @to_resolved_formulae ||= to_formulae_and_casks(only: :formula, method: :resolve, uniq:)
-                            .freeze
-end
-
-
- -
-

- - #to_resolved_formulae_to_casks(only: parent&.only_formula_or_cask) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-241
-242
-243
-
-
# File 'cli/named_args.rb', line 241
-
-def to_resolved_formulae_to_casks(only: parent&.only_formula_or_cask)
-  to_formulae_to_casks(only:, method: :resolve)
-end
-
-
- -
-

- - #to_tapsArray<Tap> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-347
-348
-349
-
-
# File 'cli/named_args.rb', line 347
-
-def to_taps
-  @to_taps ||= downcased_unique_named.map { |name| Tap.fetch name }.uniq.freeze
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI/NumberOfNamedArgumentsError.html b/docs/Homebrew/CLI/NumberOfNamedArgumentsError.html deleted file mode 100644 index a70a474af..000000000 --- a/docs/Homebrew/CLI/NumberOfNamedArgumentsError.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - Exception: Homebrew::CLI::NumberOfNamedArgumentsError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Homebrew::CLI::NumberOfNamedArgumentsError - - - Private -

-
- -
-
Inherits:
-
- UsageError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cli/parser.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from UsageError

-

#reason

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(minimum, types: []) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - minimum - - - (Integer) - - - -
  • - -
  • - - types - - - (Array<Symbol>) - - - (defaults to: []) - - -
  • - -
- - -
- - - - -
-
-
-
-790
-791
-792
-793
-794
-795
-796
-
-
# File 'cli/parser.rb', line 790
-
-def initialize(minimum, types: [])
-  types << :named if types.empty?
-  arg_types = types.map { |type| type.to_s.tr("_", " ") }
-                   .to_sentence two_words_connector: " or ", last_word_connector: " or "
-
-  super "This command requires exactly #{minimum} #{arg_types} #{Utils.pluralize("argument", minimum)}."
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI/OptionConflictError.html b/docs/Homebrew/CLI/OptionConflictError.html deleted file mode 100644 index 40bcb2e26..000000000 --- a/docs/Homebrew/CLI/OptionConflictError.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - Exception: Homebrew::CLI::OptionConflictError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Homebrew::CLI::OptionConflictError - - - Private -

-
- -
-
Inherits:
-
- UsageError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cli/parser.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from UsageError

-

#reason

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(args) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-748
-749
-750
-751
-
-
# File 'cli/parser.rb', line 748
-
-def initialize(args)
-  args_list = args.map { Formatter.option(_1) }.join(" and ")
-  super "Options #{args_list} are mutually exclusive."
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI/OptionConstraintError.html b/docs/Homebrew/CLI/OptionConstraintError.html deleted file mode 100644 index ce760bdf0..000000000 --- a/docs/Homebrew/CLI/OptionConstraintError.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - Exception: Homebrew::CLI::OptionConstraintError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Homebrew::CLI::OptionConstraintError - - - Private -

-
- -
-
Inherits:
-
- UsageError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cli/parser.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from UsageError

-

#reason

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(arg1, arg2, missing: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg1 - - - (String) - - - -
  • - -
  • - - arg2 - - - (String) - - - -
  • - -
  • - - missing - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-736
-737
-738
-739
-740
-741
-742
-743
-
-
# File 'cli/parser.rb', line 736
-
-def initialize(arg1, arg2, missing: false)
-  message = if missing
-    "`#{arg2}` cannot be passed without `#{arg1}`."
-  else
-    "`#{arg1}` and `#{arg2}` should be passed together."
-  end
-  super message
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/CLI/Parser.html b/docs/Homebrew/CLI/Parser.html deleted file mode 100644 index 95dc36a51..000000000 --- a/docs/Homebrew/CLI/Parser.html +++ /dev/null @@ -1,3433 +0,0 @@ - - - - - - - Class: Homebrew::CLI::Parser - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::CLI::Parser - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/linux/parser.rb,
- cli/parser.rb
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
OptionsType = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.type_alias { T::Array[[String, T.nilable(String), T.nilable(String), String, T::Boolean]] }
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(cmd = nil, &block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cmd - - - (T.class_of(Homebrew::AbstractCommand), nil) - - - (defaults to: nil) - - -
  • - -
  • - - block - - - (T.proc.bind(Parser).void, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-
-
# File 'cli/parser.rb', line 146
-
-def initialize(cmd = nil, &block)
-  @parser = T.let(OptionParser.new, OptionParser)
-  @parser.summary_indent = "  "
-  # Disable default handling of `--version` switch.
-  @parser.base.long.delete("version")
-  # Disable default handling of `--help` switch.
-  @parser.base.long.delete("help")
-
-  @args = T.let((cmd&.args_class || Args).new, Args)
-
-  if cmd
-    @command_name = T.let(cmd.command_name, String)
-    @is_dev_cmd = T.let(cmd.dev_cmd?, T::Boolean)
-  else
-    # FIXME: remove once commands are all subclasses of `AbstractCommand`:
-    # Filter out Sorbet runtime type checking method calls.
-    cmd_location = caller_locations.select do |location|
-      T.must(location.path).exclude?("/gems/sorbet-runtime-")
-    end.fetch(1)
-    @command_name = T.let(T.must(cmd_location.label).chomp("_args").tr("_", "-"), String)
-    @is_dev_cmd = T.let(T.must(cmd_location.absolute_path).start_with?(Commands::HOMEBREW_DEV_CMD_PATH),
-                        T::Boolean)
-  end
-
-  @constraints = T.let([], T::Array[[String, String]])
-  @conflicts = T.let([], T::Array[T::Array[String]])
-  @switch_sources = T.let({}, T::Hash[String, Symbol])
-  @processed_options = T.let([], OptionsType)
-  @non_global_processed_options = T.let([], T::Array[[String, ArgType]])
-  @named_args_type = T.let(nil, T.nilable(ArgType))
-  @max_named_args = T.let(nil, T.nilable(Integer))
-  @min_named_args = T.let(nil, T.nilable(Integer))
-  @named_args_without_api = T.let(false, T::Boolean)
-  @description = T.let(nil, T.nilable(String))
-  @usage_banner = T.let(nil, T.nilable(String))
-  @hide_from_man_page = T.let(false, T::Boolean)
-  @formula_options = T.let(false, T::Boolean)
-  @cask_options = T.let(false, T::Boolean)
-
-  self.class.global_options.each do |short, long, desc|
-    switch short, long, description: desc, env: option_to_name(long), method: :on_tail
-  end
-
-  instance_eval(&block) if block
-
-  generate_banner
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #hide_from_man_pageBoolean (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'cli/parser.rb', line 30
-
-def hide_from_man_page
-  @hide_from_man_page
-end
-
-
- - - -
-

- - #named_args_typeArgType (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (ArgType) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'cli/parser.rb', line 33
-
-def named_args_type
-  @named_args_type
-end
-
-
- - - -
-

- - #processed_optionsOptionsType (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'cli/parser.rb', line 27
-
-def processed_options
-  @processed_options
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_cmd_path(cmd_path) ⇒ CLI::Parser? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cmd_path - - - (Pathname) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'cli/parser.rb', line 36
-
-def self.from_cmd_path(cmd_path)
-  cmd_args_method_name = Commands.args_method_name(cmd_path)
-  cmd_name = cmd_args_method_name.to_s.delete_suffix("_args").tr("_", "-")
-
-  begin
-    if require?(cmd_path)
-      cmd = Homebrew::AbstractCommand.command(cmd_name)
-      if cmd
-        cmd.parser
-      else
-        # FIXME: remove once commands are all subclasses of `AbstractCommand`:
-        Homebrew.send(cmd_args_method_name)
-      end
-    end
-  rescue NoMethodError => e
-    raise if e.name.to_sym != cmd_args_method_name
-
-    nil
-  end
-end
-
-
- -
-

- - .global_cask_optionsArray<Array(Symbol, String, Hash)> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-
-
# File 'cli/parser.rb', line 58
-
-def self.global_cask_options
-  [
-    [:flag, "--appdir=", {
-      description: "Target location for Applications " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:appdir]}`).",
-    }],
-    [:flag, "--keyboard-layoutdir=", {
-      description: "Target location for Keyboard Layouts " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:keyboard_layoutdir]}`).",
-    }],
-    [:flag, "--colorpickerdir=", {
-      description: "Target location for Color Pickers " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:colorpickerdir]}`).",
-    }],
-    [:flag, "--prefpanedir=", {
-      description: "Target location for Preference Panes " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:prefpanedir]}`).",
-    }],
-    [:flag, "--qlplugindir=", {
-      description: "Target location for Quick Look Plugins " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:qlplugindir]}`).",
-    }],
-    [:flag, "--mdimporterdir=", {
-      description: "Target location for Spotlight Plugins " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:mdimporterdir]}`).",
-    }],
-    [:flag, "--dictionarydir=", {
-      description: "Target location for Dictionaries " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:dictionarydir]}`).",
-    }],
-    [:flag, "--fontdir=", {
-      description: "Target location for Fonts " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:fontdir]}`).",
-    }],
-    [:flag, "--servicedir=", {
-      description: "Target location for Services " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:servicedir]}`).",
-    }],
-    [:flag, "--input-methoddir=", {
-      description: "Target location for Input Methods " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:input_methoddir]}`).",
-    }],
-    [:flag, "--internet-plugindir=", {
-      description: "Target location for Internet Plugins " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:internet_plugindir]}`).",
-    }],
-    [:flag, "--audio-unit-plugindir=", {
-      description: "Target location for Audio Unit Plugins " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:audio_unit_plugindir]}`).",
-    }],
-    [:flag, "--vst-plugindir=", {
-      description: "Target location for VST Plugins " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:vst_plugindir]}`).",
-    }],
-    [:flag, "--vst3-plugindir=", {
-      description: "Target location for VST3 Plugins " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:vst3_plugindir]}`).",
-    }],
-    [:flag, "--screen-saverdir=", {
-      description: "Target location for Screen Savers " \
-                   "(default: `#{Cask::Config::DEFAULT_DIRS[:screen_saverdir]}`).",
-    }],
-    [:comma_array, "--language", {
-      description: "Comma-separated list of language codes to prefer for cask installation. " \
-                   "The first matching language is used, otherwise it reverts to the cask's " \
-                   "default language. The default value is the language of your system.",
-    }],
-  ]
-end
-
-
- -
-

- - .global_optionsArray<Array(String, String, String)> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-129
-130
-131
-132
-133
-134
-135
-136
-
-
# File 'cli/parser.rb', line 129
-
-def self.global_options
-  [
-    ["-d", "--debug",   "Display any debugging information."],
-    ["-q", "--quiet",   "Make some output more quiet."],
-    ["-v", "--verbose", "Make some output more verbose."],
-    ["-h", "--help",    "Show this message."],
-  ]
-end
-
-
- -
-

- - .option_to_name(option) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - option - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-139
-140
-141
-
-
# File 'cli/parser.rb', line 139
-
-def self.option_to_name(option)
-  option.sub(/\A--?(\[no-\])?/, "").tr("-", "_").delete("=")
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #cask_optionsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-431
-432
-433
-434
-435
-436
-437
-438
-
-
# File 'cli/parser.rb', line 431
-
-def cask_options
-  self.class.global_cask_options.each do |args|
-    options = T.cast(args.pop, T::Hash[Symbol, String])
-    send(*args, **options)
-    conflicts "--formula", args[1]
-  end
-  @cask_options = true
-end
-
-
- -
-

- - #comma_array(name, description: nil, hidden: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - description - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - hidden - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-243
-244
-245
-246
-247
-248
-249
-250
-
-
# File 'cli/parser.rb', line 243
-
-def comma_array(name, description: nil, hidden: false)
-  name = name.chomp "="
-  description = option_description(description, name, hidden:)
-  process_option(name, description, type: :comma_array, hidden:)
-  @parser.on(name, OptionParser::REQUIRED_ARGUMENT, Array, *wrap_option_desc(description)) do |list|
-    @args[option_to_name(name)] = list
-  end
-end
-
-
- -
-

- - #conflicts(*options) ⇒ Array<Array<String>> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-283
-284
-285
-
-
# File 'cli/parser.rb', line 283
-
-def conflicts(*options)
-  @conflicts << options.map { |option| option_to_name(option) }
-end
-
-
- -
-

- - #description(text = nil) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - text - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-228
-229
-230
-231
-232
-
-
# File 'cli/parser.rb', line 228
-
-def description(text = nil)
-  return @description if text.blank?
-
-  @description = text.chomp
-end
-
-
- -
-

- - #flag(*names, description: nil, replacement: nil, depends_on: nil, hidden: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - names - - - (String) - - - -
  • - -
  • - - description - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - replacement - - - (Symbol, String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - depends_on - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - hidden - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-
-
# File 'cli/parser.rb', line 256
-
-def flag(*names, description: nil, replacement: nil, depends_on: nil, hidden: false)
-  required, flag_type = if names.any? { |name| name.end_with? "=" }
-    [OptionParser::REQUIRED_ARGUMENT, :required_flag]
-  else
-    [OptionParser::OPTIONAL_ARGUMENT, :optional_flag]
-  end
-  names.map! { |name| name.chomp "=" }
-  description = option_description(description, *names, hidden:)
-  if replacement.nil?
-    process_option(*names, description, type: flag_type, hidden:)
-  else
-    description += " (disabled#{"; replaced by #{replacement}" if replacement.present?})"
-  end
-  @parser.on(*names, *wrap_option_desc(description), required) do |option_value|
-    # This odisabled should stick around indefinitely.
-    odisabled "the `#{names.first}` flag", replacement unless replacement.nil?
-    names.each do |name|
-      @args[option_to_name(name)] = option_value
-    end
-  end
-
-  names.each do |name|
-    set_constraints(name, depends_on:)
-  end
-end
-
-
- -
-

- - #formula_optionsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-441
-442
-443
-
-
# File 'cli/parser.rb', line 441
-
-def formula_options
-  @formula_options = true
-end
-
-
- -
-

- - #generate_help_textString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-
-
# File 'cli/parser.rb', line 419
-
-def generate_help_text
-  Formatter.format_help_text(@parser.to_s, width: Formatter::COMMAND_DESC_WIDTH)
-           .gsub(/\n.*?@@HIDDEN@@.*?(?=\n)/, "")
-           .sub(/^/, "#{Tty.bold}Usage: brew#{Tty.reset} ")
-           .gsub(/`(.*?)`/m, "#{Tty.bold}\\1#{Tty.reset}")
-           .gsub(%r{<([^\s]+?://[^\s]+?)>}) { |url| Formatter.url(url) }
-           .gsub(/\*(.*?)\*|<(.*?)>/m) do |underlined|
-             underlined[1...-1].gsub(/^(\s*)(.*?)$/, "\\1#{Tty.underline}\\2#{Tty.reset}")
-           end
-end
-
-
- -
-

- - #hide_from_man_page!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-478
-479
-480
-
-
# File 'cli/parser.rb', line 478
-
-def hide_from_man_page!
-  @hide_from_man_page = true
-end
-
-
- -
-

- - #name_to_option(name) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-291
-292
-293
-294
-295
-296
-297
-
-
# File 'cli/parser.rb', line 291
-
-def name_to_option(name)
-  if name.length == 1
-    "-#{name}"
-  else
-    "--#{name.tr("_", "-")}"
-  end
-end
-
-
- -
-

- - #named_args(type = nil, number: nil, min: nil, max: nil, without_api: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - type - - - (ArgType) - - - (defaults to: nil) - - -
  • - -
  • - - number - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
  • - - min - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
  • - - max - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
  • - - without_api - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-
-
# File 'cli/parser.rb', line 454
-
-def named_args(type = nil, number: nil, min: nil, max: nil, without_api: false)
-  if number.present? && (min.present? || max.present?)
-    raise ArgumentError, "Do not specify both `number` and `min` or `max`"
-  end
-
-  if type == :none && (number.present? || min.present? || max.present?)
-    raise ArgumentError, "Do not specify both `number`, `min` or `max` with `named_args :none`"
-  end
-
-  @named_args_type = type
-
-  if type == :none
-    @max_named_args = 0
-  elsif number
-    @min_named_args = @max_named_args = number
-  elsif min || max
-    @min_named_args = min
-    @max_named_args = max
-  end
-
-  @named_args_without_api = without_api
-end
-
-
- -
-

- - #option_description(description, *names, hidden: false) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - description - - - (String, nil) - - - -
  • - -
  • - - names - - - (String) - - - -
  • - -
  • - - hidden - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-305
-306
-307
-308
-309
-310
-
-
# File 'cli/parser.rb', line 305
-
-def option_description(description, *names, hidden: false)
-  return HIDDEN_DESC_PLACEHOLDER if hidden
-  return description if description.present?
-
-  option_to_description(*names)
-end
-
-
- -
-

- - #option_to_description(*names) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - names - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-300
-301
-302
-
-
# File 'cli/parser.rb', line 300
-
-def option_to_description(*names)
-  names.map { |name| name.to_s.sub(/\A--?/, "").tr("-", " ") }.max
-end
-
-
- -
-

- - #option_to_name(option) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - option - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-288
-
-
# File 'cli/parser.rb', line 288
-
-def option_to_name(option) = self.class.option_to_name(option)
-
-
- -
-

- - #parse(argv = ARGV.freeze, ignore_invalid_options: false) ⇒ Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - argv - - - (Array<String>) - - - (defaults to: ARGV.freeze) - - -
  • - -
  • - - ignore_invalid_options - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Args) - - - -
  • - -
- -
- - - - -
-
-
-
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-
-
# File 'cli/parser.rb', line 352
-
-def parse(argv = ARGV.freeze, ignore_invalid_options: false)
-  raise "Arguments were already parsed!" if @args_parsed
-
-  # If we accept formula options, but the command isn't scoped only
-  # to casks, parse once allowing invalid options so we can get the
-  # remaining list containing formula names.
-  if @formula_options && !only_casks?(argv)
-    remaining, non_options = parse_remaining(argv, ignore_invalid_options: true)
-
-    argv = [*remaining, "--", *non_options]
-
-    formulae(argv).each do |f|
-      next if f.options.empty?
-
-      f.options.each do |o|
-        name = o.flag
-        description = "`#{f.name}`: #{o.description}"
-        if name.end_with? "="
-          flag(name, description:)
-        else
-          switch name, description:
-        end
-
-        conflicts "--cask", name
-      end
-    end
-  end
-
-  remaining, non_options = parse_remaining(argv, ignore_invalid_options:)
-
-  named_args = if ignore_invalid_options
-    []
-  else
-    remaining + non_options
-  end
-
-  unless ignore_invalid_options
-    unless @is_dev_cmd
-      set_default_options
-      validate_options
-    end
-    check_constraint_violations
-    check_named_args(named_args)
-  end
-
-  @args.freeze_named_args!(named_args, cask_options: @cask_options, without_api: @named_args_without_api)
-  @args.freeze_remaining_args!(non_options.empty? ? remaining : [*remaining, "--", non_options])
-  @args.freeze_processed_options!(@processed_options)
-  @args.freeze
-
-  @args_parsed = T.let(true, T.nilable(TrueClass))
-
-  if !ignore_invalid_options && @args.help?
-    puts generate_help_text
-    exit
-  end
-
-  @args
-end
-
-
- -
-

- - #parse_remaining(argv, ignore_invalid_options: false) ⇒ Array(Array<String>, Array<String>) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - argv - - - (Array<String>) - - - -
  • - -
  • - - ignore_invalid_options - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-
-
# File 'cli/parser.rb', line 316
-
-def parse_remaining(argv, ignore_invalid_options: false)
-  i = 0
-  remaining = []
-
-  argv, non_options = split_non_options(argv)
-  allow_commands = Array(@named_args_type).include?(:command)
-
-  while i < argv.count
-    begin
-      begin
-        arg = argv[i]
-
-        remaining << arg unless @parser.parse([arg]).empty?
-      rescue OptionParser::MissingArgument
-        raise if i + 1 >= argv.count
-
-        args = argv[i..(i + 1)]
-        @parser.parse(args)
-        i += 1
-      end
-    rescue OptionParser::InvalidOption
-      if ignore_invalid_options || (allow_commands && Commands.path(arg))
-        remaining << arg
-      else
-        $stderr.puts generate_help_text
-        raise
-      end
-    end
-
-    i += 1
-  end
-
-  [remaining, non_options]
-end
-
-
- -
-

- - #set_default_optionsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'extend/os/linux/parser.rb', line 10
-
-def set_default_options
-  @args["formula?"] = true if @args.respond_to?(:formula?)
-end
-
-
- -
-

- - #switch(*names, description: nil, replacement: nil, env: nil, depends_on: nil, method: :on, hidden: false, disable: false) ⇒ void - - - - Also known as: - switch_option - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - names - - - (String) - - - -
  • - -
  • - - description - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - replacement - - - (T.untyped) - - - (defaults to: nil) - - -
  • - -
  • - - env - - - (T.untyped) - - - (defaults to: nil) - - -
  • - -
  • - - depends_on - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - method - - - (Symbol) - - - (defaults to: :on) - - -
  • - -
  • - - hidden - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - disable - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-
-
# File 'cli/parser.rb', line 198
-
-def switch(*names, description: nil, replacement: nil, env: nil, depends_on: nil,
-           method: :on, hidden: false, disable: false)
-  global_switch = names.first.is_a?(Symbol)
-  return if global_switch
-
-  description = option_description(description, *names, hidden:)
-  process_option(*names, description, type: :switch, hidden:) unless disable
-
-  if replacement || disable
-    description += " (#{disable ? "disabled" : "deprecated"}#{"; replaced by #{replacement}" if replacement})"
-  end
-
-  @parser.public_send(method, *names, *wrap_option_desc(description)) do |value|
-    # This odeprecated should stick around indefinitely.
-    odeprecated "the `#{names.first}` switch", replacement, disable: disable if !replacement.nil? || disable
-    value = true if names.none? { |name| name.start_with?("--[no-]") }
-
-    set_switch(*names, value:, from: :args)
-  end
-
-  names.each do |name|
-    set_constraints(name, depends_on:)
-  end
-
-  env_value = value_for_env(env)
-  set_switch(*names, value: env_value, from: :env) unless env_value.nil?
-end
-
-
- -
-

- - #usage_banner(text) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - text - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-235
-236
-237
-
-
# File 'cli/parser.rb', line 235
-
-def usage_banner(text)
-  @usage_banner, @description = text.chomp.split("\n\n", 2)
-end
-
-
- -
-

- - #usage_banner_textString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-240
-
-
# File 'cli/parser.rb', line 240
-
-def usage_banner_text = @parser.banner
-
-
- -
-

- - #validate_optionsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'extend/os/linux/parser.rb', line 14
-
-def validate_options
-  return unless @args.respond_to?(:cask?)
-  return unless @args.cask?
-
-  # NOTE: We don't raise an error here because we don't want
-  #       to print the help page or a stack trace.
-  odie "Invalid `--cask` usage: Casks do not work on Linux"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cleanup.html b/docs/Homebrew/Cleanup.html deleted file mode 100644 index 6ee893eb3..000000000 --- a/docs/Homebrew/Cleanup.html +++ /dev/null @@ -1,3897 +0,0 @@ - - - - - - - Class: Homebrew::Cleanup - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cleanup - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Attrable
-
- - - - - - - - -
-
Defined in:
-
cleanup.rb,
- extend/os/mac/cleanup.rb,
extend/os/linux/cleanup.rb,
sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for cleaning up the Homebrew cache.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PERIODIC_CLEAN_FILE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_CACHE/".cleaned").freeze
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

-
-

Constructor Details

- -
-

- - #initialize(*args, dry_run: false, scrub: false, days: nil, cache: HOMEBREW_CACHE) ⇒ Cleanup - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Cleanup.

- - -
-
-
- - -
- - - - -
-
-
-
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-
-
# File 'cleanup.rb', line 202
-
-def initialize(*args, dry_run: false, scrub: false, days: nil, cache: HOMEBREW_CACHE)
-  @disk_cleanup_size = 0
-  @args = args
-  @dry_run = dry_run
-  @scrub = scrub
-  @prune = days.present?
-  @days = days || Homebrew::EnvConfig.cleanup_max_age_days.to_i
-  @cache = cache
-  @cleaned_up_paths = Set.new
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #argsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-200
-201
-202
-
-
# File 'cleanup.rb', line 200
-
-def args
-  @args
-end
-
-
- - - -
-

- - #cacheObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-200
-201
-202
-
-
# File 'cleanup.rb', line 200
-
-def cache
-  @cache
-end
-
-
- - - -
-

- - #daysObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-200
-201
-202
-
-
# File 'cleanup.rb', line 200
-
-def days
-  @days
-end
-
-
- - - -
-

- - #disk_cleanup_sizeObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-200
-201
-202
-
-
# File 'cleanup.rb', line 200
-
-def disk_cleanup_size
-  @disk_cleanup_size
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .autoremove(dry_run: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-680
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-700
-701
-702
-703
-704
-705
-706
-707
-708
-709
-710
-711
-712
-713
-714
-
-
# File 'cleanup.rb', line 680
-
-def self.autoremove(dry_run: false)
-  require "utils/autoremove"
-  require "cask/caskroom"
-
-  # If this runs after install, uninstall, reinstall or upgrade,
-  # the cache of installed formulae may no longer be valid.
-  Formula.clear_cache unless dry_run
-
-  formulae = Formula.installed
-  # Remove formulae listed in HOMEBREW_NO_CLEANUP_FORMULAE and their dependencies.
-  if Homebrew::EnvConfig.no_cleanup_formulae.present?
-    formulae -= formulae.select { skip_clean_formula?(_1) }
-                        .flat_map { |f| [f, *f.runtime_formula_dependencies] }
-  end
-  casks = Cask::Caskroom.casks
-
-  removable_formulae = Utils::Autoremove.removable_formulae(formulae, casks)
-
-  return if removable_formulae.blank?
-
-  formulae_names = removable_formulae.map(&:full_name).sort
-
-  verb = dry_run ? "Would autoremove" : "Autoremoving"
-  oh1 "#{verb} #{formulae_names.count} unneeded #{Utils.pluralize("formula", formulae_names.count, plural: "e")}:"
-  puts formulae_names.join("\n")
-  return if dry_run
-
-  require "uninstall"
-
-  kegs_by_rack = removable_formulae.filter_map(&:any_installed_keg).group_by(&:rack)
-  Uninstall.uninstall_kegs(kegs_by_rack)
-
-  # The installed formula cache will be invalid after uninstalling.
-  Formula.clear_cache
-end
-
-
- -
-

- - .go_cache_directory?(pathname) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - pathname - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-
-
# File 'cleanup.rb', line 37
-
-def go_cache_directory?(pathname)
-  # Go makes its cache contents read-only to ensure cache integrity,
-  # which makes sense but is something we need to undo for cleanup.
-  pathname.directory? && %w[go_cache go_mod_cache].include?(pathname.basename.to_s)
-end
-
-
- -
-

- - .incomplete?(pathname) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - pathname - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'cleanup.rb', line 18
-
-def incomplete?(pathname)
-  pathname.extname.end_with?(".incomplete")
-end
-
-
- -
-

- - .install_formula_clean!(formula, dry_run: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-
-
# File 'cleanup.rb', line 213
-
-def self.install_formula_clean!(formula, dry_run: false)
-  return if Homebrew::EnvConfig.no_install_cleanup?
-  return unless formula.latest_version_installed?
-  return if skip_clean_formula?(formula)
-
-  if dry_run
-    ohai "Would run `brew cleanup #{formula}`"
-  else
-    ohai "Running `brew cleanup #{formula}`..."
-  end
-
-  puts_no_install_cleanup_disable_message_if_not_already!
-  return if dry_run
-
-  Cleanup.new.cleanup_formula(formula)
-end
-
-
- -
-

- - .nested_cache?(pathname) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - pathname - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'cleanup.rb', line 23
-
-def nested_cache?(pathname)
-  pathname.directory? && %w[
-    cargo_cache
-    go_cache
-    go_mod_cache
-    glide_home
-    java_cache
-    npm_cache
-    pip_cache
-    gclient_cache
-  ].include?(pathname.basename.to_s)
-end
-
-
- -
-

- - .periodic_clean!(dry_run: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-
-
# File 'cleanup.rb', line 265
-
-def self.periodic_clean!(dry_run: false)
-  return if Homebrew::EnvConfig.no_install_cleanup?
-  return unless periodic_clean_due?
-
-  if dry_run
-    oh1 "Would run `brew cleanup` which has not been run in the last #{CLEANUP_DEFAULT_DAYS} days"
-  else
-    oh1 "`brew cleanup` has not been run in the last #{CLEANUP_DEFAULT_DAYS} days, running now..."
-  end
-
-  puts_no_install_cleanup_disable_message
-  return if dry_run
-
-  Cleanup.new.clean!(quiet: true, periodic: true)
-end
-
-
- -
-

- - .periodic_clean_due?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-
-
# File 'cleanup.rb', line 253
-
-def self.periodic_clean_due?
-  return false if Homebrew::EnvConfig.no_install_cleanup?
-
-  unless PERIODIC_CLEAN_FILE.exist?
-    HOMEBREW_CACHE.mkpath
-    FileUtils.touch PERIODIC_CLEAN_FILE
-    return false
-  end
-
-  PERIODIC_CLEAN_FILE.mtime < (DateTime.now - CLEANUP_DEFAULT_DAYS).to_time
-end
-
-
- -
-

- - .prune?(pathname, days) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - pathname - - - (Pathname) - - - -
  • - -
  • - - days - - - (Integer, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'cleanup.rb', line 44
-
-def prune?(pathname, days)
-  return false unless days
-  return true if days.zero?
-  return true if pathname.symlink? && !pathname.exist?
-
-  days_ago = (DateTime.now - days).to_time
-  pathname.mtime < days_ago && pathname.ctime < days_ago
-end
-
-
- -
-

- - .puts_no_install_cleanup_disable_messageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-230
-231
-232
-233
-234
-235
-236
-
-
# File 'cleanup.rb', line 230
-
-def self.puts_no_install_cleanup_disable_message
-  return if Homebrew::EnvConfig.no_env_hints?
-  return if Homebrew::EnvConfig.no_install_cleanup?
-
-  puts "Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP."
-  puts "Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`)."
-end
-
-
- -
-

- - .puts_no_install_cleanup_disable_message_if_not_already!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-238
-239
-240
-241
-242
-243
-
-
# File 'cleanup.rb', line 238
-
-def self.puts_no_install_cleanup_disable_message_if_not_already!
-  return if @puts_no_install_cleanup_disable_message_if_not_already
-
-  puts_no_install_cleanup_disable_message
-  @puts_no_install_cleanup_disable_message_if_not_already = true
-end
-
-
- -
-

- - .skip_clean_formula?(formula) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-245
-246
-247
-248
-249
-250
-251
-
-
# File 'cleanup.rb', line 245
-
-def self.skip_clean_formula?(formula)
-  no_cleanup_formula = Homebrew::EnvConfig.no_cleanup_formulae
-  return false if no_cleanup_formula.blank?
-
-  @skip_clean_formulae ||= no_cleanup_formula.split(",")
-  @skip_clean_formulae.include?(formula.name) || @skip_clean_formulae.intersect?(formula.aliases)
-end
-
-
- -
-

- - .stale?(entry, scrub: false) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - entry - - - (Hash) - - - -
  • - -
  • - - scrub - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-
-
# File 'cleanup.rb', line 54
-
-def stale?(entry, scrub: false)
-  pathname = entry[:path]
-  return false unless pathname.resolved_path.file?
-
-  case entry[:type]
-  when :api_source
-    stale_api_source?(pathname, scrub)
-  when :cask
-    stale_cask?(pathname, scrub)
-  when :gh_actions_artifact
-    stale_gh_actions_artifact?(pathname, scrub)
-  else
-    stale_formula?(pathname, scrub)
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #cache_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-
-
# File 'cleanup.rb', line 379
-
-def cache_files
-  files = cache.directory? ? cache.children : []
-  cask_files = (cache/"Cask").directory? ? (cache/"Cask").children : []
-  api_source_files = (cache/"api-source").glob("*/*/*/*/*") # `<org>/<repo>/<git_head>/<type>/<token>.rb`
-  gh_actions_artifacts = (cache/"gh-actions-artifact").directory? ? (cache/"gh-actions-artifact").children : []
-
-  files.map { |path| { path:, type: nil } } +
-    cask_files.map { |path| { path:, type: :cask } } +
-    api_source_files.map { |path| { path:, type: :api_source } } +
-    gh_actions_artifacts.map { |path| { path:, type: :gh_actions_artifact } }
-end
-
-
- -
-

- - #clean!(quiet: false, periodic: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-
-
# File 'cleanup.rb', line 281
-
-def clean!(quiet: false, periodic: false)
-  if args.empty?
-    Formula.installed
-           .sort_by(&:name)
-           .reject { |f| Cleanup.skip_clean_formula?(f) }
-           .each do |formula|
-      cleanup_formula(formula, quiet:, ds_store: false, cache_db: false)
-    end
-
-    if ENV["HOMEBREW_AUTOREMOVE"].present?
-      opoo "HOMEBREW_AUTOREMOVE is now a no-op as it is the default behaviour. " \
-           "Set HOMEBREW_NO_AUTOREMOVE=1 to disable it."
-    end
-    Cleanup.autoremove(dry_run: dry_run?) unless Homebrew::EnvConfig.no_autoremove?
-
-    cleanup_cache
-    cleanup_empty_api_source_directories
-    cleanup_logs
-    cleanup_lockfiles
-    cleanup_python_site_packages
-    prune_prefix_symlinks_and_directories
-
-    unless dry_run?
-      cleanup_cache_db
-      rm_ds_store
-      HOMEBREW_CACHE.mkpath
-      FileUtils.touch PERIODIC_CLEAN_FILE
-    end
-
-    # Cleaning up Ruby needs to be done last to avoid requiring additional
-    # files afterwards. Additionally, don't allow it on periodic cleans to
-    # avoid having to try to do a `brew install` when we've just deleted
-    # the running Ruby process...
-    return if periodic
-
-    cleanup_portable_ruby
-    cleanup_bootsnap
-  else
-    args.each do |arg|
-      formula = begin
-        Formulary.resolve(arg)
-      rescue FormulaUnavailableError, TapFormulaAmbiguityError
-        nil
-      end
-
-      cask = begin
-        Cask::CaskLoader.load(arg)
-      rescue Cask::CaskError
-        nil
-      end
-
-      if formula && Cleanup.skip_clean_formula?(formula)
-        onoe "Refusing to clean #{formula} because it is listed in " \
-             "#{Tty.bold}HOMEBREW_NO_CLEANUP_FORMULAE#{Tty.reset}!"
-      elsif formula
-        cleanup_formula(formula)
-      end
-      cleanup_cask(cask) if cask
-    end
-  end
-end
-
-
- -
-

- - #cleanup_bootsnapObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-529
-530
-531
-532
-533
-534
-
-
# File 'cleanup.rb', line 529
-
-def cleanup_bootsnap
-  bootsnap = cache/"bootsnap"
-  return unless bootsnap.exist?
-
-  cleanup_path(bootsnap) { bootsnap.rmtree }
-end
-
-
- -
-

- - #cleanup_cache(entries = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-
-
# File 'cleanup.rb', line 429
-
-def cleanup_cache(entries = nil)
-  entries ||= cache_files
-
-  entries.each do |entry|
-    path = entry[:path]
-    next if path == PERIODIC_CLEAN_FILE
-
-    FileUtils.chmod_R 0755, path if self.class.go_cache_directory?(path) && !dry_run?
-    next cleanup_path(path) { path.unlink } if self.class.incomplete?(path)
-    next cleanup_path(path) { FileUtils.rm_rf path } if self.class.nested_cache?(path)
-
-    if self.class.prune?(path, days)
-      if path.file? || path.symlink?
-        cleanup_path(path) { path.unlink }
-      elsif path.directory? && path.to_s.include?("--")
-        cleanup_path(path) { FileUtils.rm_rf path }
-      end
-      next
-    end
-
-    # If we've specified --prune don't do the (expensive) .stale? check.
-    cleanup_path(path) { path.unlink } if !prune? && self.class.stale?(entry, scrub: scrub?)
-  end
-
-  cleanup_unreferenced_downloads
-end
-
-
- -
-

- - #cleanup_cache_db(rack = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-
-
# File 'cleanup.rb', line 536
-
-def cleanup_cache_db(rack = nil)
-  FileUtils.rm_rf [
-    cache/"desc_cache.json",
-    cache/"linkage.db",
-    cache/"linkage.db.db",
-  ]
-
-  CacheStoreDatabase.use(:linkage) do |db|
-    break unless db.created?
-
-    db.each_key do |keg|
-      next if rack.present? && !keg.start_with?("#{rack}/")
-      next if File.directory?(keg)
-
-      LinkageCacheStore.new(keg, db).delete!
-    end
-  end
-end
-
-
- -
-

- - #cleanup_cask(cask, ds_store: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-356
-357
-358
-359
-360
-
-
# File 'cleanup.rb', line 356
-
-def cleanup_cask(cask, ds_store: true)
-  cleanup_cache(Pathname.glob(cache/"Cask/#{cask.token}--*").map { |path| { path:, type: :cask } })
-  rm_ds_store([cask.caskroom_path]) if ds_store
-  cleanup_lockfiles(CaskLock.new(cask.token).path)
-end
-
-
- -
-

- - #cleanup_empty_api_source_directories(directory = cache/"api-source") ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-
-
# File 'cleanup.rb', line 391
-
-def cleanup_empty_api_source_directories(directory = cache/"api-source")
-  return if dry_run?
-  return unless directory.directory?
-
-  directory.each_child do |child|
-    next unless child.directory?
-
-    cleanup_empty_api_source_directories(child)
-    child.rmdir if child.empty?
-  end
-end
-
-
- -
-

- - #cleanup_formula(formula, quiet: false, ds_store: true, cache_db: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-347
-348
-349
-350
-351
-352
-353
-354
-
-
# File 'cleanup.rb', line 347
-
-def cleanup_formula(formula, quiet: false, ds_store: true, cache_db: true)
-  formula.eligible_kegs_for_cleanup(quiet:)
-         .each { cleanup_keg(_1) }
-  cleanup_cache(Pathname.glob(cache/"#{formula.name}{_bottle_manifest,}--*").map { |path| { path:, type: nil } })
-  rm_ds_store([formula.rack]) if ds_store
-  cleanup_cache_db(formula.rack) if cache_db
-  cleanup_lockfiles(FormulaLock.new(formula.name).path)
-end
-
-
- -
-

- - #cleanup_keg(keg) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-362
-363
-364
-365
-366
-367
-
-
# File 'cleanup.rb', line 362
-
-def cleanup_keg(keg)
-  cleanup_path(keg) { keg.uninstall(raise_failures: true) }
-rescue Errno::EACCES, Errno::ENOTEMPTY => e
-  opoo e.message
-  unremovable_kegs << keg
-end
-
-
- -
-

- - #cleanup_lockfiles(*lockfiles) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-
-
# File 'cleanup.rb', line 470
-
-def cleanup_lockfiles(*lockfiles)
-  return if dry_run?
-
-  lockfiles = HOMEBREW_LOCKS.children.select(&:file?) if lockfiles.empty? && HOMEBREW_LOCKS.directory?
-
-  lockfiles.each do |file|
-    next unless file.readable?
-    next unless file.open(File::RDWR).flock(File::LOCK_EX | File::LOCK_NB)
-
-    begin
-      file.unlink
-    ensure
-      file.open(File::RDWR).flock(File::LOCK_UN) if file.exist?
-    end
-  end
-end
-
-
- -
-

- - #cleanup_logsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-369
-370
-371
-372
-373
-374
-375
-376
-377
-
-
# File 'cleanup.rb', line 369
-
-def cleanup_logs
-  return unless HOMEBREW_LOGS.directory?
-
-  logs_days = [days, CLEANUP_DEFAULT_DAYS].min
-
-  HOMEBREW_LOGS.subdirs.each do |dir|
-    cleanup_path(dir) { dir.rmtree } if self.class.prune?(dir, logs_days)
-  end
-end
-
-
- -
-

- - #cleanup_path(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-
-
# File 'cleanup.rb', line 456
-
-def cleanup_path(path)
-  return unless path.exist?
-  return unless @cleaned_up_paths.add?(path)
-
-  @disk_cleanup_size += path.disk_usage
-
-  if dry_run?
-    puts "Would remove: #{path} (#{path.abv})"
-  else
-    puts "Removing: #{path}... (#{path.abv})"
-    yield
-  end
-end
-
-
- -
-

- - #cleanup_portable_rubyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-515
-516
-517
-518
-519
-520
-521
-522
-523
-
-
# File 'cleanup.rb', line 487
-
-def cleanup_portable_ruby
-  vendor_dir = HOMEBREW_LIBRARY/"Homebrew/vendor"
-  portable_ruby_latest_version = (vendor_dir/"portable-ruby-version").read.chomp
-
-  portable_rubies_to_remove = []
-  Pathname.glob(vendor_dir/"portable-ruby/*.*").select(&:directory?).each do |path|
-    next if !use_system_ruby? && portable_ruby_latest_version == path.basename.to_s
-
-    portable_rubies_to_remove << path
-  end
-
-  return if portable_rubies_to_remove.empty?
-
-  bundler_paths = (vendor_dir/"bundle/ruby").children.select do |child|
-    basename = child.basename.to_s
-
-    next false if basename == ".homebrew_gem_groups"
-    next true unless child.directory?
-
-    [
-      "#{Version.new(portable_ruby_latest_version).major_minor}.0",
-      RbConfig::CONFIG["ruby_version"],
-    ].uniq.exclude?(basename)
-  end
-
-  bundler_paths.each do |bundler_path|
-    if dry_run?
-      puts Utils.popen_read("git", "-C", HOMEBREW_REPOSITORY, "clean", "-nx", bundler_path).chomp
-    else
-      puts Utils.popen_read("git", "-C", HOMEBREW_REPOSITORY, "clean", "-ffqx", bundler_path).chomp
-    end
-  end
-
-  portable_rubies_to_remove.each do |portable_ruby|
-    cleanup_path(portable_ruby) { portable_ruby.rmtree }
-  end
-end
-
-
- -
-

- - #cleanup_python_site_packagesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-569
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-592
-593
-594
-595
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-616
-
-
# File 'cleanup.rb', line 569
-
-def cleanup_python_site_packages
-  pyc_files = Hash.new { |h, k| h[k] = [] }
-  seen_non_pyc_file = Hash.new { |h, k| h[k] = false }
-  unused_pyc_files = []
-
-  HOMEBREW_PREFIX.glob("lib/python*/site-packages").each do |site_packages|
-    site_packages.each_child do |child|
-      next unless child.directory?
-      # TODO: Work out a sensible way to clean up `pip`'s, `setuptools`' and `wheel`'s
-      #       `{dist,site}-info` directories. Alternatively, consider always removing
-      #       all `-info` directories, because we may not be making use of them.
-      next if child.basename.to_s.end_with?("-info")
-
-      # Clean up old *.pyc files in the top-level __pycache__.
-      if child.basename.to_s == "__pycache__"
-        child.find do |path|
-          next if path.extname != ".pyc"
-          next unless self.class.prune?(path, days)
-
-          unused_pyc_files << path
-        end
-
-        next
-      end
-
-      # Look for directories that contain only *.pyc files.
-      child.find do |path|
-        next if path.directory?
-
-        if path.extname == ".pyc"
-          pyc_files[child] << path
-        else
-          seen_non_pyc_file[child] = true
-          break
-        end
-      end
-    end
-  end
-
-  unused_pyc_files += pyc_files.reject { |k,| seen_non_pyc_file[k] }
-                               .values
-                               .flatten
-  return if unused_pyc_files.blank?
-
-  unused_pyc_files.each do |pyc|
-    cleanup_path(pyc) { pyc.unlink }
-  end
-end
-
-
- -
-

- - #cleanup_unreferenced_downloadsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-
-
# File 'cleanup.rb', line 403
-
-def cleanup_unreferenced_downloads
-  return if dry_run?
-  return unless (cache/"downloads").directory?
-
-  downloads = (cache/"downloads").children
-
-  referenced_downloads = cache_files.map { |file| file[:path] }.select(&:symlink?).map(&:resolved_path)
-
-  (downloads - referenced_downloads).each do |download|
-    if self.class.incomplete?(download)
-      begin
-        LockFile.new(download.basename).with_lock do
-          download.unlink
-        end
-      rescue OperationInProgressError
-        # Skip incomplete downloads which are still in progress.
-        next
-      end
-    elsif download.directory?
-      FileUtils.rm_rf download
-    else
-      download.unlink
-    end
-  end
-end
-
-
- -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-377
-
-
# File 'sorbet/rbi/parlour.rbi', line 377
-
-def dry_run?; end
-
-
- -
-

- - #prune?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-383
-
-
# File 'sorbet/rbi/parlour.rbi', line 383
-
-def prune?; end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-638
-639
-640
-641
-642
-643
-644
-645
-646
-647
-648
-649
-650
-651
-652
-653
-654
-655
-656
-657
-658
-659
-660
-661
-662
-663
-664
-665
-666
-667
-668
-669
-670
-671
-672
-673
-674
-675
-676
-677
-678
-
-
# File 'cleanup.rb', line 618
-
-def prune_prefix_symlinks_and_directories
-  ObserverPathnameExtension.reset_counts!
-
-  dirs = []
-  children_count = {}
-
-  Keg::MUST_EXIST_SUBDIRECTORIES.each do |dir|
-    next unless dir.directory?
-
-    dir.find do |path|
-      path.extend(ObserverPathnameExtension)
-      if path.symlink?
-        unless path.resolved_path_exists?
-          path.uninstall_info if path.to_s.match?(Keg::INFOFILE_RX) && !dry_run?
-
-          if dry_run?
-            puts "Would remove (broken link): #{path}"
-            children_count[path.dirname] -= 1 if children_count.key?(path.dirname)
-          else
-            path.unlink
-          end
-        end
-      elsif path.directory? && Keg::MUST_EXIST_SUBDIRECTORIES.exclude?(path)
-        dirs << path
-        children_count[path] = path.children.length if dry_run?
-      end
-    end
-  end
-
-  dirs.reverse_each do |d|
-    if !dry_run?
-      d.rmdir_if_possible
-    elsif children_count[d].zero?
-      puts "Would remove (empty directory): #{d}"
-      children_count[d.dirname] -= 1 if children_count.key?(d.dirname)
-    end
-  end
-
-  require "cask/caskroom"
-  if Cask::Caskroom.path.directory?
-    Cask::Caskroom.path.each_child do |path|
-      path.extend(ObserverPathnameExtension)
-      next if !path.symlink? || path.resolved_path_exists?
-
-      if dry_run?
-        puts "Would remove (broken link): #{path}"
-      else
-        path.unlink
-      end
-    end
-  end
-
-  return if dry_run?
-
-  return if ObserverPathnameExtension.total.zero?
-
-  n, d = ObserverPathnameExtension.counts
-  print "Pruned #{n} symbolic links "
-  print "and #{d} directories " if d.positive?
-  puts "from #{HOMEBREW_PREFIX}"
-end
-
-
- -
-

- - #rm_ds_store(dirs = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-555
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-567
-
-
# File 'cleanup.rb', line 555
-
-def rm_ds_store(dirs = nil)
-  dirs ||= Keg::MUST_EXIST_DIRECTORIES + [
-    HOMEBREW_PREFIX/"Caskroom",
-  ]
-  dirs.select(&:directory?)
-      .flat_map { |d| Pathname.glob("#{d}/**/.DS_Store") }
-      .each do |dir|
-        dir.unlink
-      rescue Errno::EACCES
-        # don't care if we can't delete a .DS_Store
-        nil
-      end
-end
-
-
- -
-

- - #scrub?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-380
-
-
# File 'sorbet/rbi/parlour.rbi', line 380
-
-def scrub?; end
-
-
- -
-

- - #unremovable_kegsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-343
-344
-345
-
-
# File 'cleanup.rb', line 343
-
-def unremovable_kegs
-  @unremovable_kegs ||= []
-end
-
-
- -
-

- - #use_system_ruby?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-
-
# File 'extend/os/mac/cleanup.rb', line 8
-
-def use_system_ruby?
-  return false if Homebrew::EnvConfig.force_vendor_ruby?
-
-  Homebrew::EnvConfig.developer? && ENV["HOMEBREW_USE_RUBY_FROM_PATH"].present?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd.html b/docs/Homebrew/Cmd.html deleted file mode 100644 index 591d395b9..000000000 --- a/docs/Homebrew/Cmd.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: Homebrew::Cmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Cmd - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
cmd/log.rb,
- cmd/pin.rb,
cmd/tap.rb,
cmd/deps.rb,
cmd/desc.rb,
cmd/docs.rb,
cmd/help.rb,
cmd/home.rb,
cmd/info.rb,
cmd/link.rb,
cmd/list.rb,
cmd/uses.rb,
cmd/--env.rb,
cmd/fetch.rb,
cmd/unpin.rb,
cmd/untap.rb,
cmd/config.rb,
cmd/doctor.rb,
cmd/leaves.rb,
cmd/search.rb,
cmd/unlink.rb,
cmd/--cache.rb,
cmd/cleanup.rb,
cmd/command.rb,
cmd/install.rb,
cmd/migrate.rb,
cmd/missing.rb,
cmd/options.rb,
cmd/readall.rb,
cmd/upgrade.rb,
cmd/--cellar.rb,
cmd/--prefix.rb,
cmd/commands.rb,
cmd/outdated.rb,
cmd/tap-info.rb,
cmd/analytics.rb,
cmd/developer.rb,
cmd/gist-logs.rb,
cmd/reinstall.rb,
cmd/uninstall.rb,
cmd/--caskroom.rb,
cmd/autoremove.rb,
cmd/pyenv-sync.rb,
cmd/rbenv-sync.rb,
cmd/completions.rb,
cmd/nodenv-sync.rb,
cmd/postinstall.rb,
cmd/--repository.rb,
cmd/update-report.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Analytics, Autoremove, Cache, Caskroom, Cellar, CleanupCmd, Command, CommandsCmd, CompletionsCmd, Config, Deps, Desc, Developer, Docs, Doctor, Env, FetchCmd, GistLogs, HelpCmd, Home, Info, InstallCmd, Leaves, Link, List, Log, Migrate, Missing, NodenvSync, OptionsCmd, Outdated, Pin, Postinstall, Prefix, PrettyListing, PyenvSync, RbenvSync, ReadallCmd, Reinstall, Repository, SearchCmd, TapCmd, TapInfo, UninstallCmd, UnlinkCmd, Unpin, Untap, UpdateReport, UpgradeCmd, Uses - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Analytics.html b/docs/Homebrew/Cmd/Analytics.html deleted file mode 100644 index a1d3cef80..000000000 --- a/docs/Homebrew/Cmd/Analytics.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Analytics - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Analytics - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/analytics.rb,
- sorbet/rbi/dsl/homebrew/cmd/analytics.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Analytics::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/analytics.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'cmd/analytics.rb', line 25
-
-def run
-  case args.named.first
-  when nil, "state"
-    if Utils::Analytics.disabled?
-      puts "InfluxDB analytics are disabled."
-    else
-      puts "InfluxDB analytics are enabled."
-    end
-    puts "Google Analytics were destroyed."
-  when "on"
-    Utils::Analytics.enable!
-  when "off"
-    Utils::Analytics.disable!
-  when "regenerate-uuid"
-    Utils::Analytics.delete_uuid!
-    opoo "Homebrew no longer uses an analytics UUID so this has been deleted!"
-    puts "brew analytics regenerate-uuid is no longer necessary."
-  else
-    raise UsageError, "unknown subcommand: #{args.named.first}"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Analytics/Args.html b/docs/Homebrew/Cmd/Analytics/Args.html deleted file mode 100644 index 4436c9a03..000000000 --- a/docs/Homebrew/Cmd/Analytics/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Analytics::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Analytics::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/analytics.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Autoremove.html b/docs/Homebrew/Cmd/Autoremove.html deleted file mode 100644 index b0ac98d7e..000000000 --- a/docs/Homebrew/Cmd/Autoremove.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Autoremove - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Autoremove - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/autoremove.rb,
- sorbet/rbi/dsl/homebrew/cmd/autoremove.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Autoremove::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/autoremove.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'cmd/autoremove.rb', line 21
-
-def run
-  Cleanup.autoremove(dry_run: args.dry_run?)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Autoremove/Args.html b/docs/Homebrew/Cmd/Autoremove/Args.html deleted file mode 100644 index 2466679c8..000000000 --- a/docs/Homebrew/Cmd/Autoremove/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Autoremove::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Autoremove::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/autoremove.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/autoremove.rbi', line 15
-
-def dry_run?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/autoremove.rbi', line 18
-
-def n?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Cache.html b/docs/Homebrew/Cmd/Cache.html deleted file mode 100644 index c5f995afd..000000000 --- a/docs/Homebrew/Cmd/Cache.html +++ /dev/null @@ -1,496 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Cache - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Cache - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
Fetch
-
- - - - - - -
-
Defined in:
-
cmd/--cache.rb,
- sorbet/rbi/dsl/homebrew/cmd/cache.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Fetch

-

#fetch_bottle?

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Class Method Details

- - -
-

- - .command_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-
-
# File 'cmd/--cache.rb', line 14
-
-def self.command_name = "--cache"
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Cache::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-
-
# File 'cmd/--cache.rb', line 50
-
-def run
-  if args.no_named?
-    puts HOMEBREW_CACHE
-    return
-  end
-
-  formulae_or_casks = args.named.to_formulae_and_casks
-  os_arch_combinations = args.os_arch_combinations
-
-  formulae_or_casks.each do |formula_or_cask|
-    case formula_or_cask
-    when Formula
-      formula = formula_or_cask
-      ref = formula.loaded_from_api? ? formula.full_name : formula.path
-
-      os_arch_combinations.each do |os, arch|
-        SimulateSystem.with(os:, arch:) do
-          formula = Formulary.factory(ref)
-          print_formula_cache(formula, os:, arch:)
-        end
-      end
-    when Cask::Cask
-      cask = formula_or_cask
-      ref = cask.loaded_from_api? ? cask.full_name : cask.sourcefile_path
-
-      os_arch_combinations.each do |os, arch|
-        next if os == :linux
-
-        SimulateSystem.with(os:, arch:) do
-          loaded_cask = Cask::CaskLoader.load(ref)
-          print_cask_cache(loaded_cask)
-        end
-      end
-    else
-      raise "Invalid type: #{formula_or_cask.class}"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Cache/Args.html b/docs/Homebrew/Cmd/Cache/Args.html deleted file mode 100644 index 7446d402a..000000000 --- a/docs/Homebrew/Cmd/Cache/Args.html +++ /dev/null @@ -1,1001 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Cache::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Cache::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/cache.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #archString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 18
-
-def arch; end
-
-
- -
-

- - #bottle_tagString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 21
-
-def bottle_tag; end
-
-
- -
-

- - #build_from_source?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 24
-
-def build_from_source?; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 27
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 30
-
-def casks?; end
-
-
- -
-

- - #force_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 33
-
-def force_bottle?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 36
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 39
-
-def formulae?; end
-
-
- -
-

- - #HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 15
-
-def HEAD?; end
-
-
- -
-

- - #osString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 42
-
-def os; end
-
-
- -
-

- - #s?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cache.rbi', line 45
-
-def s?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Caskroom.html b/docs/Homebrew/Cmd/Caskroom.html deleted file mode 100644 index e773a7565..000000000 --- a/docs/Homebrew/Cmd/Caskroom.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Caskroom - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Caskroom - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/--caskroom.rb,
- sorbet/rbi/dsl/homebrew/cmd/caskroom.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Class Method Details

- - -
-

- - .command_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'cmd/--caskroom.rb', line 10
-
-def self.command_name = "--caskroom"
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Caskroom::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/caskroom.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'cmd/--caskroom.rb', line 24
-
-def run
-  if args.named.to_casks.blank?
-    puts Cask::Caskroom.path
-  else
-    args.named.to_casks.each do |cask|
-      puts "#{Cask::Caskroom.path}/#{cask.token}"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Caskroom/Args.html b/docs/Homebrew/Cmd/Caskroom/Args.html deleted file mode 100644 index df1702b55..000000000 --- a/docs/Homebrew/Cmd/Caskroom/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Caskroom::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Caskroom::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/caskroom.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Cellar.html b/docs/Homebrew/Cmd/Cellar.html deleted file mode 100644 index 78de047af..000000000 --- a/docs/Homebrew/Cmd/Cellar.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Cellar - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Cellar - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/--cellar.rb,
- sorbet/rbi/dsl/homebrew/cmd/cellar.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Class Method Details

- - -
-

- - .command_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'cmd/--cellar.rb', line 10
-
-def self.command_name = "--cellar"
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Cellar::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cellar.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'cmd/--cellar.rb', line 25
-
-def run
-  if args.no_named?
-    puts HOMEBREW_CELLAR
-  else
-    puts args.named.to_resolved_formulae.map(&:rack)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Cellar/Args.html b/docs/Homebrew/Cmd/Cellar/Args.html deleted file mode 100644 index b8e8cdb83..000000000 --- a/docs/Homebrew/Cmd/Cellar/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Cellar::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Cellar::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/cellar.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/CleanupCmd.html b/docs/Homebrew/Cmd/CleanupCmd.html deleted file mode 100644 index 04a2b6ca7..000000000 --- a/docs/Homebrew/Cmd/CleanupCmd.html +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::CleanupCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::CleanupCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/cleanup.rb,
- sorbet/rbi/dsl/homebrew/cmd/cleanup_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::CleanupCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cleanup_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'cmd/cleanup.rb', line 34
-
-def run
-  days = args.prune.presence&.then do |prune|
-    case prune
-    when /\A\d+\Z/
-      prune.to_i
-    when "all"
-      0
-    else
-      raise UsageError, "`--prune` expects an integer or `all`."
-    end
-  end
-
-  cleanup = Cleanup.new(*args.named, dry_run: args.dry_run?, scrub: args.s?, days:)
-  if args.prune_prefix?
-    cleanup.prune_prefix_symlinks_and_directories
-    return
-  end
-
-  cleanup.clean!(quiet: args.quiet?, periodic: false)
-
-  unless cleanup.disk_cleanup_size.zero?
-    disk_space = disk_usage_readable(cleanup.disk_cleanup_size)
-    if args.dry_run?
-      ohai "This operation would free approximately #{disk_space} of disk space."
-    else
-      ohai "This operation has freed approximately #{disk_space} of disk space."
-    end
-  end
-
-  return if cleanup.unremovable_kegs.empty?
-
-  ofail <<~EOS
-    Could not cleanup old kegs! Fix your permissions on:
-      #{cleanup.unremovable_kegs.join "\n  "}
-  EOS
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/CleanupCmd/Args.html b/docs/Homebrew/Cmd/CleanupCmd/Args.html deleted file mode 100644 index 425f9e298..000000000 --- a/docs/Homebrew/Cmd/CleanupCmd/Args.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::CleanupCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::CleanupCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/cleanup_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cleanup_cmd.rbi', line 15
-
-def dry_run?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cleanup_cmd.rbi', line 18
-
-def n?; end
-
-
- -
-

- - #pruneString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cleanup_cmd.rbi', line 21
-
-def prune; end
-
-
- -
-

- - #prune_prefix?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cleanup_cmd.rbi', line 24
-
-def prune_prefix?; end
-
-
- -
-

- - #s?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cleanup_cmd.rbi', line 27
-
-def s?; end
-
-
- -
-

- - #scrub?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/cleanup_cmd.rbi', line 30
-
-def scrub?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Command.html b/docs/Homebrew/Cmd/Command.html deleted file mode 100644 index 078da20c8..000000000 --- a/docs/Homebrew/Cmd/Command.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Command - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Command - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/command.rb,
- sorbet/rbi/dsl/homebrew/cmd/command.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Command::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/command.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-
-
# File 'cmd/command.rb', line 19
-
-def run
-  args.named.each do |cmd|
-    path = Commands.path(cmd)
-    odie "Unknown command: #{cmd}" unless path
-    puts path
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Command/Args.html b/docs/Homebrew/Cmd/Command/Args.html deleted file mode 100644 index ebbae1678..000000000 --- a/docs/Homebrew/Cmd/Command/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Command::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Command::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/command.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/CommandsCmd.html b/docs/Homebrew/Cmd/CommandsCmd.html deleted file mode 100644 index 18995bc3b..000000000 --- a/docs/Homebrew/Cmd/CommandsCmd.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::CommandsCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::CommandsCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/commands.rb,
- sorbet/rbi/dsl/homebrew/cmd/commands_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::CommandsCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/commands_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-
-
# File 'cmd/commands.rb', line 23
-
-def run
-  if args.quiet?
-    puts Formatter.columns(Commands.commands(aliases: args.include_aliases?))
-    return
-  end
-
-  prepend_separator = T.let(false, T::Boolean)
-
-  {
-    "Built-in commands"           => Commands.internal_commands,
-    "Built-in developer commands" => Commands.internal_developer_commands,
-    "External commands"           => Commands.external_commands,
-  }.each do |title, commands|
-    next if commands.blank?
-
-    puts if prepend_separator
-    ohai title, Formatter.columns(commands)
-
-    prepend_separator ||= true
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/CommandsCmd/Args.html b/docs/Homebrew/Cmd/CommandsCmd/Args.html deleted file mode 100644 index fd7814b2d..000000000 --- a/docs/Homebrew/Cmd/CommandsCmd/Args.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::CommandsCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::CommandsCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/commands_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #include_aliases?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/commands_cmd.rbi', line 15
-
-def include_aliases?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/CompletionsCmd.html b/docs/Homebrew/Cmd/CompletionsCmd.html deleted file mode 100644 index edf62a179..000000000 --- a/docs/Homebrew/Cmd/CompletionsCmd.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::CompletionsCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::CompletionsCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/completions.rb,
- sorbet/rbi/dsl/homebrew/cmd/completions_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::CompletionsCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/completions_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-
-
# File 'cmd/completions.rb', line 26
-
-def run
-  case args.named.first
-  when nil, "state"
-    if Completions.link_completions?
-      puts "Completions are linked."
-    else
-      puts "Completions are not linked."
-    end
-  when "link"
-    Completions.link!
-    puts "Completions are now linked."
-  when "unlink"
-    Completions.unlink!
-    puts "Completions are no longer linked."
-  else
-    raise UsageError, "unknown subcommand: #{args.named.first}"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/CompletionsCmd/Args.html b/docs/Homebrew/Cmd/CompletionsCmd/Args.html deleted file mode 100644 index 7094d4756..000000000 --- a/docs/Homebrew/Cmd/CompletionsCmd/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::CompletionsCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::CompletionsCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/completions_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Config.html b/docs/Homebrew/Cmd/Config.html deleted file mode 100644 index 3972e3a74..000000000 --- a/docs/Homebrew/Cmd/Config.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Config - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Config - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/config.rb,
- sorbet/rbi/dsl/homebrew/cmd/config.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Config::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/config.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'cmd/config.rb', line 20
-
-def run
-  SystemConfig.dump_verbose_config
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Config/Args.html b/docs/Homebrew/Cmd/Config/Args.html deleted file mode 100644 index 2063b12cd..000000000 --- a/docs/Homebrew/Cmd/Config/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Config::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Config::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/config.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Deps.html b/docs/Homebrew/Cmd/Deps.html deleted file mode 100644 index b5f4744df..000000000 --- a/docs/Homebrew/Cmd/Deps.html +++ /dev/null @@ -1,533 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Deps - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Deps - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
DependenciesHelpers
-
- - - - - - -
-
Defined in:
-
cmd/deps.rb,
- sorbet/rbi/dsl/homebrew/cmd/deps.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from DependenciesHelpers

-

#args_includes_ignores, dependents, #recursive_includes, #select_includes

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Deps::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-
-
# File 'cmd/deps.rb', line 88
-
-def run
-  raise UsageError, "`brew deps --os=all` is not supported" if args.os == "all"
-  raise UsageError, "`brew deps --arch=all` is not supported" if args.arch == "all"
-
-  os, arch = T.must(args.os_arch_combinations.first)
-  all = args.eval_all?
-
-  Formulary.enable_factory_cache!
-
-  SimulateSystem.with(os:, arch:) do
-    recursive = !args.direct?
-    installed = args.installed? || dependents(args.named.to_formulae_and_casks).all?(&:any_version_installed?)
-
-    @use_runtime_dependencies = installed && recursive &&
-                                !args.tree? &&
-                                !args.graph? &&
-                                !args.HEAD? &&
-                                !args.include_build? &&
-                                !args.include_test? &&
-                                !args.include_optional? &&
-                                !args.skip_recommended? &&
-                                !args.missing? &&
-                                args.os.nil? &&
-                                args.arch.nil?
-
-    if args.tree? || args.graph?
-      dependents = if args.named.present?
-        sorted_dependents(args.named.to_formulae_and_casks)
-      elsif args.installed?
-        case args.only_formula_or_cask
-        when :formula
-          sorted_dependents(Formula.installed)
-        when :cask
-          sorted_dependents(Cask::Caskroom.casks)
-        else
-          sorted_dependents(Formula.installed + Cask::Caskroom.casks)
-        end
-      else
-        raise FormulaUnspecifiedError
-      end
-
-      if args.graph?
-        dot_code = dot_code(dependents, recursive:)
-        if args.dot?
-          puts dot_code
-        else
-          exec_browser "https://dreampuf.github.io/GraphvizOnline/##{ERB::Util.url_encode(dot_code)}"
-        end
-        return
-      end
-
-      puts_deps_tree(dependents, recursive:)
-      return
-    elsif all
-      puts_deps(sorted_dependents(
-                  Formula.all(eval_all: args.eval_all?) + Cask::Cask.all(eval_all: args.eval_all?),
-                ), recursive:)
-      return
-    elsif !args.no_named? && args.for_each?
-      puts_deps(sorted_dependents(args.named.to_formulae_and_casks), recursive:)
-      return
-    end
-
-    if args.no_named?
-      raise FormulaUnspecifiedError unless args.installed?
-
-      sorted_dependents_formulae_and_casks = case args.only_formula_or_cask
-      when :formula
-        sorted_dependents(Formula.installed)
-      when :cask
-        sorted_dependents(Cask::Caskroom.casks)
-      else
-        sorted_dependents(Formula.installed + Cask::Caskroom.casks)
-      end
-      puts_deps(sorted_dependents_formulae_and_casks, recursive:)
-      return
-    end
-
-    dependents = dependents(args.named.to_formulae_and_casks)
-    check_head_spec(dependents) if args.HEAD?
-
-    all_deps = deps_for_dependents(dependents, recursive:, &(args.union? ? :| : :&))
-    condense_requirements(all_deps)
-    all_deps.map! { |d| dep_display_name(d) }
-    all_deps.uniq!
-    all_deps.sort! unless args.topological?
-    puts all_deps
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Deps/Args.html b/docs/Homebrew/Cmd/Deps/Args.html deleted file mode 100644 index e56b0cca1..000000000 --- a/docs/Homebrew/Cmd/Deps/Args.html +++ /dev/null @@ -1,2111 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Deps::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Deps::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/deps.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #annotate?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 18
-
-def annotate?; end
-
-
- -
-

- - #archString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 21
-
-def arch; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 24
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 27
-
-def casks?; end
-
-
- -
-

- - #declared?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 30
-
-def declared?; end
-
-
- -
-

- - #direct?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 33
-
-def direct?; end
-
-
- -
-

- - #dot?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 36
-
-def dot?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 39
-
-def eval_all?; end
-
-
- -
-

- - #for_each?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 42
-
-def for_each?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 45
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 48
-
-def formulae?; end
-
-
- -
-

- - #full_name?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 51
-
-def full_name?; end
-
-
- -
-

- - #graph?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 54
-
-def graph?; end
-
-
- -
-

- - #HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 15
-
-def HEAD?; end
-
-
- -
-

- - #include_build?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 57
-
-def include_build?; end
-
-
- -
-

- - #include_optional?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 60
-
-def include_optional?; end
-
-
- -
-

- - #include_requirements?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 63
-
-def include_requirements?; end
-
-
- -
-

- - #include_test?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 66
-
-def include_test?; end
-
-
- -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 69
-
-def installed?; end
-
-
- -
-

- - #missing?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 72
-
-def missing?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 75
-
-def n?; end
-
-
- -
-

- - #osString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 78
-
-def os; end
-
-
- -
-

- - #skip_recommended?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 81
-
-def skip_recommended?; end
-
-
- -
-

- - #topological?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 84
-
-def topological?; end
-
-
- -
-

- - #tree?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-87
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 87
-
-def tree?; end
-
-
- -
-

- - #union?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/deps.rbi', line 90
-
-def union?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Desc.html b/docs/Homebrew/Cmd/Desc.html deleted file mode 100644 index 5df582425..000000000 --- a/docs/Homebrew/Cmd/Desc.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Desc - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Desc - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/desc.rb,
- sorbet/rbi/dsl/homebrew/cmd/desc.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Desc::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'cmd/desc.rb', line 40
-
-def run
-  search_type = if args.search?
-    :either
-  elsif args.name?
-    :name
-  elsif args.description?
-    :desc
-  end
-
-  if search_type.present?
-    if !args.eval_all? && !Homebrew::EnvConfig.eval_all?
-      raise UsageError, "`brew desc --search` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!"
-    end
-
-    query = args.named.join(" ")
-    string_or_regex = Search.query_regexp(query)
-    return Search.search_descriptions(string_or_regex, args, search_type:)
-  end
-
-  desc = {}
-  args.named.to_formulae_and_casks.each do |formula_or_cask|
-    case formula_or_cask
-    when Formula
-      desc[formula_or_cask.full_name] = formula_or_cask.desc
-    when Cask::Cask
-      description = formula_or_cask.desc.presence || Formatter.warning("[no description]")
-      desc[formula_or_cask.full_name] = "(#{formula_or_cask.name.join(", ")}) #{description}"
-    else
-      raise TypeError, "Unsupported formula_or_cask type: #{formula_or_cask.class}"
-    end
-  end
-  Descriptions.new(desc).print
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Desc/Args.html b/docs/Homebrew/Cmd/Desc/Args.html deleted file mode 100644 index 24ea6dfd4..000000000 --- a/docs/Homebrew/Cmd/Desc/Args.html +++ /dev/null @@ -1,927 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Desc::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Desc::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/desc.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #description?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 21
-
-def description?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 24
-
-def eval_all?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 27
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 30
-
-def formulae?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 33
-
-def n?; end
-
-
- -
-

- - #name?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 36
-
-def name?; end
-
-
- -
-

- - #s?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 39
-
-def s?; end
-
-
- -
-

- - #search?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/desc.rbi', line 42
-
-def search?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Developer.html b/docs/Homebrew/Cmd/Developer.html deleted file mode 100644 index 2d0af9cd0..000000000 --- a/docs/Homebrew/Cmd/Developer.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Developer - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Developer - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/developer.rb,
- sorbet/rbi/dsl/homebrew/cmd/developer.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Developer::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/developer.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-
-
# File 'cmd/developer.rb', line 26
-
-def run
-  env_vars = []
-  env_vars << "HOMEBREW_DEVELOPER" if Homebrew::EnvConfig.developer?
-  env_vars << "HOMEBREW_UPDATE_TO_TAG" if Homebrew::EnvConfig.update_to_tag?
-  env_vars.map! do |var|
-    "#{Tty.bold}#{var}#{Tty.reset}"
-  end
-
-  case args.named.first
-  when nil, "state"
-    if env_vars.any?
-      verb = (env_vars.count == 1) ? "is" : "are"
-      puts "Developer mode is enabled because #{env_vars.to_sentence} #{verb} set."
-    elsif Homebrew::Settings.read("devcmdrun") == "true"
-      puts "Developer mode is enabled."
-    else
-      puts "Developer mode is disabled."
-    end
-  when "on"
-    Homebrew::Settings.write "devcmdrun", true
-  when "off"
-    Homebrew::Settings.delete "devcmdrun"
-    puts "To fully disable developer mode, you must unset #{env_vars.to_sentence}." if env_vars.any?
-  else
-    raise UsageError, "unknown subcommand: #{args.named.first}"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Developer/Args.html b/docs/Homebrew/Cmd/Developer/Args.html deleted file mode 100644 index 21922feb8..000000000 --- a/docs/Homebrew/Cmd/Developer/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Developer::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Developer::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/developer.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Docs.html b/docs/Homebrew/Cmd/Docs.html deleted file mode 100644 index 354f4c275..000000000 --- a/docs/Homebrew/Cmd/Docs.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Docs - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Docs - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/docs.rb,
- sorbet/rbi/dsl/homebrew/cmd/docs.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Docs::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/docs.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'cmd/docs.rb', line 16
-
-def run
-  exec_browser HOMEBREW_DOCS_WWW
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Docs/Args.html b/docs/Homebrew/Cmd/Docs/Args.html deleted file mode 100644 index 9f3ac765e..000000000 --- a/docs/Homebrew/Cmd/Docs/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Docs::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Docs::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/docs.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Doctor.html b/docs/Homebrew/Cmd/Doctor.html deleted file mode 100644 index 8d611d83f..000000000 --- a/docs/Homebrew/Cmd/Doctor.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Doctor - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Doctor - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/doctor.rb,
- sorbet/rbi/dsl/homebrew/cmd/doctor.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Doctor::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/doctor.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-
-
# File 'cmd/doctor.rb', line 30
-
-def run
-  Homebrew.inject_dump_stats!(Diagnostic::Checks, /^check_*/) if args.audit_debug?
-
-  checks = Diagnostic::Checks.new(verbose: args.verbose?)
-
-  if args.list_checks?
-    puts checks.all
-    return
-  end
-
-  if args.no_named?
-    slow_checks = %w[
-      check_for_broken_symlinks
-      check_missing_deps
-    ]
-    methods = (checks.all - slow_checks) + slow_checks
-    methods -= checks.cask_checks unless Cask::Caskroom.any_casks_installed?
-  else
-    methods = args.named
-  end
-
-  first_warning = T.let(true, T::Boolean)
-  methods.each do |method|
-    $stderr.puts Formatter.headline("Checking #{method}", color: :magenta) if args.debug?
-    unless checks.respond_to?(method)
-      ofail "No check available by the name: #{method}"
-      next
-    end
-
-    out = checks.send(method)
-    next if out.blank?
-
-    if first_warning
-      $stderr.puts <<~EOS
-        #{Tty.bold}Please note that these warnings are just used to help the Homebrew maintainers
-        with debugging if you file an issue. If everything you use Homebrew for is
-        working fine: please don't worry or file an issue; just ignore this. Thanks!#{Tty.reset}
-      EOS
-    end
-
-    $stderr.puts
-    opoo out
-    Homebrew.failed = true
-    first_warning = false
-  end
-
-  puts "Your system is ready to brew." if !Homebrew.failed? && !args.quiet?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Doctor/Args.html b/docs/Homebrew/Cmd/Doctor/Args.html deleted file mode 100644 index 6b8156f45..000000000 --- a/docs/Homebrew/Cmd/Doctor/Args.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Doctor::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Doctor::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/doctor.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #audit_debug?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/doctor.rbi', line 18
-
-def audit_debug?; end
-
-
- -
-

- - #D?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/doctor.rbi', line 15
-
-def D?; end
-
-
- -
-

- - #list_checks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/doctor.rbi', line 21
-
-def list_checks?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Env.html b/docs/Homebrew/Cmd/Env.html deleted file mode 100644 index ff688d21b..000000000 --- a/docs/Homebrew/Cmd/Env.html +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Env - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Env - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/--env.rb,
- sorbet/rbi/dsl/homebrew/cmd/env.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Class Method Details

- - -
-

- - .command_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-
-
# File 'cmd/--env.rb', line 13
-
-def self.command_name = "--env"
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Env::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/env.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-
-
# File 'cmd/--env.rb', line 32
-
-def run
-  ENV.activate_extensions!
-  ENV.deps = args.named.to_formulae if superenv?(nil)
-  ENV.setup_build_environment
-
-  shell = if args.plain?
-    nil
-  elsif args.shell.nil?
-    :bash unless $stdout.tty?
-  elsif args.shell == "auto"
-    Utils::Shell.parent || Utils::Shell.preferred
-  elsif args.shell
-    Utils::Shell.from_path(T.must(args.shell))
-  end
-
-  if shell.nil?
-    BuildEnvironment.dump ENV.to_h
-  else
-    BuildEnvironment.keys(ENV.to_h).each do |key|
-      puts Utils::Shell.export_value(key, ENV.fetch(key), shell)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Env/Args.html b/docs/Homebrew/Cmd/Env/Args.html deleted file mode 100644 index 003de9a22..000000000 --- a/docs/Homebrew/Cmd/Env/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Env::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Env::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/env.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #plain?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/env.rbi', line 15
-
-def plain?; end
-
-
- -
-

- - #shellString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/env.rbi', line 18
-
-def shell; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/FetchCmd.html b/docs/Homebrew/Cmd/FetchCmd.html deleted file mode 100644 index 93a9d3915..000000000 --- a/docs/Homebrew/Cmd/FetchCmd.html +++ /dev/null @@ -1,589 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::FetchCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::FetchCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
Fetch
-
- - - - - - -
-
Defined in:
-
cmd/fetch.rb,
- sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
FETCH_MAX_TRIES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
5
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Fetch

-

#fetch_bottle?

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::FetchCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-
-
# File 'cmd/fetch.rb', line 71
-
-def run
-  Formulary.enable_factory_cache!
-
-  bucket = if args.deps?
-    args.named.to_formulae_and_casks.flat_map do |formula_or_cask|
-      case formula_or_cask
-      when Formula
-        formula = formula_or_cask
-        [formula, *formula.recursive_dependencies.map(&:to_formula)]
-      else
-        formula_or_cask
-      end
-    end
-  else
-    args.named.to_formulae_and_casks
-  end.uniq
-
-  os_arch_combinations = args.os_arch_combinations
-
-  puts "Fetching: #{bucket * ", "}" if bucket.size > 1
-  bucket.each do |formula_or_cask|
-    case formula_or_cask
-    when Formula
-      formula = T.cast(formula_or_cask, Formula)
-      ref = formula.loaded_from_api? ? formula.full_name : formula.path
-
-      os_arch_combinations.each do |os, arch|
-        SimulateSystem.with(os:, arch:) do
-          formula = Formulary.factory(ref, args.HEAD? ? :head : :stable)
-
-          formula.print_tap_action verb: "Fetching"
-
-          fetched_bottle = false
-          if fetch_bottle?(
-            formula,
-            force_bottle:               args.force_bottle?,
-            bottle_tag:                 args.bottle_tag&.to_sym,
-            build_from_source_formulae: args.build_from_source_formulae,
-            os:                         args.os&.to_sym,
-            arch:                       args.arch&.to_sym,
-          )
-            begin
-              formula.clear_cache if args.force?
-
-              bottle_tag = if (bottle_tag = args.bottle_tag&.to_sym)
-                Utils::Bottles::Tag.from_symbol(bottle_tag)
-              else
-                Utils::Bottles::Tag.new(system: os, arch:)
-              end
-
-              bottle = formula.bottle_for_tag(bottle_tag)
-
-              if bottle.nil?
-                opoo "Bottle for tag #{bottle_tag.to_sym.inspect} is unavailable."
-                next
-              end
-
-              begin
-                bottle.fetch_tab
-              rescue DownloadError
-                retry if retry_fetch?(bottle)
-                raise
-              end
-              fetch_formula(bottle)
-            rescue Interrupt
-              raise
-            rescue => e
-              raise if Homebrew::EnvConfig.developer?
-
-              fetched_bottle = false
-              onoe e.message
-              opoo "Bottle fetch failed, fetching the source instead."
-            else
-              fetched_bottle = true
-            end
-          end
-
-          next if fetched_bottle
-
-          fetch_formula(formula)
-
-          formula.resources.each do |r|
-            fetch_resource(r)
-            r.patches.each { |p| fetch_patch(p) if p.external? }
-          end
-
-          formula.patchlist.each { |p| fetch_patch(p) if p.external? }
-        end
-      end
-    else
-      cask = formula_or_cask
-      ref = cask.loaded_from_api? ? cask.full_name : cask.sourcefile_path
-
-      os_arch_combinations.each do |os, arch|
-        next if os == :linux
-
-        SimulateSystem.with(os:, arch:) do
-          cask = Cask::CaskLoader.load(ref)
-
-          if cask.url.nil? || cask.sha256.nil?
-            opoo "Cask #{cask} is not supported on os #{os} and arch #{arch}"
-            next
-          end
-
-          quarantine = args.quarantine?
-          quarantine = true if quarantine.nil?
-
-          download = Cask::Download.new(cask, quarantine:)
-          fetch_cask(download)
-        end
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/FetchCmd/Args.html b/docs/Homebrew/Cmd/FetchCmd/Args.html deleted file mode 100644 index 353888f37..000000000 --- a/docs/Homebrew/Cmd/FetchCmd/Args.html +++ /dev/null @@ -1,1445 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::FetchCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::FetchCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #archString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 18
-
-def arch; end
-
-
- -
-

- - #bottle_tagString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 21
-
-def bottle_tag; end
-
-
- -
-

- - #build_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 24
-
-def build_bottle?; end
-
-
- -
-

- - #build_from_source?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 27
-
-def build_from_source?; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 30
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 33
-
-def casks?; end
-
-
- -
-

- - #deps?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 36
-
-def deps?; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 39
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 42
-
-def force?; end
-
-
- -
-

- - #force_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 45
-
-def force_bottle?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 48
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 51
-
-def formulae?; end
-
-
- -
-

- - #HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 15
-
-def HEAD?; end
-
-
- -
-

- - #osString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 54
-
-def os; end
-
-
- -
-

- - #quarantine?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 57
-
-def quarantine?; end
-
-
- -
-

- - #retry?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 60
-
-def retry?; end
-
-
- -
-

- - #s?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/fetch_cmd.rbi', line 63
-
-def s?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/GistLogs.html b/docs/Homebrew/Cmd/GistLogs.html deleted file mode 100644 index 1771f476d..000000000 --- a/docs/Homebrew/Cmd/GistLogs.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::GistLogs - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::GistLogs - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
Install
-
- - - - - - -
-
Defined in:
-
cmd/gist-logs.rb,
- sorbet/rbi/dsl/homebrew/cmd/gist_logs.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Install

-

check_prefix, global_post_install, install_formula?, install_formulae, perform_build_from_source_checks, perform_preinstall_checks, print_dry_run_dependencies

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::GistLogs::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/gist_logs.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-
-
# File 'cmd/gist-logs.rb', line 33
-
-def run
-  Install.perform_preinstall_checks(all_fatal: true)
-  Install.perform_build_from_source_checks(all_fatal: true)
-  gistify_logs(args.named.to_resolved_formulae.first)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/GistLogs/Args.html b/docs/Homebrew/Cmd/GistLogs/Args.html deleted file mode 100644 index 4415b3b40..000000000 --- a/docs/Homebrew/Cmd/GistLogs/Args.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::GistLogs::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::GistLogs::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/gist_logs.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/gist_logs.rbi', line 15
-
-def n?; end
-
-
- -
-

- - #new_issue?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/gist_logs.rbi', line 18
-
-def new_issue?; end
-
-
- -
-

- - #p?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/gist_logs.rbi', line 21
-
-def p?; end
-
-
- -
-

- - #private?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/gist_logs.rbi', line 24
-
-def private?; end
-
-
- -
-

- - #with_hostname?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/gist_logs.rbi', line 27
-
-def with_hostname?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/HelpCmd.html b/docs/Homebrew/Cmd/HelpCmd.html deleted file mode 100644 index d65d0b8ce..000000000 --- a/docs/Homebrew/Cmd/HelpCmd.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::HelpCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::HelpCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/help.rb,
- sorbet/rbi/dsl/homebrew/cmd/help_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::HelpCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/help_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'cmd/help.rb', line 19
-
-def run
-  Help.help
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/HelpCmd/Args.html b/docs/Homebrew/Cmd/HelpCmd/Args.html deleted file mode 100644 index c129ed450..000000000 --- a/docs/Homebrew/Cmd/HelpCmd/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::HelpCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::HelpCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/help_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Home.html b/docs/Homebrew/Cmd/Home.html deleted file mode 100644 index f7583edc9..000000000 --- a/docs/Homebrew/Cmd/Home.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Home - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Home - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/home.rb,
- sorbet/rbi/dsl/homebrew/cmd/home.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Home::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/home.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'cmd/home.rb', line 26
-
-def run
-  if args.no_named?
-    exec_browser HOMEBREW_WWW
-    return
-  end
-
-  # to_formulae_and_casks is typed to possibly return Kegs (but won't without explicitly asking)
-  formulae_or_casks = T.cast(args.named.to_formulae_and_casks, T::Array[T.any(Formula, Cask::Cask)])
-  homepages = formulae_or_casks.map do |formula_or_cask|
-    puts "Opening homepage for #{name_of(formula_or_cask)}"
-    formula_or_cask.homepage
-  end
-
-  exec_browser(*T.unsafe(homepages))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Home/Args.html b/docs/Homebrew/Cmd/Home/Args.html deleted file mode 100644 index 598a8e3e7..000000000 --- a/docs/Homebrew/Cmd/Home/Args.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Home::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Home::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/home.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/home.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/home.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/home.rbi', line 21
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/home.rbi', line 24
-
-def formulae?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Info.html b/docs/Homebrew/Cmd/Info.html deleted file mode 100644 index 9543b4cb8..000000000 --- a/docs/Homebrew/Cmd/Info.html +++ /dev/null @@ -1,520 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Info - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Info - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/info.rb,
- sorbet/rbi/dsl/homebrew/cmd/info.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
VALID_DAYS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[30 90 365].freeze
- -
VALID_FORMULA_CATEGORIES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[install install-on-request build-error].freeze
- -
VALID_CATEGORIES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(VALID_FORMULA_CATEGORIES + %w[cask-install os-version]).freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Info::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 10
-
-def args; end
-
-
- -
-

- - #github_remote_path(remote, path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-110
-111
-112
-113
-114
-115
-116
-
-
# File 'cmd/info.rb', line 110
-
-def github_remote_path(remote, path)
-  if remote =~ %r{^(?:https?://|git(?:@|://))github\.com[:/](.+)/(.+?)(?:\.git)?$}
-    "https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/blob/HEAD/#{path}"
-  else
-    "#{remote}/#{path}"
-  end
-end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-
-
# File 'cmd/info.rb', line 77
-
-def run
-  if args.analytics?
-    if args.days.present? && VALID_DAYS.exclude?(args.days)
-      raise UsageError, "`--days` must be one of #{VALID_DAYS.join(", ")}."
-    end
-
-    if args.category.present?
-      if args.named.present? && VALID_FORMULA_CATEGORIES.exclude?(args.category)
-        raise UsageError,
-              "`--category` must be one of #{VALID_FORMULA_CATEGORIES.join(", ")} when querying formulae."
-      end
-
-      unless VALID_CATEGORIES.include?(args.category)
-        raise UsageError, "`--category` must be one of #{VALID_CATEGORIES.join(", ")}."
-      end
-    end
-
-    print_analytics
-  elsif args.json
-    all = args.eval_all?
-
-    print_json(all)
-  elsif args.github?
-    raise FormulaOrCaskUnspecifiedError if args.no_named?
-
-    exec_browser(*args.named.to_formulae_and_casks.map { |f| github_info(f) })
-  elsif args.no_named?
-    print_statistics
-  else
-    print_info
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Info/Args.html b/docs/Homebrew/Cmd/Info/Args.html deleted file mode 100644 index 8c327a1f2..000000000 --- a/docs/Homebrew/Cmd/Info/Args.html +++ /dev/null @@ -1,1149 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Info::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Info::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/info.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #analytics?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 15
-
-def analytics?; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 18
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 21
-
-def casks?; end
-
-
- -
-

- - #categoryString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 24
-
-def category; end
-
-
- -
-

- - #daysString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 27
-
-def days; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 30
-
-def eval_all?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 33
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 36
-
-def formulae?; end
-
-
- -
-

- - #github?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 39
-
-def github?; end
-
-
- -
-

- - #github_packages_downloads?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 42
-
-def github_packages_downloads?; end
-
-
- -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 45
-
-def installed?; end
-
-
- -
-

- - #jsonString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 48
-
-def json; end
-
-
- -
-

- - #variations?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/info.rbi', line 51
-
-def variations?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/InstallCmd.html b/docs/Homebrew/Cmd/InstallCmd.html deleted file mode 100644 index bd4d4548b..000000000 --- a/docs/Homebrew/Cmd/InstallCmd.html +++ /dev/null @@ -1,799 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::InstallCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::InstallCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/install.rb,
- sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::InstallCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-
-
# File 'cmd/install.rb', line 166
-
-def run
-  if args.env.present?
-    # Can't use `replacement: false` because `install_args` are used by
-    # `build.rb`. Instead, `hide_from_man_page` and don't do anything with
-    # this argument here.
-    # This odisabled should stick around indefinitely.
-    odisabled "brew install --env", "`env :std` in specific formula files"
-  end
-
-  args.named.each do |name|
-    if (tap_with_name = Tap.with_formula_name(name))
-      tap, = tap_with_name
-    elsif (tap_with_token = Tap.with_cask_token(name))
-      tap, = tap_with_token
-    end
-
-    tap&.ensure_installed!
-  end
-
-  if args.ignore_dependencies?
-    opoo <<~EOS
-      #{Tty.bold}`--ignore-dependencies` is an unsupported Homebrew developer option!#{Tty.reset}
-      Adjust your PATH to put any preferred versions of applications earlier in the
-      PATH rather than using this unsupported option!
-
-    EOS
-  end
-
-  begin
-    formulae, casks = T.cast(
-      args.named.to_formulae_and_casks(warn: false).partition { _1.is_a?(Formula) },
-      [T::Array[Formula], T::Array[Cask::Cask]],
-    )
-  rescue FormulaOrCaskUnavailableError, Cask::CaskUnavailableError
-    cask_tap = CoreCaskTap.instance
-    if !cask_tap.installed? && (args.cask? || Tap.untapped_official_taps.exclude?(cask_tap.name))
-      cask_tap.ensure_installed!
-      retry if cask_tap.installed?
-    end
-
-    raise
-  end
-
-  if casks.any?
-
-    if args.dry_run?
-      if (casks_to_install = casks.reject(&:installed?).presence)
-        ohai "Would install #{::Utils.pluralize("cask", casks_to_install.count, include_count: true)}:"
-        puts casks_to_install.map(&:full_name).join(" ")
-      end
-      casks.each do |cask|
-        dep_names = CaskDependent.new(cask)
-                                 .runtime_dependencies
-                                 .reject(&:installed?)
-                                 .map(&:to_formula)
-                                 .map(&:name)
-        next if dep_names.blank?
-
-        ohai "Would install #{::Utils.pluralize("dependenc", dep_names.count, plural: "ies", singular: "y",
-                                            include_count: true)} for #{cask.full_name}:"
-        puts dep_names.join(" ")
-      end
-      return
-    end
-
-    require "cask/installer"
-
-    installed_casks, new_casks = casks.partition(&:installed?)
-
-    new_casks.each do |cask|
-      Cask::Installer.new(
-        cask,
-        binaries:       args.binaries?,
-        verbose:        args.verbose?,
-        force:          args.force?,
-        adopt:          args.adopt?,
-        require_sha:    args.require_sha?,
-        skip_cask_deps: args.skip_cask_deps?,
-        quarantine:     args.quarantine?,
-        quiet:          args.quiet?,
-      ).install
-    end
-
-    if !Homebrew::EnvConfig.no_install_upgrade? && installed_casks.any?
-      require "cask/upgrade"
-
-      Cask::Upgrade.upgrade_casks(
-        *installed_casks,
-        force:          args.force?,
-        dry_run:        args.dry_run?,
-        binaries:       args.binaries?,
-        quarantine:     args.quarantine?,
-        require_sha:    args.require_sha?,
-        skip_cask_deps: args.skip_cask_deps?,
-        verbose:        args.verbose?,
-        args:,
-      )
-    end
-  end
-
-  # if the user's flags will prevent bottle only-installations when no
-  # developer tools are available, we need to stop them early on
-  build_flags = []
-  unless DevelopmentTools.installed?
-    build_flags << "--HEAD" if args.HEAD?
-    build_flags << "--build-bottle" if args.build_bottle?
-    build_flags << "--build-from-source" if args.build_from_source?
-
-    raise BuildFlagsError.new(build_flags, bottled: formulae.all?(&:bottled?)) if build_flags.present?
-  end
-
-  if build_flags.present? && !Homebrew::EnvConfig.developer?
-    opoo "building from source is not supported!"
-    puts "You're on your own. Failures are expected so don't create any issues, please!"
-  end
-
-  installed_formulae = formulae.select do |f|
-    Install.install_formula?(
-      f,
-      head:              args.HEAD?,
-      fetch_head:        args.fetch_HEAD?,
-      only_dependencies: args.only_dependencies?,
-      force:             args.force?,
-      quiet:             args.quiet?,
-    )
-  end
-
-  return if formulae.any? && installed_formulae.empty?
-
-  Install.perform_preinstall_checks(cc: args.cc)
-
-  Install.install_formulae(
-    installed_formulae,
-    build_bottle:               args.build_bottle?,
-    force_bottle:               args.force_bottle?,
-    bottle_arch:                args.bottle_arch,
-    ignore_deps:                args.ignore_dependencies?,
-    only_deps:                  args.only_dependencies?,
-    include_test_formulae:      args.include_test_formulae,
-    build_from_source_formulae: args.build_from_source_formulae,
-    cc:                         args.cc,
-    git:                        args.git?,
-    interactive:                args.interactive?,
-    keep_tmp:                   args.keep_tmp?,
-    debug_symbols:              args.debug_symbols?,
-    force:                      args.force?,
-    overwrite:                  args.overwrite?,
-    debug:                      args.debug?,
-    quiet:                      args.quiet?,
-    verbose:                    args.verbose?,
-    dry_run:                    args.dry_run?,
-    skip_post_install:          args.skip_post_install?,
-  )
-
-  Upgrade.check_installed_dependents(
-    installed_formulae,
-    flags:                      args.flags_only,
-    installed_on_request:       args.named.present?,
-    force_bottle:               args.force_bottle?,
-    build_from_source_formulae: args.build_from_source_formulae,
-    interactive:                args.interactive?,
-    keep_tmp:                   args.keep_tmp?,
-    debug_symbols:              args.debug_symbols?,
-    force:                      args.force?,
-    debug:                      args.debug?,
-    quiet:                      args.quiet?,
-    verbose:                    args.verbose?,
-    dry_run:                    args.dry_run?,
-  )
-
-  Cleanup.periodic_clean!(dry_run: args.dry_run?)
-
-  Homebrew.messages.display_messages(display_times: args.display_times?)
-rescue FormulaUnreadableError, FormulaClassUnavailableError,
-       TapFormulaUnreadableError, TapFormulaClassUnavailableError => e
-  # Need to rescue before `FormulaUnavailableError` (superclass of this)
-  # is handled, as searching for a formula doesn't make sense here (the
-  # formula was found, but there's a problem with its implementation).
-  $stderr.puts Utils::Backtrace.clean(e) if Homebrew::EnvConfig.developer?
-  ofail e.message
-rescue FormulaOrCaskUnavailableError, Cask::CaskUnavailableError => e
-  Homebrew.failed = true
-
-  # formula name or cask token
-  name = case e
-  when FormulaOrCaskUnavailableError then e.name
-  when Cask::CaskUnavailableError then e.token
-  else T.absurd(e)
-  end
-
-  if name == "updog"
-    ofail "What's updog?"
-    return
-  end
-
-  opoo e
-
-  reason = MissingFormula.reason(name, silent: true)
-  if !args.cask? && reason
-    $stderr.puts reason
-    return
-  end
-
-  # We don't seem to get good search results when the tap is specified
-  # so we might as well return early.
-  return if name.include?("/")
-
-  require "search"
-
-  package_types = []
-  package_types << "formulae" unless args.cask?
-  package_types << "casks" unless args.formula?
-
-  ohai "Searching for similarly named #{package_types.join(" and ")}..."
-
-  # Don't treat formula/cask name as a regex
-  string_or_regex = name
-  all_formulae, all_casks = Search.search_names(string_or_regex, args)
-
-  if all_formulae.any?
-    ohai "Formulae", Formatter.columns(all_formulae)
-    first_formula = all_formulae.first.to_s
-    puts <<~EOS
-
-      To install #{first_formula}, run:
-        brew install #{first_formula}
-    EOS
-  end
-  puts if all_formulae.any? && all_casks.any?
-  if all_casks.any?
-    ohai "Casks", Formatter.columns(all_casks)
-    first_cask = all_casks.first.to_s
-    puts <<~EOS
-
-      To install #{first_cask}, run:
-        brew install --cask #{first_cask}
-    EOS
-  end
-  return if all_formulae.any? || all_casks.any?
-
-  odie "No #{package_types.join(" or ")} found for #{name}."
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/InstallCmd/Args.html b/docs/Homebrew/Cmd/InstallCmd/Args.html deleted file mode 100644 index 99dbaf30e..000000000 --- a/docs/Homebrew/Cmd/InstallCmd/Args.html +++ /dev/null @@ -1,3961 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::InstallCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::InstallCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #adopt?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 18
-
-def adopt?; end
-
-
- -
-

- - #appdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 21
-
-def appdir; end
-
-
- -
-

- - #audio_unit_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 24
-
-def audio_unit_plugindir; end
-
-
- -
-

- - #binaries?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 27
-
-def binaries?; end
-
-
- -
-

- - #bottle_archString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 30
-
-def bottle_arch; end
-
-
- -
-

- - #build_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 33
-
-def build_bottle?; end
-
-
- -
-

- - #build_from_source?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 36
-
-def build_from_source?; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 39
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 42
-
-def casks?; end
-
-
- -
-

- - #ccString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 45
-
-def cc; end
-
-
- -
-

- - #colorpickerdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 48
-
-def colorpickerdir; end
-
-
- -
-

- - #debug_symbols?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 51
-
-def debug_symbols?; end
-
-
- -
-

- - #dictionarydirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 54
-
-def dictionarydir; end
-
-
- -
-

- - #display_times?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 57
-
-def display_times?; end
-
-
- -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 60
-
-def dry_run?; end
-
-
- -
-

- - #envString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 63
-
-def env; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 66
-
-def f?; end
-
-
- -
-

- - #fetch_HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 69
-
-def fetch_HEAD?; end
-
-
- -
-

- - #fontdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 72
-
-def fontdir; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 75
-
-def force?; end
-
-
- -
-

- - #force_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 78
-
-def force_bottle?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 81
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 84
-
-def formulae?; end
-
-
- -
-

- - #g?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-87
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 87
-
-def g?; end
-
-
- -
-

- - #git?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 90
-
-def git?; end
-
-
- -
-

- - #HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 15
-
-def HEAD?; end
-
-
- -
-

- - #i?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-93
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 93
-
-def i?; end
-
-
- -
-

- - #ignore_dependencies?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 96
-
-def ignore_dependencies?; end
-
-
- -
-

- - #include_test?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-99
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 99
-
-def include_test?; end
-
-
- -
-

- - #input_methoddirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-102
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 102
-
-def input_methoddir; end
-
-
- -
-

- - #interactive?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 105
-
-def interactive?; end
-
-
- -
-

- - #internet_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-108
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 108
-
-def internet_plugindir; end
-
-
- -
-

- - #keep_tmp?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-111
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 111
-
-def keep_tmp?; end
-
-
- -
-

- - #keyboard_layoutdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-114
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 114
-
-def keyboard_layoutdir; end
-
-
- -
-

- - #languageArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-117
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 117
-
-def language; end
-
-
- -
-

- - #mdimporterdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-120
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 120
-
-def mdimporterdir; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-123
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 123
-
-def n?; end
-
-
- -
-

- - #only_dependencies?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-126
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 126
-
-def only_dependencies?; end
-
-
- -
-

- - #overwrite?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-129
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 129
-
-def overwrite?; end
-
-
- -
-

- - #prefpanedirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-132
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 132
-
-def prefpanedir; end
-
-
- -
-

- - #qlplugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-135
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 135
-
-def qlplugindir; end
-
-
- -
-

- - #quarantine?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-138
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 138
-
-def quarantine?; end
-
-
- -
-

- - #require_sha?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-141
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 141
-
-def require_sha?; end
-
-
- -
-

- - #s?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-144
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 144
-
-def s?; end
-
-
- -
-

- - #screen_saverdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-147
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 147
-
-def screen_saverdir; end
-
-
- -
-

- - #servicedirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-150
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 150
-
-def servicedir; end
-
-
- -
-

- - #skip_cask_deps?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-153
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 153
-
-def skip_cask_deps?; end
-
-
- -
-

- - #skip_post_install?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-156
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 156
-
-def skip_post_install?; end
-
-
- -
-

- - #vst3_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-159
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 159
-
-def vst3_plugindir; end
-
-
- -
-

- - #vst_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-162
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 162
-
-def vst_plugindir; end
-
-
- -
-

- - #zap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-165
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/install_cmd.rbi', line 165
-
-def zap?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Leaves.html b/docs/Homebrew/Cmd/Leaves.html deleted file mode 100644 index 0074a5a7a..000000000 --- a/docs/Homebrew/Cmd/Leaves.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Leaves - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Leaves - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/leaves.rb,
- sorbet/rbi/dsl/homebrew/cmd/leaves.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Leaves::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/leaves.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'cmd/leaves.rb', line 26
-
-def run
-  leaves_list = Formula.installed - Formula.installed.flat_map(&:runtime_formula_dependencies)
-  casks_runtime_dependencies = Cask::Caskroom.casks.flat_map do |cask|
-    CaskDependent.new(cask).runtime_dependencies.map(&:to_formula)
-  end
-  leaves_list -= casks_runtime_dependencies
-  leaves_list.select! { installed_on_request?(_1) } if args.installed_on_request?
-  leaves_list.select! { installed_as_dependency?(_1) } if args.installed_as_dependency?
-
-  leaves_list.map(&:full_name)
-             .sort
-             .each { puts(_1) }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Leaves/Args.html b/docs/Homebrew/Cmd/Leaves/Args.html deleted file mode 100644 index 8339f19a3..000000000 --- a/docs/Homebrew/Cmd/Leaves/Args.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Leaves::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Leaves::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/leaves.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #installed_as_dependency?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/leaves.rbi', line 15
-
-def installed_as_dependency?; end
-
-
- -
-

- - #installed_on_request?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/leaves.rbi', line 18
-
-def installed_on_request?; end
-
-
- -
-

- - #p?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/leaves.rbi', line 21
-
-def p?; end
-
-
- -
-

- - #r?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/leaves.rbi', line 24
-
-def r?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Link.html b/docs/Homebrew/Cmd/Link.html deleted file mode 100644 index 773730c41..000000000 --- a/docs/Homebrew/Cmd/Link.html +++ /dev/null @@ -1,499 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Link - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Link - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/link.rb,
- sorbet/rbi/dsl/homebrew/cmd/link.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Link::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/link.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-
-
# File 'cmd/link.rb', line 31
-
-def run
-  options = {
-    overwrite: args.overwrite?,
-    dry_run:   args.dry_run?,
-    verbose:   args.verbose?,
-  }
-
-  kegs = if args.HEAD?
-    args.named.to_kegs.group_by(&:name).filter_map do |name, resolved_kegs|
-      head_keg = resolved_kegs.find { |keg| keg.version.head? }
-      next head_keg if head_keg.present?
-
-      opoo <<~EOS
-        No HEAD keg installed for #{name}
-        To install, run:
-          brew install --HEAD #{name}
-      EOS
-
-      nil
-    end
-  else
-    args.named.to_latest_kegs
-  end
-
-  kegs.freeze.each do |keg|
-    keg_only = Formulary.keg_only?(keg.rack)
-
-    if keg.linked?
-      opoo "Already linked: #{keg}"
-      name_and_flag = "#{"--HEAD " if args.HEAD?}#{"--force " if keg_only}#{keg.name}"
-      puts <<~EOS
-        To relink, run:
-          brew unlink #{keg.name} && brew link #{name_and_flag}
-      EOS
-      next
-    end
-
-    if args.dry_run?
-      if args.overwrite?
-        puts "Would remove:"
-      else
-        puts "Would link:"
-      end
-      keg.link(**options)
-      puts_keg_only_path_message(keg) if keg_only
-      next
-    end
-
-    formula = begin
-      keg.to_formula
-    rescue FormulaUnavailableError
-      # Not all kegs may belong to formulae
-      nil
-    end
-
-    if keg_only
-      if HOMEBREW_PREFIX.to_s == HOMEBREW_DEFAULT_PREFIX && formula.present? &&
-         formula.keg_only_reason.by_macos?
-        caveats = Caveats.new(formula)
-        opoo <<~EOS
-          Refusing to link macOS provided/shadowed software: #{keg.name}
-          #{caveats.keg_only_text(skip_reason: true).strip}
-        EOS
-        next
-      end
-
-      if !args.force? && (formula.blank? || !formula.keg_only_reason.versioned_formula?)
-        opoo "#{keg.name} is keg-only and must be linked with `--force`."
-        puts_keg_only_path_message(keg)
-        next
-      end
-    end
-
-    Unlink.unlink_versioned_formulae(formula, verbose: args.verbose?) if formula
-
-    keg.lock do
-      print "Linking #{keg}... "
-      puts if args.verbose?
-
-      begin
-        n = keg.link(**options)
-      rescue Keg::LinkError
-        puts
-        raise
-      else
-        puts "#{n} symlinks created."
-      end
-
-      puts_keg_only_path_message(keg) if keg_only && !Homebrew::EnvConfig.developer?
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Link/Args.html b/docs/Homebrew/Cmd/Link/Args.html deleted file mode 100644 index 43e3a32f9..000000000 --- a/docs/Homebrew/Cmd/Link/Args.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Link::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Link::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/link.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/link.rbi', line 18
-
-def dry_run?; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/link.rbi', line 21
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/link.rbi', line 24
-
-def force?; end
-
-
- -
-

- - #HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/link.rbi', line 15
-
-def HEAD?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/link.rbi', line 27
-
-def n?; end
-
-
- -
-

- - #overwrite?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/link.rbi', line 30
-
-def overwrite?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/List.html b/docs/Homebrew/Cmd/List.html deleted file mode 100644 index 62a79b2d8..000000000 --- a/docs/Homebrew/Cmd/List.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::List - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::List - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
cmd/list.rb,
- sorbet/rbi/dsl/homebrew/cmd/list.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::List::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-
-
# File 'cmd/list.rb', line 82
-
-def run
-  if args.full_name?
-    unless args.cask?
-      formula_names = args.no_named? ? Formula.installed : args.named.to_resolved_formulae
-      full_formula_names = formula_names.map(&:full_name).sort(&tap_and_name_comparison)
-      full_formula_names = Formatter.columns(full_formula_names) unless args.public_send(:"1?")
-      puts full_formula_names if full_formula_names.present?
-    end
-    if args.cask? || (!args.formula? && args.no_named?)
-      cask_names = if args.no_named?
-        Cask::Caskroom.casks
-      else
-        args.named.to_formulae_and_casks(only: :cask, method: :resolve)
-      end
-      # The cast is because `Keg`` does not define `full_name`
-      full_cask_names = T.cast(cask_names, T::Array[T.any(Formula, Cask::Cask)])
-                         .map(&:full_name).sort(&tap_and_name_comparison)
-      full_cask_names = Formatter.columns(full_cask_names) unless args.public_send(:"1?")
-      puts full_cask_names if full_cask_names.present?
-    end
-  elsif args.pinned?
-    filtered_list
-  elsif args.versions?
-    filtered_list unless args.cask?
-    list_casks if args.cask? || (!args.formula? && !args.multiple? && args.no_named?)
-  elsif args.installed_on_request? || args.installed_as_dependency?
-    unless args.no_named?
-      raise UsageError,
-            "Cannot use `--installed-on-request` or " \
-            "`--installed-as-dependency` with formula arguments."
-    end
-
-    Formula.installed.sort.each do |formula|
-      tab = Tab.for_formula(formula)
-
-      if args.installed_on_request? && args.installed_as_dependency?
-        statuses = []
-        statuses << "installed on request" if tab.installed_on_request
-        statuses << "installed as dependency" if tab.installed_as_dependency
-        next if statuses.empty?
-
-        puts "#{formula.name}: #{statuses.join(", ")}"
-      elsif (args.installed_on_request? && tab.installed_on_request) ||
-            (args.installed_as_dependency? && tab.installed_as_dependency)
-        puts formula.name
-      end
-    end
-  elsif args.no_named?
-    ENV["CLICOLOR"] = nil
-
-    ls_args = []
-    ls_args << "-1" if args.public_send(:"1?")
-    ls_args << "-l" if args.l?
-    ls_args << "-r" if args.r?
-    ls_args << "-t" if args.t?
-
-    if !args.cask? && HOMEBREW_CELLAR.exist? && HOMEBREW_CELLAR.children.any?
-      ohai "Formulae" if $stdout.tty? && !args.formula?
-      safe_system "ls", *ls_args, HOMEBREW_CELLAR
-      puts if $stdout.tty? && !args.formula?
-    end
-    if !args.formula? && Cask::Caskroom.any_casks_installed?
-      ohai "Casks" if $stdout.tty? && !args.cask?
-      safe_system "ls", *ls_args, Cask::Caskroom.path
-    end
-  else
-    kegs, casks = args.named.to_kegs_to_casks
-
-    if args.verbose? || !$stdout.tty?
-      find_args = %w[-not -type d -not -name .DS_Store -print]
-      system_command! "find", args: kegs.map(&:to_s) + find_args, print_stdout: true if kegs.present?
-      system_command! "find", args: casks.map(&:caskroom_path) + find_args, print_stdout: true if casks.present?
-    else
-      kegs.each { |keg| PrettyListing.new keg } if kegs.present?
-      Cask::List.list_casks(*casks, one: args.public_send(:"1?")) if casks.present?
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/List/Args.html b/docs/Homebrew/Cmd/List/Args.html deleted file mode 100644 index 68ae46a53..000000000 --- a/docs/Homebrew/Cmd/List/Args.html +++ /dev/null @@ -1,1149 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::List::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::List::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/list.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 21
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 24
-
-def formulae?; end
-
-
- -
-

- - #full_name?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 27
-
-def full_name?; end
-
-
- -
-

- - #installed_as_dependency?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 30
-
-def installed_as_dependency?; end
-
-
- -
-

- - #installed_on_request?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 33
-
-def installed_on_request?; end
-
-
- -
-

- - #l?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 36
-
-def l?; end
-
-
- -
-

- - #multiple?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 39
-
-def multiple?; end
-
-
- -
-

- - #pinned?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 42
-
-def pinned?; end
-
-
- -
-

- - #r?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 45
-
-def r?; end
-
-
- -
-

- - #t?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 48
-
-def t?; end
-
-
- -
-

- - #versions?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/list.rbi', line 51
-
-def versions?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Log.html b/docs/Homebrew/Cmd/Log.html deleted file mode 100644 index 54415db90..000000000 --- a/docs/Homebrew/Cmd/Log.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Log - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Log - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
cmd/log.rb,
- sorbet/rbi/dsl/homebrew/cmd/log.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Log::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'cmd/log.rb', line 39
-
-def run
-  # As this command is simplifying user-run commands then let's just use a
-  # user path, too.
-  ENV["PATH"] = PATH.new(ORIGINAL_PATHS).to_s
-
-  if args.no_named?
-    git_log(HOMEBREW_REPOSITORY)
-  else
-    path = T.must(args.named.to_paths.first)
-    tap = Tap.from_path(path)
-    git_log path.dirname, path, tap
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Log/Args.html b/docs/Homebrew/Cmd/Log/Args.html deleted file mode 100644 index 4f85b668a..000000000 --- a/docs/Homebrew/Cmd/Log/Args.html +++ /dev/null @@ -1,1001 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Log::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Log::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/log.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 21
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 24
-
-def formulae?; end
-
-
- -
-

- - #max_countString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 27
-
-def max_count; end
-
-
- -
-

- - #nString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 30
-
-def n; end
-
-
- -
-

- - #oneline?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 33
-
-def oneline?; end
-
-
- -
-

- - #p?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 36
-
-def p?; end
-
-
- -
-

- - #patch?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 39
-
-def patch?; end
-
-
- -
-

- - #stat?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 42
-
-def stat?; end
-
-
- -
-

- - #u?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/log.rbi', line 45
-
-def u?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Migrate.html b/docs/Homebrew/Cmd/Migrate.html deleted file mode 100644 index c4777ee7d..000000000 --- a/docs/Homebrew/Cmd/Migrate.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Migrate - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Migrate - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/migrate.rb,
- sorbet/rbi/dsl/homebrew/cmd/migrate.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Migrate::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'cmd/migrate.rb', line 32
-
-def run
-  args.named.to_formulae_and_casks(warn: false).each do |formula_or_cask|
-    case formula_or_cask
-    when Formula
-      Migrator.migrate_if_needed(formula_or_cask, force: args.force?, dry_run: args.dry_run?)
-    when Cask::Cask
-      Cask::Migrator.migrate_if_needed(formula_or_cask, dry_run: args.dry_run?)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Migrate/Args.html b/docs/Homebrew/Cmd/Migrate/Args.html deleted file mode 100644 index da803f904..000000000 --- a/docs/Homebrew/Cmd/Migrate/Args.html +++ /dev/null @@ -1,779 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Migrate::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Migrate::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/migrate.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 21
-
-def dry_run?; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 24
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 27
-
-def force?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 30
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 33
-
-def formulae?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 36
-
-def n?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Missing.html b/docs/Homebrew/Cmd/Missing.html deleted file mode 100644 index a1456ca02..000000000 --- a/docs/Homebrew/Cmd/Missing.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Missing - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Missing - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/missing.rb,
- sorbet/rbi/dsl/homebrew/cmd/missing.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Missing::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/missing.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-
-
# File 'cmd/missing.rb', line 26
-
-def run
-  return unless HOMEBREW_CELLAR.exist?
-
-  ff = if args.no_named?
-    Formula.installed.sort
-  else
-    args.named.to_resolved_formulae.sort
-  end
-
-  ff.each do |f|
-    missing = f.missing_dependencies(hide: args.hide)
-    next if missing.empty?
-
-    Homebrew.failed = true
-    print "#{f}: " if ff.size > 1
-    puts missing.join(" ")
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Missing/Args.html b/docs/Homebrew/Cmd/Missing/Args.html deleted file mode 100644 index ac9982b1c..000000000 --- a/docs/Homebrew/Cmd/Missing/Args.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Missing::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Missing::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/missing.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #hideArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/missing.rbi', line 15
-
-def hide; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/NodenvSync.html b/docs/Homebrew/Cmd/NodenvSync.html deleted file mode 100644 index d15011296..000000000 --- a/docs/Homebrew/Cmd/NodenvSync.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::NodenvSync - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::NodenvSync - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/nodenv-sync.rb,
- sorbet/rbi/dsl/homebrew/cmd/nodenv_sync.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::NodenvSync::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/nodenv_sync.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'cmd/nodenv-sync.rb', line 22
-
-def run
-  nodenv_root = Pathname(ENV.fetch("HOMEBREW_NODENV_ROOT", Pathname(Dir.home)/".nodenv"))
-
-  # Don't run multiple times at once.
-  nodenv_sync_running = nodenv_root/".nodenv_sync_running"
-  return if nodenv_sync_running.exist?
-
-  begin
-    nodenv_versions = nodenv_root/"versions"
-    nodenv_versions.mkpath
-    FileUtils.touch nodenv_sync_running
-
-    HOMEBREW_CELLAR.glob("node{,@*}")
-                   .flat_map(&:children)
-                   .each { |path| link_nodenv_versions(path, nodenv_versions) }
-
-    nodenv_versions.children
-                   .select(&:symlink?)
-                   .reject(&:exist?)
-                   .each { |path| FileUtils.rm_f path }
-  ensure
-    nodenv_sync_running.unlink if nodenv_sync_running.exist?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/NodenvSync/Args.html b/docs/Homebrew/Cmd/NodenvSync/Args.html deleted file mode 100644 index 10ebfdc24..000000000 --- a/docs/Homebrew/Cmd/NodenvSync/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::NodenvSync::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::NodenvSync::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/nodenv_sync.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/OptionsCmd.html b/docs/Homebrew/Cmd/OptionsCmd.html deleted file mode 100644 index d1223c30f..000000000 --- a/docs/Homebrew/Cmd/OptionsCmd.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::OptionsCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::OptionsCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/options.rb,
- sorbet/rbi/dsl/homebrew/cmd/options_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::OptionsCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/options_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'cmd/options.rb', line 31
-
-def run
-  all = args.eval_all?
-
-  if all
-    puts_options(Formula.all(eval_all: args.eval_all?).sort)
-  elsif args.installed?
-    puts_options(Formula.installed.sort)
-  elsif args.command.present?
-    cmd_options = Commands.command_options(T.must(args.command))
-    odie "Unknown command: #{args.command}" if cmd_options.nil?
-
-    if args.compact?
-      puts cmd_options.sort.map(&:first) * " "
-    else
-      cmd_options.sort.each { |option, desc| puts "#{option}\n\t#{desc}" }
-      puts
-    end
-  elsif args.no_named?
-    raise FormulaUnspecifiedError
-  else
-    puts_options args.named.to_formulae
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/OptionsCmd/Args.html b/docs/Homebrew/Cmd/OptionsCmd/Args.html deleted file mode 100644 index aa4bc515c..000000000 --- a/docs/Homebrew/Cmd/OptionsCmd/Args.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::OptionsCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::OptionsCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/options_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #commandString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/options_cmd.rbi', line 15
-
-def command; end
-
-
- -
-

- - #compact?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/options_cmd.rbi', line 18
-
-def compact?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/options_cmd.rbi', line 21
-
-def eval_all?; end
-
-
- -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/options_cmd.rbi', line 24
-
-def installed?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Outdated.html b/docs/Homebrew/Cmd/Outdated.html deleted file mode 100644 index 8bb956dd1..000000000 --- a/docs/Homebrew/Cmd/Outdated.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Outdated - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Outdated - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/outdated.rb,
- sorbet/rbi/dsl/homebrew/cmd/outdated.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Outdated::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-
-
# File 'cmd/outdated.rb', line 50
-
-def run
-  case json_version(args.json)
-  when :v1
-    odie "`brew outdated --json=v1` is no longer supported. Use brew outdated --json=v2 instead."
-  when :v2, :default
-    formulae, casks = if args.formula?
-      [outdated_formulae, []]
-    elsif args.cask?
-      [[], outdated_casks]
-    else
-      outdated_formulae_casks
-    end
-
-    json = {
-      "formulae" => json_info(formulae),
-      "casks"    => json_info(casks),
-    }
-    puts JSON.pretty_generate(json)
-
-    outdated = formulae + casks
-
-  else
-    outdated = if args.formula?
-      outdated_formulae
-    elsif args.cask?
-      outdated_casks
-    else
-      outdated_formulae_casks.flatten
-    end
-
-    print_outdated(outdated)
-  end
-
-  Homebrew.failed = args.named.present? && outdated.present?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Outdated/Args.html b/docs/Homebrew/Cmd/Outdated/Args.html deleted file mode 100644 index d9276611c..000000000 --- a/docs/Homebrew/Cmd/Outdated/Args.html +++ /dev/null @@ -1,927 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Outdated::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Outdated::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/outdated.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #fetch_HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 21
-
-def fetch_HEAD?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 24
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 27
-
-def formulae?; end
-
-
- -
-

- - #g?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 30
-
-def g?; end
-
-
- -
-

- - #greedy?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 33
-
-def greedy?; end
-
-
- -
-

- - #greedy_auto_updates?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 36
-
-def greedy_auto_updates?; end
-
-
- -
-

- - #greedy_latest?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 39
-
-def greedy_latest?; end
-
-
- -
-

- - #jsonString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/outdated.rbi', line 42
-
-def json; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Pin.html b/docs/Homebrew/Cmd/Pin.html deleted file mode 100644 index f53885b0c..000000000 --- a/docs/Homebrew/Cmd/Pin.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Pin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Pin - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/pin.rb,
- sorbet/rbi/dsl/homebrew/cmd/pin.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Pin::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/pin.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'cmd/pin.rb', line 23
-
-def run
-  args.named.to_resolved_formulae.each do |f|
-    if f.pinned?
-      opoo "#{f.name} already pinned"
-    elsif !f.pinnable?
-      onoe "#{f.name} not installed"
-    else
-      f.pin
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Pin/Args.html b/docs/Homebrew/Cmd/Pin/Args.html deleted file mode 100644 index 8619c5603..000000000 --- a/docs/Homebrew/Cmd/Pin/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Pin::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Pin::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/pin.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Postinstall.html b/docs/Homebrew/Cmd/Postinstall.html deleted file mode 100644 index 71ec9725e..000000000 --- a/docs/Homebrew/Cmd/Postinstall.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Postinstall - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Postinstall - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/postinstall.rb,
- sorbet/rbi/dsl/homebrew/cmd/postinstall.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Postinstall::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/postinstall.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'cmd/postinstall.rb', line 20
-
-def run
-  args.named.to_resolved_formulae.each do |f|
-    ohai "Postinstalling #{f}"
-    f.install_etc_var
-    if f.post_install_defined?
-      fi = FormulaInstaller.new(f, **{ debug: args.debug?, quiet: args.quiet?, verbose: args.verbose? }.compact)
-      fi.post_install
-    else
-      opoo "#{f}: no `post_install` method was defined in the formula!"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Postinstall/Args.html b/docs/Homebrew/Cmd/Postinstall/Args.html deleted file mode 100644 index 3411e7a1d..000000000 --- a/docs/Homebrew/Cmd/Postinstall/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Postinstall::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Postinstall::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/postinstall.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Prefix.html b/docs/Homebrew/Cmd/Prefix.html deleted file mode 100644 index 3ba89e16d..000000000 --- a/docs/Homebrew/Cmd/Prefix.html +++ /dev/null @@ -1,555 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Prefix - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Prefix - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
cmd/--prefix.rb,
- sorbet/rbi/dsl/homebrew/cmd/prefix.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
UNBREWED_EXCLUDE_FILES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[.DS_Store].freeze
- -
UNBREWED_EXCLUDE_PATHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[
-  */.keepme
-  .github/*
-  bin/brew
-  completions/zsh/_brew
-  docs/*
-  lib/gdk-pixbuf-2.0/*
-  lib/gio/*
-  lib/node_modules/*
-  lib/python[23].[0-9]/*
-  lib/python3.[0-9][0-9]/*
-  lib/pypy/*
-  lib/pypy3/*
-  lib/ruby/gems/[12].*
-  lib/ruby/site_ruby/[12].*
-  lib/ruby/vendor_ruby/[12].*
-  manpages/brew.1
-  share/pypy/*
-  share/pypy3/*
-  share/info/dir
-  share/man/whatis
-  share/mime/*
-  texlive/*
-].freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Class Method Details

- - -
-

- - .command_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'cmd/--prefix.rb', line 39
-
-def self.command_name = "--prefix"
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Prefix::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/prefix.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-
-
# File 'cmd/--prefix.rb', line 61
-
-def run
-  raise UsageError, "`--installed` requires a formula argument." if args.installed? && args.no_named?
-
-  if args.unbrewed?
-    raise UsageError, "`--unbrewed` does not take a formula argument." unless args.no_named?
-
-    list_unbrewed
-  elsif args.no_named?
-    puts HOMEBREW_PREFIX
-  else
-    formulae = args.named.to_resolved_formulae
-    prefixes = formulae.filter_map do |f|
-      next nil if args.installed? && !f.opt_prefix.exist?
-
-      # this case will be short-circuited by brew.sh logic for a single formula
-      f.opt_prefix
-    end
-    puts prefixes
-    if args.installed?
-      missing_formulae = formulae.reject(&:optlinked?)
-                                 .map(&:name)
-      return if missing_formulae.blank?
-
-      raise NotAKegError, <<~EOS
-        The following formulae are not installed:
-        #{missing_formulae.join(" ")}
-      EOS
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Prefix/Args.html b/docs/Homebrew/Cmd/Prefix/Args.html deleted file mode 100644 index 088098faf..000000000 --- a/docs/Homebrew/Cmd/Prefix/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Prefix::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Prefix::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/prefix.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/prefix.rbi', line 15
-
-def installed?; end
-
-
- -
-

- - #unbrewed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/prefix.rbi', line 18
-
-def unbrewed?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/PrettyListing.html b/docs/Homebrew/Cmd/PrettyListing.html deleted file mode 100644 index 2d3d9df8a..000000000 --- a/docs/Homebrew/Cmd/PrettyListing.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::PrettyListing - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::PrettyListing - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/list.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(path) ⇒ PrettyListing - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of PrettyListing.

- - -
-
-
- - -
- - - - -
-
-
-
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-
-
# File 'cmd/list.rb', line 215
-
-def initialize(path)
-  Pathname.new(path).children.sort_by { |p| p.to_s.downcase }.each do |pn|
-    case pn.basename.to_s
-    when "bin", "sbin"
-      pn.find { |pnn| puts pnn unless pnn.directory? }
-    when "lib"
-      print_dir pn do |pnn|
-        # dylibs have multiple symlinks and we don't care about them
-        (pnn.extname == ".dylib" || pnn.extname == ".pc") && !pnn.symlink?
-      end
-    when ".brew"
-      next # Ignore .brew
-    else
-      if pn.directory?
-        if pn.symlink?
-          puts "#{pn} -> #{pn.readlink}"
-        else
-          print_dir pn
-        end
-      elsif Metafiles.list?(pn.basename.to_s)
-        puts pn
-      end
-    end
-  end
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/PyenvSync.html b/docs/Homebrew/Cmd/PyenvSync.html deleted file mode 100644 index de58da19e..000000000 --- a/docs/Homebrew/Cmd/PyenvSync.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::PyenvSync - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::PyenvSync - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/pyenv-sync.rb,
- sorbet/rbi/dsl/homebrew/cmd/pyenv_sync.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::PyenvSync::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/pyenv_sync.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'cmd/pyenv-sync.rb', line 22
-
-def run
-  pyenv_root = Pathname(ENV.fetch("HOMEBREW_PYENV_ROOT", Pathname(Dir.home)/".pyenv"))
-
-  # Don't run multiple times at once.
-  pyenv_sync_running = pyenv_root/".pyenv_sync_running"
-  return if pyenv_sync_running.exist?
-
-  begin
-    pyenv_versions = pyenv_root/"versions"
-    pyenv_versions.mkpath
-    FileUtils.touch pyenv_sync_running
-    HOMEBREW_CELLAR.glob("python{,@*}")
-                   .flat_map(&:children)
-                   .each { |path| link_pyenv_versions(path, pyenv_versions) }
-
-    pyenv_versions.children
-                  .select(&:symlink?)
-                  .reject(&:exist?)
-                  .each { |path| FileUtils.rm_f path }
-  ensure
-    pyenv_sync_running.unlink if pyenv_sync_running.exist?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/PyenvSync/Args.html b/docs/Homebrew/Cmd/PyenvSync/Args.html deleted file mode 100644 index 68d1dfc91..000000000 --- a/docs/Homebrew/Cmd/PyenvSync/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::PyenvSync::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::PyenvSync::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/pyenv_sync.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/RbenvSync.html b/docs/Homebrew/Cmd/RbenvSync.html deleted file mode 100644 index d7ea675c5..000000000 --- a/docs/Homebrew/Cmd/RbenvSync.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::RbenvSync - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::RbenvSync - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/rbenv-sync.rb,
- sorbet/rbi/dsl/homebrew/cmd/rbenv_sync.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::RbenvSync::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/rbenv_sync.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'cmd/rbenv-sync.rb', line 22
-
-def run
-  rbenv_root = Pathname(ENV.fetch("HOMEBREW_RBENV_ROOT", Pathname(Dir.home)/".rbenv"))
-
-  # Don't run multiple times at once.
-  rbenv_sync_running = rbenv_root/".rbenv_sync_running"
-  return if rbenv_sync_running.exist?
-
-  begin
-    rbenv_versions = rbenv_root/"versions"
-    rbenv_versions.mkpath
-    FileUtils.touch rbenv_sync_running
-
-    HOMEBREW_CELLAR.glob("ruby{,@*}")
-                   .flat_map(&:children)
-                   .each { |path| link_rbenv_versions(path, rbenv_versions) }
-
-    rbenv_versions.children
-                  .select(&:symlink?)
-                  .reject(&:exist?)
-                  .each { |path| FileUtils.rm_f path }
-  ensure
-    rbenv_sync_running.unlink if rbenv_sync_running.exist?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/RbenvSync/Args.html b/docs/Homebrew/Cmd/RbenvSync/Args.html deleted file mode 100644 index 367ded4e9..000000000 --- a/docs/Homebrew/Cmd/RbenvSync/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::RbenvSync::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::RbenvSync::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/rbenv_sync.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/ReadallCmd.html b/docs/Homebrew/Cmd/ReadallCmd.html deleted file mode 100644 index e23bd4bd1..000000000 --- a/docs/Homebrew/Cmd/ReadallCmd.html +++ /dev/null @@ -1,375 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::ReadallCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::ReadallCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/readall.rb,
- sorbet/rbi/dsl/homebrew/cmd/readall_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::ReadallCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/readall_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'cmd/readall.rb', line 36
-
-def run
-  Homebrew.with_no_api_env do
-    if args.syntax? && args.no_named?
-      scan_files = "#{HOMEBREW_LIBRARY_PATH}/**/*.rb"
-      ruby_files = Dir.glob(scan_files).grep_v(%r{/(vendor)/})
-
-      Homebrew.failed = true unless Readall.valid_ruby_syntax?(ruby_files)
-    end
-
-    options = {
-      aliases:     args.aliases?,
-      no_simulate: args.no_simulate?,
-    }
-    options[:os_arch_combinations] = args.os_arch_combinations if args.os || args.arch
-
-    taps = if args.no_named?
-      if !args.eval_all? && !Homebrew::EnvConfig.eval_all?
-        raise UsageError, "`brew readall` needs a tap or `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!"
-      end
-
-      Tap.installed
-    else
-      args.named.to_installed_taps
-    end
-
-    taps.each do |tap|
-      Homebrew.failed = true unless Readall.valid_tap?(tap, **options)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/ReadallCmd/Args.html b/docs/Homebrew/Cmd/ReadallCmd/Args.html deleted file mode 100644 index 227118e70..000000000 --- a/docs/Homebrew/Cmd/ReadallCmd/Args.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::ReadallCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::ReadallCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/readall_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #aliases?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/readall_cmd.rbi', line 15
-
-def aliases?; end
-
-
- -
-

- - #archString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/readall_cmd.rbi', line 18
-
-def arch; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/readall_cmd.rbi', line 21
-
-def eval_all?; end
-
-
- -
-

- - #no_simulate?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/readall_cmd.rbi', line 24
-
-def no_simulate?; end
-
-
- -
-

- - #osString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/readall_cmd.rbi', line 27
-
-def os; end
-
-
- -
-

- - #syntax?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/readall_cmd.rbi', line 30
-
-def syntax?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Reinstall.html b/docs/Homebrew/Cmd/Reinstall.html deleted file mode 100644 index b19432ab2..000000000 --- a/docs/Homebrew/Cmd/Reinstall.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Reinstall - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Reinstall - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/reinstall.rb,
- sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Reinstall::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-
-
# File 'cmd/reinstall.rb', line 110
-
-def run
-  formulae, casks = T.cast(
-    args.named.to_formulae_and_casks(method: :resolve).partition { _1.is_a?(Formula) },
-    [T::Array[Formula], T::Array[Cask::Cask]],
-  )
-
-  if args.build_from_source?
-    unless DevelopmentTools.installed?
-      raise BuildFlagsError.new(["--build-from-source"], bottled: formulae.all?(&:bottled?))
-    end
-
-    unless Homebrew::EnvConfig.developer?
-      opoo "building from source is not supported!"
-      puts "You're on your own. Failures are expected so don't create any issues, please!"
-    end
-  end
-
-  Install.perform_preinstall_checks
-
-  formulae.each do |formula|
-    if formula.pinned?
-      onoe "#{formula.full_name} is pinned. You must unpin it to reinstall."
-      next
-    end
-    Migrator.migrate_if_needed(formula, force: args.force?)
-    Homebrew.reinstall_formula(
-      formula,
-      flags:                      args.flags_only,
-      installed_on_request:       args.named.present?,
-      force_bottle:               args.force_bottle?,
-      build_from_source_formulae: args.build_from_source_formulae,
-      interactive:                args.interactive?,
-      keep_tmp:                   args.keep_tmp?,
-      debug_symbols:              args.debug_symbols?,
-      force:                      args.force?,
-      debug:                      args.debug?,
-      quiet:                      args.quiet?,
-      verbose:                    args.verbose?,
-      git:                        args.git?,
-    )
-    Cleanup.install_formula_clean!(formula)
-  end
-
-  Upgrade.check_installed_dependents(
-    formulae,
-    flags:                      args.flags_only,
-    installed_on_request:       args.named.present?,
-    force_bottle:               args.force_bottle?,
-    build_from_source_formulae: args.build_from_source_formulae,
-    interactive:                args.interactive?,
-    keep_tmp:                   args.keep_tmp?,
-    debug_symbols:              args.debug_symbols?,
-    force:                      args.force?,
-    debug:                      args.debug?,
-    quiet:                      args.quiet?,
-    verbose:                    args.verbose?,
-  )
-
-  if casks.any?
-    Cask::Reinstall.reinstall_casks(
-      *casks,
-      binaries:       args.binaries?,
-      verbose:        args.verbose?,
-      force:          args.force?,
-      require_sha:    args.require_sha?,
-      skip_cask_deps: args.skip_cask_deps?,
-      quarantine:     args.quarantine?,
-      zap:            args.zap?,
-    )
-  end
-
-  Cleanup.periodic_clean!
-
-  Homebrew.messages.display_messages(display_times: args.display_times?)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Reinstall/Args.html b/docs/Homebrew/Cmd/Reinstall/Args.html deleted file mode 100644 index fdf4e1823..000000000 --- a/docs/Homebrew/Cmd/Reinstall/Args.html +++ /dev/null @@ -1,2999 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Reinstall::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Reinstall::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #adopt?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 15
-
-def adopt?; end
-
-
- -
-

- - #appdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 18
-
-def appdir; end
-
-
- -
-

- - #audio_unit_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 21
-
-def audio_unit_plugindir; end
-
-
- -
-

- - #binaries?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 24
-
-def binaries?; end
-
-
- -
-

- - #build_from_source?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 27
-
-def build_from_source?; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 30
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 33
-
-def casks?; end
-
-
- -
-

- - #colorpickerdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 36
-
-def colorpickerdir; end
-
-
- -
-

- - #debug_symbols?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 39
-
-def debug_symbols?; end
-
-
- -
-

- - #dictionarydirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 42
-
-def dictionarydir; end
-
-
- -
-

- - #display_times?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 45
-
-def display_times?; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 48
-
-def f?; end
-
-
- -
-

- - #fontdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 51
-
-def fontdir; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 54
-
-def force?; end
-
-
- -
-

- - #force_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 57
-
-def force_bottle?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 60
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 63
-
-def formulae?; end
-
-
- -
-

- - #g?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 66
-
-def g?; end
-
-
- -
-

- - #git?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 69
-
-def git?; end
-
-
- -
-

- - #i?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 72
-
-def i?; end
-
-
- -
-

- - #input_methoddirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 75
-
-def input_methoddir; end
-
-
- -
-

- - #interactive?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 78
-
-def interactive?; end
-
-
- -
-

- - #internet_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 81
-
-def internet_plugindir; end
-
-
- -
-

- - #keep_tmp?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 84
-
-def keep_tmp?; end
-
-
- -
-

- - #keyboard_layoutdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-87
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 87
-
-def keyboard_layoutdir; end
-
-
- -
-

- - #languageArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-90
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 90
-
-def language; end
-
-
- -
-

- - #mdimporterdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-93
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 93
-
-def mdimporterdir; end
-
-
- -
-

- - #prefpanedirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 96
-
-def prefpanedir; end
-
-
- -
-

- - #qlplugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-99
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 99
-
-def qlplugindir; end
-
-
- -
-

- - #quarantine?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-102
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 102
-
-def quarantine?; end
-
-
- -
-

- - #require_sha?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 105
-
-def require_sha?; end
-
-
- -
-

- - #s?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-108
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 108
-
-def s?; end
-
-
- -
-

- - #screen_saverdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-111
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 111
-
-def screen_saverdir; end
-
-
- -
-

- - #servicedirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-114
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 114
-
-def servicedir; end
-
-
- -
-

- - #skip_cask_deps?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-117
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 117
-
-def skip_cask_deps?; end
-
-
- -
-

- - #vst3_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-120
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 120
-
-def vst3_plugindir; end
-
-
- -
-

- - #vst_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-123
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 123
-
-def vst_plugindir; end
-
-
- -
-

- - #zap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-126
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/reinstall.rbi', line 126
-
-def zap?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Repository.html b/docs/Homebrew/Cmd/Repository.html deleted file mode 100644 index 25301831e..000000000 --- a/docs/Homebrew/Cmd/Repository.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Repository - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Repository - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/--repository.rb,
- sorbet/rbi/dsl/homebrew/cmd/repository.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Class Method Details

- - -
-

- - .command_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'cmd/--repository.rb', line 10
-
-def self.command_name = "--repository"
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Repository::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/repository.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'cmd/--repository.rb', line 23
-
-def run
-  if args.no_named?
-    puts HOMEBREW_REPOSITORY
-  else
-    puts args.named.to_taps.map(&:path)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Repository/Args.html b/docs/Homebrew/Cmd/Repository/Args.html deleted file mode 100644 index 38efc9f30..000000000 --- a/docs/Homebrew/Cmd/Repository/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Repository::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Repository::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/repository.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/SearchCmd.html b/docs/Homebrew/Cmd/SearchCmd.html deleted file mode 100644 index c797f40ef..000000000 --- a/docs/Homebrew/Cmd/SearchCmd.html +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::SearchCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::SearchCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/search.rb,
- sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
PACKAGE_MANAGERS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  repology:  ->(query) { "https://repology.org/projects/?search=#{query}" },
-  macports:  ->(query) { "https://ports.macports.org/search/?q=#{query}" },
-  fink:      ->(query) { "https://pdb.finkproject.org/pdb/browse.php?summary=#{query}" },
-  opensuse:  ->(query) { "https://software.opensuse.org/search?q=#{query}" },
-  fedora:    ->(query) { "https://packages.fedoraproject.org/search?query=#{query}" },
-  archlinux: ->(query) { "https://archlinux.org/packages/?q=#{query}" },
-  debian:    lambda { |query|
-    "https://packages.debian.org/search?keywords=#{query}&searchon=names&suite=all&section=all"
-  },
-  ubuntu:    lambda { |query|
-    "https://packages.ubuntu.com/search?keywords=#{query}&searchon=names&suite=all&section=all"
-  },
-}.freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::SearchCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-
-
# File 'cmd/search.rb', line 66
-
-def run
-  return if search_package_manager
-
-  query = args.named.join(" ")
-  string_or_regex = Search.query_regexp(query)
-
-  if args.desc?
-    if !args.eval_all? && !Homebrew::EnvConfig.eval_all?
-      raise UsageError, "`brew search --desc` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!"
-    end
-
-    Search.search_descriptions(string_or_regex, args)
-  elsif args.pull_request?
-    search_pull_requests(query)
-  else
-    formulae, casks = Search.search_names(string_or_regex, args)
-    print_results(formulae, casks, query)
-  end
-
-  puts "Use `brew desc` to list packages with a short description." if args.verbose?
-
-  print_regex_help
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/SearchCmd/Args.html b/docs/Homebrew/Cmd/SearchCmd/Args.html deleted file mode 100644 index 7a450e82d..000000000 --- a/docs/Homebrew/Cmd/SearchCmd/Args.html +++ /dev/null @@ -1,1445 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::SearchCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::SearchCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #archlinux?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 15
-
-def archlinux?; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 18
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 21
-
-def casks?; end
-
-
- -
-

- - #closed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 24
-
-def closed?; end
-
-
- -
-

- - #debian?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 27
-
-def debian?; end
-
-
- -
-

- - #desc?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 30
-
-def desc?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 33
-
-def eval_all?; end
-
-
- -
-

- - #fedora?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 36
-
-def fedora?; end
-
-
- -
-

- - #fink?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 39
-
-def fink?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 42
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 45
-
-def formulae?; end
-
-
- -
-

- - #macports?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 48
-
-def macports?; end
-
-
- -
-

- - #open?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 51
-
-def open?; end
-
-
- -
-

- - #opensuse?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 54
-
-def opensuse?; end
-
-
- -
-

- - #pull_request?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 57
-
-def pull_request?; end
-
-
- -
-

- - #repology?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 60
-
-def repology?; end
-
-
- -
-

- - #ubuntu?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 63
-
-def ubuntu?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/TapCmd.html b/docs/Homebrew/Cmd/TapCmd.html deleted file mode 100644 index 9efe0e8b4..000000000 --- a/docs/Homebrew/Cmd/TapCmd.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::TapCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::TapCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/tap.rb,
- sorbet/rbi/dsl/homebrew/cmd/tap_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::TapCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/tap_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# File 'cmd/tap.rb', line 51
-
-def run
-  if args.repair?
-    Tap.installed.each do |tap|
-      tap.link_completions_and_manpages
-      tap.fix_remote_configuration
-    end
-  elsif args.no_named?
-    puts Tap.installed.sort_by(&:name)
-  else
-    tap = Tap.fetch(args.named.first)
-    begin
-      tap.install clone_target:  args.named.second,
-                  custom_remote: args.custom_remote?,
-                  quiet:         args.quiet?,
-                  verify:        args.eval_all? || Homebrew::EnvConfig.eval_all?,
-                  force:         args.force?
-    rescue TapRemoteMismatchError, TapNoCustomRemoteError => e
-      odie e
-    rescue TapAlreadyTappedError
-      nil
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/TapCmd/Args.html b/docs/Homebrew/Cmd/TapCmd/Args.html deleted file mode 100644 index 6c68323da..000000000 --- a/docs/Homebrew/Cmd/TapCmd/Args.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::TapCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::TapCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/tap_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #custom_remote?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/tap_cmd.rbi', line 15
-
-def custom_remote?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/tap_cmd.rbi', line 18
-
-def eval_all?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/tap_cmd.rbi', line 21
-
-def force?; end
-
-
- -
-

- - #force_auto_update?String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/tap_cmd.rbi', line 24
-
-def force_auto_update?; end
-
-
- -
-

- - #repair?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/tap_cmd.rbi', line 27
-
-def repair?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/TapInfo.html b/docs/Homebrew/Cmd/TapInfo.html deleted file mode 100644 index 70c595bed..000000000 --- a/docs/Homebrew/Cmd/TapInfo.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::TapInfo - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::TapInfo - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/tap-info.rb,
- sorbet/rbi/dsl/homebrew/cmd/tap_info.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::TapInfo::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/tap_info.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
# File 'cmd/tap-info.rb', line 25
-
-def run
-  taps = if args.installed?
-    Tap
-  else
-    args.named.to_taps
-  end
-
-  if args.json
-    raise UsageError, "invalid JSON version: #{args.json}" unless ["v1", true].include? args.json
-
-    print_tap_json(taps.sort_by(&:to_s))
-  else
-    print_tap_info(taps.sort_by(&:to_s))
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/TapInfo/Args.html b/docs/Homebrew/Cmd/TapInfo/Args.html deleted file mode 100644 index 9d6fa2bac..000000000 --- a/docs/Homebrew/Cmd/TapInfo/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::TapInfo::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::TapInfo::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/tap_info.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/tap_info.rbi', line 15
-
-def installed?; end
-
-
- -
-

- - #jsonString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/tap_info.rbi', line 18
-
-def json; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/UninstallCmd.html b/docs/Homebrew/Cmd/UninstallCmd.html deleted file mode 100644 index 1b8f5b0b5..000000000 --- a/docs/Homebrew/Cmd/UninstallCmd.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::UninstallCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::UninstallCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/uninstall.rb,
- sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::UninstallCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-
-
# File 'cmd/uninstall.rb', line 43
-
-def run
-  all_kegs, casks = args.named.to_kegs_to_casks(
-    ignore_unavailable: args.force?,
-    all_kegs:           args.force?,
-  )
-
-  # If ignore_unavailable is true and the named args
-  # are a series of invalid kegs and casks,
-  # #to_kegs_to_casks will return empty arrays.
-  return if all_kegs.blank? && casks.blank?
-
-  kegs_by_rack = all_kegs.group_by(&:rack)
-
-  Uninstall.uninstall_kegs(
-    kegs_by_rack,
-    casks:,
-    force:               args.force?,
-    ignore_dependencies: args.ignore_dependencies?,
-    named_args:          args.named,
-  )
-
-  if args.zap?
-    casks.each do |cask|
-      odebug "Zapping Cask #{cask}"
-
-      raise Cask::CaskNotInstalledError, cask if !cask.installed? && !args.force?
-
-      Cask::Installer.new(cask, verbose: args.verbose?, force: args.force?).zap
-    end
-  else
-    Cask::Uninstall.uninstall_casks(
-      *casks,
-      verbose: args.verbose?,
-      force:   args.force?,
-    )
-  end
-
-  if ENV["HOMEBREW_AUTOREMOVE"].present?
-    opoo "HOMEBREW_AUTOREMOVE is now a no-op as it is the default behaviour. " \
-         "Set HOMEBREW_NO_AUTOREMOVE=1 to disable it."
-  end
-  Cleanup.autoremove unless Homebrew::EnvConfig.no_autoremove?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/UninstallCmd/Args.html b/docs/Homebrew/Cmd/UninstallCmd/Args.html deleted file mode 100644 index 443e862c1..000000000 --- a/docs/Homebrew/Cmd/UninstallCmd/Args.html +++ /dev/null @@ -1,779 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::UninstallCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::UninstallCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi', line 21
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi', line 24
-
-def force?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi', line 27
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi', line 30
-
-def formulae?; end
-
-
- -
-

- - #ignore_dependencies?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi', line 33
-
-def ignore_dependencies?; end
-
-
- -
-

- - #zap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.rbi', line 36
-
-def zap?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/UnlinkCmd.html b/docs/Homebrew/Cmd/UnlinkCmd.html deleted file mode 100644 index 95590a23b..000000000 --- a/docs/Homebrew/Cmd/UnlinkCmd.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::UnlinkCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::UnlinkCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/unlink.rb,
- sorbet/rbi/dsl/homebrew/cmd/unlink_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::UnlinkCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/unlink_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'cmd/unlink.rb', line 24
-
-def run
-  options = { dry_run: args.dry_run?, verbose: args.verbose? }
-
-  args.named.to_default_kegs.each do |keg|
-    if args.dry_run?
-      puts "Would remove:"
-      keg.unlink(**options)
-      next
-    end
-
-    Unlink.unlink(keg, dry_run: args.dry_run?, verbose: args.verbose?)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/UnlinkCmd/Args.html b/docs/Homebrew/Cmd/UnlinkCmd/Args.html deleted file mode 100644 index 935f17070..000000000 --- a/docs/Homebrew/Cmd/UnlinkCmd/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::UnlinkCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::UnlinkCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/unlink_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/unlink_cmd.rbi', line 15
-
-def dry_run?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/unlink_cmd.rbi', line 18
-
-def n?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Unpin.html b/docs/Homebrew/Cmd/Unpin.html deleted file mode 100644 index fedb43116..000000000 --- a/docs/Homebrew/Cmd/Unpin.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Unpin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Unpin - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/unpin.rb,
- sorbet/rbi/dsl/homebrew/cmd/unpin.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Unpin::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/unpin.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'cmd/unpin.rb', line 20
-
-def run
-  args.named.to_resolved_formulae.each do |f|
-    if f.pinned?
-      f.unpin
-    elsif !f.pinnable?
-      onoe "#{f.name} not installed"
-    else
-      opoo "#{f.name} not pinned"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Unpin/Args.html b/docs/Homebrew/Cmd/Unpin/Args.html deleted file mode 100644 index 05bc1e872..000000000 --- a/docs/Homebrew/Cmd/Unpin/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Unpin::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Unpin::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/unpin.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Untap.html b/docs/Homebrew/Cmd/Untap.html deleted file mode 100644 index d47939d18..000000000 --- a/docs/Homebrew/Cmd/Untap.html +++ /dev/null @@ -1,607 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Untap - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Untap - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/untap.rb,
- sorbet/rbi/dsl/homebrew/cmd/untap.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Untap::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/untap.rbi', line 10
-
-def args; end
-
-
- -
-

- - #installed_casks_for(tap:) ⇒ Array<Cask::Cask> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

All installed casks currently available in a tap by cask full name.

- - -
-
-
-

Parameters:

-
    - -
  • - - tap - - - (Tap) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'cmd/untap.rb', line 69
-
-def installed_casks_for(tap:)
-  tap.cask_tokens.filter_map do |cask_token|
-    next unless installed_cask_tokens.include?(T.must(cask_token.split("/").last))
-
-    cask = begin
-      Cask::CaskLoader.load(cask_token)
-    rescue Cask::CaskUnavailableError
-      # Don't blow up because of a single unavailable cask.
-      next
-    end
-
-    cask if cask.installed?
-  end
-end
-
-
- -
-

- - #installed_formulae_for(tap:) ⇒ Array<Formula> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

All installed formulae currently available in a tap by formula full name.

- - -
-
-
-

Parameters:

-
    - -
  • - - tap - - - (Tap) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'cmd/untap.rb', line 50
-
-def installed_formulae_for(tap:)
-  tap.formula_names.filter_map do |formula_name|
-    next unless installed_formulae_names.include?(T.must(formula_name.split("/").last))
-
-    formula = begin
-      Formulary.factory(formula_name)
-    rescue FormulaUnavailableError
-      # Don't blow up because of a single unavailable formula.
-      next
-    end
-
-    # Can't use Formula#any_version_installed? because it doesn't consider
-    # taps correctly.
-    formula if formula.installed_kegs.any? { |keg| keg.tab.tap == tap }
-  end
-end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-
-
# File 'cmd/untap.rb', line 20
-
-def run
-  args.named.to_installed_taps.each do |tap|
-    odie "Untapping #{tap} is not allowed" if tap.core_tap? && Homebrew::EnvConfig.no_install_from_api?
-
-    if Homebrew::EnvConfig.no_install_from_api? || (!tap.core_tap? && !tap.core_cask_tap?)
-      installed_tap_formulae = installed_formulae_for(tap:)
-      installed_tap_casks = installed_casks_for(tap:)
-
-      if installed_tap_formulae.present? || installed_tap_casks.present?
-        installed_names = (installed_tap_formulae + installed_tap_casks.map(&:token)).join("\n")
-        if args.force? || Homebrew::EnvConfig.developer?
-          opoo <<~EOS
-            Untapping #{tap} even though it contains the following installed formulae or casks:
-            #{installed_names}
-          EOS
-        else
-          odie <<~EOS
-            Refusing to untap #{tap} because it contains the following installed formulae or casks:
-            #{installed_names}
-          EOS
-        end
-      end
-    end
-
-    tap.uninstall manual: true
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Untap/Args.html b/docs/Homebrew/Cmd/Untap/Args.html deleted file mode 100644 index e04c18ee8..000000000 --- a/docs/Homebrew/Cmd/Untap/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Untap::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Untap::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/untap.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/untap.rbi', line 15
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/untap.rbi', line 18
-
-def force?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/UpdateReport.html b/docs/Homebrew/Cmd/UpdateReport.html deleted file mode 100644 index 5288ed1b4..000000000 --- a/docs/Homebrew/Cmd/UpdateReport.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::UpdateReport - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::UpdateReport - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/update-report.rb,
- sorbet/rbi/dsl/homebrew/cmd/update_report.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::UpdateReport::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/update_report.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'cmd/update-report.rb', line 32
-
-def run
-  return output_update_report if $stdout.tty?
-
-  redirect_stdout($stderr) do
-    output_update_report
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/UpdateReport/Args.html b/docs/Homebrew/Cmd/UpdateReport/Args.html deleted file mode 100644 index fa239d752..000000000 --- a/docs/Homebrew/Cmd/UpdateReport/Args.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::UpdateReport::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::UpdateReport::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/update_report.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #auto_update?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/update_report.rbi', line 15
-
-def auto_update?; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/update_report.rbi', line 18
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/update_report.rbi', line 21
-
-def force?; end
-
-
- -
-

- - #preinstall?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/update_report.rbi', line 24
-
-def preinstall?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/UpgradeCmd.html b/docs/Homebrew/Cmd/UpgradeCmd.html deleted file mode 100644 index 1f445d5d1..000000000 --- a/docs/Homebrew/Cmd/UpgradeCmd.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::UpgradeCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::UpgradeCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/upgrade.rb,
- sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::UpgradeCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-
-
# File 'cmd/upgrade.rb', line 126
-
-def run
-  # Disabled since this is now the default behavior.
-  odisabled "`brew upgrade --ignore-pinned`" if args.ignore_pinned?
-
-  formulae, casks = args.named.to_resolved_formulae_to_casks
-  # If one or more formulae are specified, but no casks were
-  # specified, we want to make note of that so we don't
-  # try to upgrade all outdated casks.
-  only_upgrade_formulae = formulae.present? && casks.blank?
-  only_upgrade_casks = casks.present? && formulae.blank?
-
-  upgrade_outdated_formulae(formulae) unless only_upgrade_casks
-  upgrade_outdated_casks(casks) unless only_upgrade_formulae
-
-  Cleanup.periodic_clean!(dry_run: args.dry_run?)
-
-  Homebrew.messages.display_messages(display_times: args.display_times?)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/UpgradeCmd/Args.html b/docs/Homebrew/Cmd/UpgradeCmd/Args.html deleted file mode 100644 index 41ad242b5..000000000 --- a/docs/Homebrew/Cmd/UpgradeCmd/Args.html +++ /dev/null @@ -1,3369 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::UpgradeCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::UpgradeCmd::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #appdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 15
-
-def appdir; end
-
-
- -
-

- - #audio_unit_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 18
-
-def audio_unit_plugindir; end
-
-
- -
-

- - #binaries?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 21
-
-def binaries?; end
-
-
- -
-

- - #build_from_source?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 24
-
-def build_from_source?; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 27
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 30
-
-def casks?; end
-
-
- -
-

- - #colorpickerdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 33
-
-def colorpickerdir; end
-
-
- -
-

- - #debug_symbols?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 36
-
-def debug_symbols?; end
-
-
- -
-

- - #dictionarydirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 39
-
-def dictionarydir; end
-
-
- -
-

- - #display_times?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 42
-
-def display_times?; end
-
-
- -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 45
-
-def dry_run?; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 48
-
-def f?; end
-
-
- -
-

- - #fetch_HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 51
-
-def fetch_HEAD?; end
-
-
- -
-

- - #fontdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 54
-
-def fontdir; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 57
-
-def force?; end
-
-
- -
-

- - #force_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 60
-
-def force_bottle?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 63
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 66
-
-def formulae?; end
-
-
- -
-

- - #g?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 69
-
-def g?; end
-
-
- -
-

- - #greedy?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 72
-
-def greedy?; end
-
-
- -
-

- - #greedy_auto_updates?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 75
-
-def greedy_auto_updates?; end
-
-
- -
-

- - #greedy_latest?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 78
-
-def greedy_latest?; end
-
-
- -
-

- - #i?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 81
-
-def i?; end
-
-
- -
-

- - #ignore_pinned?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 84
-
-def ignore_pinned?; end
-
-
- -
-

- - #input_methoddirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-87
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 87
-
-def input_methoddir; end
-
-
- -
-

- - #interactive?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 90
-
-def interactive?; end
-
-
- -
-

- - #internet_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-93
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 93
-
-def internet_plugindir; end
-
-
- -
-

- - #keep_tmp?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 96
-
-def keep_tmp?; end
-
-
- -
-

- - #keyboard_layoutdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-99
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 99
-
-def keyboard_layoutdir; end
-
-
- -
-

- - #languageArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-102
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 102
-
-def language; end
-
-
- -
-

- - #mdimporterdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 105
-
-def mdimporterdir; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-108
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 108
-
-def n?; end
-
-
- -
-

- - #overwrite?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-111
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 111
-
-def overwrite?; end
-
-
- -
-

- - #prefpanedirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-114
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 114
-
-def prefpanedir; end
-
-
- -
-

- - #qlplugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-117
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 117
-
-def qlplugindir; end
-
-
- -
-

- - #quarantine?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-120
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 120
-
-def quarantine?; end
-
-
- -
-

- - #require_sha?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-123
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 123
-
-def require_sha?; end
-
-
- -
-

- - #s?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-126
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 126
-
-def s?; end
-
-
- -
-

- - #screen_saverdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-129
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 129
-
-def screen_saverdir; end
-
-
- -
-

- - #servicedirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-132
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 132
-
-def servicedir; end
-
-
- -
-

- - #skip_cask_deps?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-135
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 135
-
-def skip_cask_deps?; end
-
-
- -
-

- - #vst3_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-138
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 138
-
-def vst3_plugindir; end
-
-
- -
-

- - #vst_plugindirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-141
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/upgrade_cmd.rbi', line 141
-
-def vst_plugindir; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Uses.html b/docs/Homebrew/Cmd/Uses.html deleted file mode 100644 index f6474f7d3..000000000 --- a/docs/Homebrew/Cmd/Uses.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Uses - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Uses - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
DependenciesHelpers
-
- - - - - - -
-
Defined in:
-
cmd/uses.rb,
- sorbet/rbi/dsl/homebrew/cmd/uses.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

brew uses foo bar returns formulae that use both foo and bar -If you want the union, run the command twice and concatenate the results. -The intersection is harder to achieve with shell tools.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from DependenciesHelpers

-

#args_includes_ignores, dependents, #recursive_includes, #select_includes

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::Cmd::Uses::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-
-
# File 'cmd/uses.rb', line 57
-
-def run
-  Formulary.enable_factory_cache!
-
-  used_formulae_missing = false
-  used_formulae = begin
-    args.named.to_formulae
-  rescue FormulaUnavailableError => e
-    opoo e
-    used_formulae_missing = true
-    # If the formula doesn't exist: fake the needed formula object name.
-    # This is a legacy use of OpenStruct that should be refactored.
-    # rubocop:disable Style/OpenStructUse
-    args.named.map { |name| OpenStruct.new name:, full_name: name }
-    # rubocop:enable Style/OpenStructUse
-  end
-
-  use_runtime_dependents = args.installed? &&
-                           !used_formulae_missing &&
-                           !args.include_build? &&
-                           !args.include_test? &&
-                           !args.include_optional? &&
-                           !args.skip_recommended?
-
-  uses = intersection_of_dependents(use_runtime_dependents, used_formulae)
-
-  return if uses.empty?
-
-  puts Formatter.columns(uses.map(&:full_name).sort)
-  odie "Missing formulae should not have dependents!" if used_formulae_missing
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Cmd/Uses/Args.html b/docs/Homebrew/Cmd/Uses/Args.html deleted file mode 100644 index d4cd3f905..000000000 --- a/docs/Homebrew/Cmd/Uses/Args.html +++ /dev/null @@ -1,1075 +0,0 @@ - - - - - - - Class: Homebrew::Cmd::Uses::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Cmd::Uses::Args - - - Private -

-
- -
-
Inherits:
-
- Homebrew::CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/cmd/uses.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Homebrew::CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Homebrew::CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 21
-
-def eval_all?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 24
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 27
-
-def formulae?; end
-
-
- -
-

- - #include_build?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 30
-
-def include_build?; end
-
-
- -
-

- - #include_optional?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 33
-
-def include_optional?; end
-
-
- -
-

- - #include_test?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 36
-
-def include_test?; end
-
-
- -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 39
-
-def installed?; end
-
-
- -
-

- - #missing?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 42
-
-def missing?; end
-
-
- -
-

- - #recursive?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 45
-
-def recursive?; end
-
-
- -
-

- - #skip_recommended?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/cmd/uses.rbi', line 48
-
-def skip_recommended?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Completions.html b/docs/Homebrew/Completions.html deleted file mode 100644 index 77180991d..000000000 --- a/docs/Homebrew/Completions.html +++ /dev/null @@ -1,2079 +0,0 @@ - - - - - - - Module: Homebrew::Completions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Completions - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
completions.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for generating shell completions.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Variables - - -

- - -

- Constant Summary - collapse -

- -
- -
COMPLETIONS_DIR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_REPOSITORY/"completions").freeze
- -
TEMPLATE_DIR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_LIBRARY_PATH/"completions").freeze
- -
SHELLS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[bash fish zsh].freeze
- -
COMPLETIONS_EXCLUSION_LIST = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[
-  instal
-  uninstal
-  update-report
-].freeze
- -
BASH_NAMED_ARGS_COMPLETION_FUNCTION_MAPPING = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  formula:           "__brew_complete_formulae",
-  installed_formula: "__brew_complete_installed_formulae",
-  outdated_formula:  "__brew_complete_outdated_formulae",
-  cask:              "__brew_complete_casks",
-  installed_cask:    "__brew_complete_installed_casks",
-  outdated_cask:     "__brew_complete_outdated_casks",
-  tap:               "__brew_complete_tapped",
-  installed_tap:     "__brew_complete_tapped",
-  command:           "__brew_complete_commands",
-  diagnostic_check:  '__brewcomp "${__HOMEBREW_DOCTOR_CHECKS=$(brew doctor --list-checks)}"',
-  file:              "__brew_complete_files",
-}.freeze
- -
ZSH_NAMED_ARGS_COMPLETION_FUNCTION_MAPPING = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  formula:           "__brew_formulae",
-  installed_formula: "__brew_installed_formulae",
-  outdated_formula:  "__brew_outdated_formulae",
-  cask:              "__brew_casks",
-  installed_cask:    "__brew_installed_casks",
-  outdated_cask:     "__brew_outdated_casks",
-  tap:               "__brew_any_tap",
-  installed_tap:     "__brew_installed_taps",
-  command:           "__brew_commands",
-  diagnostic_check:  "__brew_diagnostic_checks",
-  file:              "__brew_formulae_or_ruby_files",
-}.freeze
- -
FISH_NAMED_ARGS_COMPLETION_FUNCTION_MAPPING = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  formula:           "__fish_brew_suggest_formulae_all",
-  installed_formula: "__fish_brew_suggest_formulae_installed",
-  outdated_formula:  "__fish_brew_suggest_formulae_outdated",
-  cask:              "__fish_brew_suggest_casks_all",
-  installed_cask:    "__fish_brew_suggest_casks_installed",
-  outdated_cask:     "__fish_brew_suggest_casks_outdated",
-  tap:               "__fish_brew_suggest_taps_installed",
-  installed_tap:     "__fish_brew_suggest_taps_installed",
-  command:           "__fish_brew_suggest_commands",
-  diagnostic_check:  "__fish_brew_suggest_diagnostic_checks",
-}.freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .command_gets_completions?(command) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - command - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-133
-134
-135
-
-
# File 'completions.rb', line 133
-
-def self.command_gets_completions?(command)
-  command_options(command).any?
-end
-
-
- -
-

- - .command_options(command) ⇒ Hash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - command - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-
-
# File 'completions.rb', line 148
-
-def self.command_options(command)
-  options = {}
-  Commands.command_options(command)&.each do |option|
-    next if option.blank?
-
-    name = option.first
-    desc = option.second
-    if name.start_with? "--[no-]"
-      options[name.gsub("[no-]", "")] = desc
-      options[name.sub("[no-]", "no-")] = desc
-    else
-      options[name] = desc
-    end
-  end
-  options
-end
-
-
- -
-

- - .completions_to_link?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'completions.rb', line 94
-
-def self.completions_to_link?
-  Tap.installed.each do |tap|
-    next if tap.official?
-
-    SHELLS.each do |shell|
-      return true if (tap.path/"completions/#{shell}").exist?
-    end
-  end
-
-  false
-end
-
-
- -
-

- - .format_description(description, fish: false) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - description - - - (String) - - - -
  • - -
  • - - fish - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-138
-139
-140
-141
-142
-143
-144
-145
-
-
# File 'completions.rb', line 138
-
-def self.format_description(description, fish: false)
-  description = if fish
-    description.gsub("'", "\\\\'")
-  else
-    description.gsub("'", "'\\\\''")
-  end
-  description.gsub(/[<>]/, "").tr("\n", " ").chomp(".")
-end
-
-
- -
-

- - .generate_bash_completion_file(commands) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-
-
# File 'completions.rb', line 199
-
-def self.generate_bash_completion_file(commands)
-  variables = Variables.new(
-    completion_functions: commands.filter_map do |command|
-      generate_bash_subcommand_completion command
-    end,
-    function_mappings:    commands.filter_map do |command|
-      next unless command_gets_completions? command
-
-      "#{command}) _brew_#{Commands.method_name command} ;;"
-    end,
-  )
-
-  ERB.new((TEMPLATE_DIR/"bash.erb").read, trim_mode: ">").result(variables.instance_eval { binding })
-end
-
-
- -
-

- - .generate_bash_subcommand_completion(command) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - command - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-
-
# File 'completions.rb', line 166
-
-def self.generate_bash_subcommand_completion(command)
-  return unless command_gets_completions? command
-
-  named_completion_string = ""
-  if (types = Commands.named_args_type(command))
-    named_args_strings, named_args_types = types.partition { |type| type.is_a? String }
-
-    named_args_types.each do |type|
-      next unless BASH_NAMED_ARGS_COMPLETION_FUNCTION_MAPPING.key? type
-
-      named_completion_string += "\n  #{BASH_NAMED_ARGS_COMPLETION_FUNCTION_MAPPING[type]}"
-    end
-
-    named_completion_string += "\n  __brewcomp \"#{named_args_strings.join(" ")}\"" if named_args_strings.any?
-  end
-
-  <<~COMPLETION
-    _brew_#{Commands.method_name command}() {
-      local cur="${COMP_WORDS[COMP_CWORD]}"
-      case "${cur}" in
-        -*)
-          __brewcomp "
-          #{command_options(command).keys.sort.join("\n      ")}
-          "
-          return
-          ;;
-        *) ;;
-      esac#{named_completion_string}
-    }
-  COMPLETION
-end
-
-
- -
-

- - .generate_fish_completion_file(commands) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-349
-350
-351
-352
-353
-354
-355
-356
-357
-
-
# File 'completions.rb', line 349
-
-def self.generate_fish_completion_file(commands)
-  variables = Variables.new(
-    completion_functions: commands.filter_map do |command|
-      generate_fish_subcommand_completion command
-    end,
-  )
-
-  ERB.new((TEMPLATE_DIR/"fish.erb").read, trim_mode: ">").result(variables.instance_eval { binding })
-end
-
-
- -
-

- - .generate_fish_subcommand_completion(command) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - command - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-
-
# File 'completions.rb', line 302
-
-def self.generate_fish_subcommand_completion(command)
-  return unless command_gets_completions? command
-
-  command_description = format_description Commands.command_description(command, short: true), fish: true
-  lines = ["__fish_brew_complete_cmd '#{command}' '#{command_description}'"]
-
-  options = command_options(command).sort.filter_map do |opt, desc|
-    arg_line = "__fish_brew_complete_arg '#{command}' -l #{opt.sub(/^-+/, "")}"
-    arg_line += " -d '#{format_description desc, fish: true}'" if desc.present?
-    arg_line
-  end
-
-  subcommands = []
-  named_args = []
-  if (types = Commands.named_args_type(command))
-    named_args_strings, named_args_types = types.partition { |type| type.is_a? String }
-
-    named_args_types.each do |type|
-      next unless FISH_NAMED_ARGS_COMPLETION_FUNCTION_MAPPING.key? type
-
-      named_arg_function = FISH_NAMED_ARGS_COMPLETION_FUNCTION_MAPPING[type]
-      named_arg_prefix = "__fish_brew_complete_arg '#{command}; and not __fish_seen_argument"
-
-      formula_option = command_options(command).key?("--formula")
-      cask_option = command_options(command).key?("--cask")
-
-      named_args << if formula_option && cask_option && type.to_s.end_with?("formula")
-        "#{named_arg_prefix} -l cask -l casks' -a '(#{named_arg_function})'"
-      elsif formula_option && cask_option && type.to_s.end_with?("cask")
-        "#{named_arg_prefix} -l formula -l formulae' -a '(#{named_arg_function})'"
-      else
-        "__fish_brew_complete_arg '#{command}' -a '(#{named_arg_function})'"
-      end
-    end
-
-    named_args_strings.each do |subcommand|
-      subcommands << "__fish_brew_complete_sub_cmd '#{command}' '#{subcommand}'"
-    end
-  end
-
-  lines += subcommands + options + named_args
-  <<~COMPLETION
-    #{lines.join("\n").chomp}
-  COMPLETION
-end
-
-
- -
-

- - .generate_zsh_completion_file(commands) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-
-
# File 'completions.rb', line 275
-
-def self.generate_zsh_completion_file(commands)
-  variables = Variables.new(
-    aliases:                      Commands::HOMEBREW_INTERNAL_COMMAND_ALIASES.filter_map do |alias_cmd, command|
-      alias_cmd = "'#{alias_cmd}'" if alias_cmd.start_with? "-"
-      command = "'#{command}'" if command.start_with? "-"
-      "#{alias_cmd} #{command}"
-    end,
-
-    builtin_command_descriptions: commands.filter_map do |command|
-      next if Commands::HOMEBREW_INTERNAL_COMMAND_ALIASES.key? command
-
-      description = Commands.command_description(command, short: true)
-      next if description.blank?
-
-      description = format_description description
-      "'#{command}:#{description}'"
-    end,
-
-    completion_functions:         commands.filter_map do |command|
-      generate_zsh_subcommand_completion command
-    end,
-  )
-
-  ERB.new((TEMPLATE_DIR/"zsh.erb").read, trim_mode: ">").result(variables.instance_eval { binding })
-end
-
-
- -
-

- - .generate_zsh_option_exclusions(command, option) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-267
-268
-269
-270
-271
-272
-
-
# File 'completions.rb', line 267
-
-def self.generate_zsh_option_exclusions(command, option)
-  conflicts = Commands.option_conflicts(command, option.gsub(/^--/, ""))
-  return "" unless conflicts.presence
-
-  "(#{conflicts.map { |conflict| "--#{conflict}" }.join(" ")})"
-end
-
-
- -
-

- - .generate_zsh_subcommand_completion(command) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - command - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-
-
# File 'completions.rb', line 215
-
-def self.generate_zsh_subcommand_completion(command)
-  return unless command_gets_completions? command
-
-  options = command_options(command)
-
-  args_options = []
-  if (types = Commands.named_args_type(command))
-    named_args_strings, named_args_types = types.partition { |type| type.is_a? String }
-
-    named_args_types.each do |type|
-      next unless ZSH_NAMED_ARGS_COMPLETION_FUNCTION_MAPPING.key? type
-
-      args_options << "- #{type}"
-      opt = "--#{type.to_s.gsub(/(installed|outdated)_/, "")}"
-      if options.key?(opt)
-        desc = options[opt]
-
-        if desc.blank?
-          args_options << opt
-        else
-          conflicts = generate_zsh_option_exclusions(command, opt)
-          args_options << "#{conflicts}#{opt}[#{format_description desc}]"
-        end
-
-        options.delete(opt)
-      end
-      args_options << "*::#{type}:#{ZSH_NAMED_ARGS_COMPLETION_FUNCTION_MAPPING[type]}"
-    end
-
-    if named_args_strings.any?
-      args_options << "- subcommand"
-      args_options << "*::subcommand:(#{named_args_strings.join(" ")})"
-    end
-  end
-
-  options = options.sort.map do |opt, desc|
-    next opt if desc.blank?
-
-    conflicts = generate_zsh_option_exclusions(command, opt)
-    "#{conflicts}#{opt}[#{format_description desc}]"
-  end
-  options += args_options
-
-  <<~COMPLETION
-    # brew #{command}
-    _brew_#{Commands.method_name command}() {
-      _arguments \\
-        #{options.map! { |opt| opt.start_with?("- ") ? opt : "'#{opt}'" }.join(" \\\n    ")}
-    }
-  COMPLETION
-end
-
-
- -
-

- - .link!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-
-
# File 'completions.rb', line 71
-
-def self.link!
-  Settings.write :linkcompletions, true
-  Tap.installed.each do |tap|
-    Utils::Link.link_completions tap.path, "brew completions link"
-  end
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-90
-91
-
-
# File 'completions.rb', line 89
-
-def self.link_completions?
-  Settings.read(:linkcompletions) == "true"
-end
-
-
- -
-

- - .show_completions_message_if_neededvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'completions.rb', line 107
-
-def self.show_completions_message_if_needed
-  return if Settings.read(:completionsmessageshown) == "true"
-  return unless completions_to_link?
-
-  ohai "Homebrew completions for external commands are unlinked by default!"
-  puts <<~EOS
-    To opt-in to automatically linking external tap shell completion files, run:
-      brew completions link
-    Then, follow the directions at #{Formatter.url("https://docs.brew.sh/Shell-Completion")}
-  EOS
-
-  Settings.write :completionsmessageshown, true
-end
-
-
- -
-

- - .unlink!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-79
-80
-81
-82
-83
-84
-85
-86
-
-
# File 'completions.rb', line 79
-
-def self.unlink!
-  Settings.write :linkcompletions, false
-  Tap.installed.each do |tap|
-    next if tap.official?
-
-    Utils::Link.unlink_completions tap.path
-  end
-end
-
-
- -
-

- - .update_shell_completions!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-122
-123
-124
-125
-126
-127
-128
-129
-130
-
-
# File 'completions.rb', line 122
-
-def self.update_shell_completions!
-  commands = Commands.commands(external: false, aliases: true).sort
-
-  puts "Writing completions to #{COMPLETIONS_DIR}"
-
-  (COMPLETIONS_DIR/"bash/brew").atomic_write generate_bash_completion_file(commands)
-  (COMPLETIONS_DIR/"zsh/_brew").atomic_write generate_zsh_completion_file(commands)
-  (COMPLETIONS_DIR/"fish/brew.fish").atomic_write generate_fish_completion_file(commands)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Completions/Variables.html b/docs/Homebrew/Completions/Variables.html deleted file mode 100644 index e1841cf57..000000000 --- a/docs/Homebrew/Completions/Variables.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - - Class: Homebrew::Completions::Variables - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Completions::Variables - - - Private -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
completions.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - - -
-

Instance Attribute Details

- - - -
-

- - #aliasesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute aliases

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of aliases

    -
    - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'completions.rb', line 11
-
-def aliases
-  @aliases
-end
-
-
- - - -
-

- - #builtin_command_descriptionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute builtin_command_descriptions

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of builtin_command_descriptions

    -
    - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'completions.rb', line 11
-
-def builtin_command_descriptions
-  @builtin_command_descriptions
-end
-
-
- - - -
-

- - #completion_functionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute completion_functions

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of completion_functions

    -
    - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'completions.rb', line 11
-
-def completion_functions
-  @completion_functions
-end
-
-
- - - -
-

- - #function_mappingsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute function_mappings

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of function_mappings

    -
    - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'completions.rb', line 11
-
-def function_mappings
-  @function_mappings
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd.html b/docs/Homebrew/DevCmd.html deleted file mode 100644 index 6fe9db031..000000000 --- a/docs/Homebrew/DevCmd.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: Homebrew::DevCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::DevCmd - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/mac/dev-cmd/bottle.rb,
- extend/os/linux/dev-cmd/update-test.rb,
dev-cmd/sh.rb,
dev-cmd/cat.rb,
dev-cmd/irb.rb,
dev-cmd/bump.rb,
dev-cmd/edit.rb,
dev-cmd/prof.rb,
dev-cmd/ruby.rb,
dev-cmd/test.rb,
dev-cmd/audit.rb,
dev-cmd/style.rb,
dev-cmd/tests.rb,
dev-cmd/bottle.rb,
dev-cmd/create.rb,
dev-cmd/unpack.rb,
dev-cmd/extract.rb,
dev-cmd/formula.rb,
dev-cmd/linkage.rb,
dev-cmd/pr-pull.rb,
dev-cmd/release.rb,
dev-cmd/rubydoc.rb,
dev-cmd/tap-new.rb,
dev-cmd/livecheck.rb,
dev-cmd/pr-upload.rb,
dev-cmd/typecheck.rb,
dev-cmd/unbottled.rb,
dev-cmd/pr-publish.rb,
dev-cmd/update-test.rb,
dev-cmd/vendor-gems.rb,
dev-cmd/bump-cask-pr.rb,
dev-cmd/pr-automerge.rb,
dev-cmd/bump-revision.rb,
dev-cmd/contributions.rb,
dev-cmd/bump-formula-pr.rb,
dev-cmd/update-sponsors.rb,
dev-cmd/generate-cask-api.rb,
dev-cmd/update-maintainers.rb,
dev-cmd/update-license-data.rb,
dev-cmd/generate-formula-api.rb,
dev-cmd/install-bundler-gems.rb,
dev-cmd/dispatch-build-bottle.rb,
dev-cmd/bump-unversioned-casks.rb,
dev-cmd/determine-test-runners.rb,
dev-cmd/update-python-resources.rb,
dev-cmd/generate-man-completions.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Audit, Bottle, Bump, BumpCaskPr, BumpFormulaPr, BumpRevision, BumpUnversionedCasks, Cat, Contributions, Create, DetermineTestRunners, DispatchBuildBottle, Edit, Extract, FormulaCmd, GenerateCaskApi, GenerateFormulaApi, GenerateManCompletions, InstallBundlerGems, Irb, Linkage, LivecheckCmd, PrAutomerge, PrPublish, PrPull, PrUpload, Prof, Release, Ruby, Rubydoc, Sh, StyleCmd, TapNew, Test, Tests, Typecheck, Unbottled, Unpack, UpdateLicenseData, UpdateMaintainers, UpdatePythonResources, UpdateSponsors, UpdateTest, VendorGems - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Audit.html b/docs/Homebrew/DevCmd/Audit.html deleted file mode 100644 index e255b56a4..000000000 --- a/docs/Homebrew/DevCmd/Audit.html +++ /dev/null @@ -1,763 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Audit - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Audit - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/audit.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Audit::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-
-
# File 'dev-cmd/audit.rb', line 105
-
-def run
-  Formulary.enable_factory_cache!
-
-  os_arch_combinations = args.os_arch_combinations
-
-  Homebrew.auditing = true
-  Homebrew.inject_dump_stats!(FormulaAuditor, /^audit_/) if args.audit_debug?
-
-  strict = args.new? || args.strict?
-  online = args.new? || args.online?
-  tap_audit = args.tap.present?
-  skip_style = args.skip_style? || args.no_named? || tap_audit
-  no_named_args = T.let(false, T::Boolean)
-
-  gem_groups = ["audit"]
-  gem_groups << "style" unless skip_style
-  Homebrew.install_bundler_gems!(groups: gem_groups)
-
-  ENV.activate_extensions!
-  ENV.setup_build_environment
-
-  audit_formulae, audit_casks = Homebrew.with_no_api_env do # audit requires full Ruby source
-    if args.tap
-      Tap.fetch(T.must(args.tap)).then do |tap|
-        [
-          tap.formula_files.map { |path| Formulary.factory(path) },
-          tap.cask_files.map { |path| Cask::CaskLoader.load(path) },
-        ]
-      end
-    elsif args.installed?
-      no_named_args = true
-      [Formula.installed, Cask::Caskroom.casks]
-    elsif args.no_named?
-      if !args.eval_all? && !Homebrew::EnvConfig.eval_all?
-        # This odisabled should probably stick around indefinitely.
-        odisabled "brew audit",
-                  "brew audit --eval-all or HOMEBREW_EVAL_ALL"
-      end
-      no_named_args = true
-      [
-        Formula.all(eval_all: args.eval_all?),
-        Cask::Cask.all(eval_all: args.eval_all?),
-      ]
-    else
-      if args.named.any? { |named_arg| named_arg.end_with?(".rb") }
-        # This odisabled should probably stick around indefinitely,
-        # until at least we have a way to exclude error on these in the CLI parser.
-        odisabled "brew audit [path ...]",
-                  "brew audit [name ...]"
-      end
-
-      args.named.to_formulae_and_casks_with_taps
-          .partition { |formula_or_cask| formula_or_cask.is_a?(Formula) }
-    end
-  end
-
-  if audit_formulae.empty? && audit_casks.empty? && !args.tap
-    ofail "No matching formulae or casks to audit!"
-    return
-  end
-
-  style_files = args.named.to_paths unless skip_style
-
-  only_cops = args.only_cops
-  except_cops = args.except_cops
-  style_options = { fix: args.fix?, debug: args.debug?, verbose: args.verbose? }
-
-  if only_cops
-    style_options[:only_cops] = only_cops
-  elsif args.new?
-    nil
-  elsif except_cops
-    style_options[:except_cops] = except_cops
-  elsif !strict
-    style_options[:except_cops] = [:FormulaAuditStrict]
-  end
-
-  # Run tap audits first
-  named_arg_taps = [*audit_formulae, *audit_casks].map(&:tap).uniq if !args.tap && !no_named_args
-  tap_problems = Tap.installed.each_with_object({}) do |tap, problems|
-    next if args.tap && tap != args.tap
-    next if named_arg_taps&.exclude?(tap)
-
-    ta = TapAuditor.new(tap, strict: args.strict?)
-    ta.audit
-
-    problems[[tap.name, tap.path]] = ta.problems if ta.problems.any?
-  end
-
-  # Check style in a single batch run up front for performance
-  style_offenses = Style.check_style_json(style_files, **style_options) if style_files
-  # load licenses
-  spdx_license_data = SPDX.license_data
-  spdx_exception_data = SPDX.exception_data
-
-  formula_problems = audit_formulae.sort.each_with_object({}) do |f, problems|
-    path = f.path
-
-    only = only_cops ? ["style"] : args.only
-    options = {
-      new_formula:         args.new?,
-      strict:,
-      online:,
-      git:                 args.git?,
-      only:,
-      except:              args.except,
-      spdx_license_data:,
-      spdx_exception_data:,
-      style_offenses:      style_offenses&.for_path(f.path),
-      tap_audit:,
-    }.compact
-
-    errors = os_arch_combinations.flat_map do |os, arch|
-      SimulateSystem.with(os:, arch:) do
-        odebug "Auditing Formula #{f} on os #{os} and arch #{arch}"
-
-        audit_proc = proc { FormulaAuditor.new(Formulary.factory(path), **options).tap(&:audit) }
-
-        # Audit requires full Ruby source so disable API. We shouldn't do this for taps however so that we
-        # don't unnecessarily require a full Homebrew/core clone.
-        fa = if f.core_formula?
-          Homebrew.with_no_api_env(&audit_proc)
-        else
-          audit_proc.call
-        end
-
-        fa.problems + fa.new_formula_problems
-      end
-    end.uniq
-
-    problems[[f.full_name, path]] = errors if errors.any?
-  end
-
-  require "cask/auditor" if audit_casks.any?
-
-  cask_problems = audit_casks.each_with_object({}) do |cask, problems|
-    path = cask.sourcefile_path
-
-    errors = os_arch_combinations.flat_map do |os, arch|
-      next [] if os == :linux
-
-      SimulateSystem.with(os:, arch:) do
-        odebug "Auditing Cask #{cask} on os #{os} and arch #{arch}"
-
-        Cask::Auditor.audit(
-          Cask::CaskLoader.load(path),
-          # For switches, we add `|| nil` so that `nil` will be passed
-          # instead of `false` if they aren't set.
-          # This way, we can distinguish between "not set" and "set to false".
-          audit_online:          args.online? || nil,
-          audit_strict:          args.strict? || nil,
-
-          # No need for `|| nil` for `--[no-]signing`
-          # because boolean switches are already `nil` if not passed
-          audit_signing:         args.signing?,
-          audit_new_cask:        args.new? || nil,
-          audit_token_conflicts: args.token_conflicts? || nil,
-          quarantine:            true,
-          any_named_args:        !no_named_args,
-          only:                  args.only,
-          except:                args.except,
-        ).to_a
-      end
-    end.uniq
-
-    problems[[cask.full_name, path]] = errors if errors.any?
-  end
-
-  print_problems(tap_problems)
-  print_problems(formula_problems)
-  print_problems(cask_problems)
-
-  tap_count = tap_problems.keys.count
-  formula_count = formula_problems.keys.count
-  cask_count = cask_problems.keys.count
-
-  corrected_problem_count = (formula_problems.values + cask_problems.values)
-                            .sum { |problems| problems.count { |problem| problem.fetch(:corrected) } }
-
-  tap_problem_count = tap_problems.sum { |_, problems| problems.count }
-  formula_problem_count = formula_problems.sum { |_, problems| problems.count }
-  cask_problem_count = cask_problems.sum { |_, problems| problems.count }
-  total_problems_count = formula_problem_count + cask_problem_count + tap_problem_count
-
-  if total_problems_count.positive?
-    errors_summary = Utils.pluralize("problem", total_problems_count, include_count: true)
-
-    error_sources = []
-    if formula_count.positive?
-      error_sources << Utils.pluralize("formula", formula_count, plural: "e", include_count: true)
-    end
-    error_sources << Utils.pluralize("cask", cask_count, include_count: true) if cask_count.positive?
-    error_sources << Utils.pluralize("tap", tap_count, include_count: true) if tap_count.positive?
-
-    errors_summary += " in #{error_sources.to_sentence}" if error_sources.any?
-
-    errors_summary += " detected"
-
-    if corrected_problem_count.positive?
-      errors_summary +=
-        ", #{Utils.pluralize("problem", corrected_problem_count, include_count: true)} corrected"
-    end
-
-    ofail "#{errors_summary}."
-  end
-
-  return unless GitHub::Actions.env_set?
-
-  annotations = formula_problems.merge(cask_problems).flat_map do |(_, path), problems|
-    problems.map do |problem|
-      GitHub::Actions::Annotation.new(
-        :error,
-        problem[:message],
-        file:   path,
-        line:   problem[:location]&.line,
-        column: problem[:location]&.column,
-      )
-    end
-  end.compact
-
-  annotations.each do |annotation|
-    puts annotation if annotation.relevant?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Audit/Args.html b/docs/Homebrew/DevCmd/Audit/Args.html deleted file mode 100644 index 86963d939..000000000 --- a/docs/Homebrew/DevCmd/Audit/Args.html +++ /dev/null @@ -1,2037 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Audit::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Audit::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #archString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 18
-
-def arch; end
-
-
- -
-

- - #audit_debug?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 21
-
-def audit_debug?; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 24
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 27
-
-def casks?; end
-
-
- -
-

- - #D?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 15
-
-def D?; end
-
-
- -
-

- - #display_cop_names?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 30
-
-def display_cop_names?; end
-
-
- -
-

- - #display_filename?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 33
-
-def display_filename?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 36
-
-def eval_all?; end
-
-
- -
-

- - #exceptArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 39
-
-def except; end
-
-
- -
-

- - #except_copsArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 42
-
-def except_cops; end
-
-
- -
-

- - #fix?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 45
-
-def fix?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 48
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 51
-
-def formulae?; end
-
-
- -
-

- - #git?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 54
-
-def git?; end
-
-
- -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 57
-
-def installed?; end
-
-
- -
-

- - #new?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 60
-
-def new?; end
-
-
- -
-

- - #online?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 63
-
-def online?; end
-
-
- -
-

- - #onlyArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-66
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 66
-
-def only; end
-
-
- -
-

- - #only_copsArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-69
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 69
-
-def only_cops; end
-
-
- -
-

- - #osString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 72
-
-def os; end
-
-
- -
-

- - #signing?String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 75
-
-def signing?; end
-
-
- -
-

- - #skip_style?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 78
-
-def skip_style?; end
-
-
- -
-

- - #strict?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 81
-
-def strict?; end
-
-
- -
-

- - #tapString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 84
-
-def tap; end
-
-
- -
-

- - #token_conflicts?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-87
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/audit.rbi', line 87
-
-def token_conflicts?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Bottle.html b/docs/Homebrew/DevCmd/Bottle.html deleted file mode 100644 index aafc7e34f..000000000 --- a/docs/Homebrew/DevCmd/Bottle.html +++ /dev/null @@ -1,1102 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Bottle - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Bottle - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
extend/os/mac/dev-cmd/bottle.rb,
- dev-cmd/bottle.rb,
sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
BOTTLE_ERB = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
<<-EOS.freeze
-  bottle do
-    <% if [HOMEBREW_BOTTLE_DEFAULT_DOMAIN.to_s,
-     "#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles"].exclude?(root_url) %>
-    root_url "<%= root_url %>"<% if root_url_using.present? %>,
-using: <%= root_url_using %>
-    <% end %>
-    <% end %>
-    <% if rebuild.positive? %>
-    rebuild <%= rebuild %>
-    <% end %>
-    <% sha256_lines.each do |line| %>
-    <%= line %>
-    <% end %>
-  end
-EOS
- -
MAXIMUM_STRING_MATCHES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
100
- - -
[
-  %r{#{Regexp.escape(HOMEBREW_LIBRARY)}/Homebrew/os/(mac|linux)/pkgconfig},
-].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Bottle::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 10
-
-def args; end
-
-
- -
-

- - #bottle_output(bottle, root_url_using) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-
-
# File 'dev-cmd/bottle.rb', line 128
-
-def bottle_output(bottle, root_url_using)
-  cellars = bottle.checksums.filter_map do |checksum|
-    cellar = checksum["cellar"]
-    next unless cellar_parameter_needed? cellar
-
-    case cellar
-    when String
-      %Q("#{cellar}")
-    when Symbol
-      ":#{cellar}"
-    end
-  end
-  tag_column = cellars.empty? ? 0 : "cellar: #{cellars.max_by(&:length)}, ".length
-
-  tags = bottle.checksums.map { |checksum| checksum["tag"] }
-  # Start where the tag ends, add the max length of the tag, add two for the `: `
-  digest_column = tag_column + tags.max_by(&:length).length + 2
-
-  sha256_lines = bottle.checksums.map do |checksum|
-    generate_sha256_line(checksum["tag"], checksum["digest"], checksum["cellar"], tag_column, digest_column)
-  end
-  erb_binding = bottle.instance_eval { binding }
-  erb_binding.local_variable_set(:sha256_lines, sha256_lines)
-  erb_binding.local_variable_set(:root_url_using, root_url_using)
-  erb = ERB.new BOTTLE_ERB
-  erb.result(erb_binding).gsub(/^\s*$\n/, "")
-end
-
-
- -
-

- - #generate_sha256_line(tag, digest, cellar, tag_column, digest_column) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-
-
# File 'dev-cmd/bottle.rb', line 113
-
-def generate_sha256_line(tag, digest, cellar, tag_column, digest_column)
-  line = "sha256 "
-  tag_column += line.length
-  digest_column += line.length
-  if cellar.is_a?(Symbol)
-    line += "cellar: :#{cellar},"
-  elsif cellar_parameter_needed?(cellar)
-    line += %Q(cellar: "#{cellar}",)
-  end
-  line += " " * (tag_column - line.length)
-  line += "#{tag}:"
-  line += " " * (digest_column - line.length)
-  %Q(#{line}"#{digest}")
-end
-
-
- -
-

- - #gnu_tar(gnu_tar_formula) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - gnu_tar_formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'extend/os/mac/dev-cmd/bottle.rb', line 21
-
-def gnu_tar(gnu_tar_formula)
-  "#{gnu_tar_formula.opt_bin}/gtar"
-end
-
-
- -
-

- - #merge_bottle_spec(old_keys, old_bottle_spec, new_bottle_hash) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-
-
# File 'dev-cmd/bottle.rb', line 175
-
-def merge_bottle_spec(old_keys, old_bottle_spec, new_bottle_hash)
-  mismatches = []
-  checksums = []
-
-  new_values = {
-    root_url: new_bottle_hash["root_url"],
-    rebuild:  new_bottle_hash["rebuild"],
-  }
-
-  skip_keys = [:sha256, :cellar]
-  old_keys.each do |key|
-    next if skip_keys.include?(key)
-
-    old_value = old_bottle_spec.send(key).to_s
-    new_value = new_values[key].to_s
-
-    next if old_value.present? && new_value == old_value
-
-    mismatches << "#{key}: old: #{old_value.inspect}, new: #{new_value.inspect}"
-  end
-
-  return [mismatches, checksums] if old_keys.exclude? :sha256
-
-  old_bottle_spec.collector.each_tag do |tag|
-    old_tag_spec = old_bottle_spec.collector.specification_for(tag)
-    old_hexdigest = old_tag_spec.checksum.hexdigest
-    old_cellar = old_tag_spec.cellar
-    new_value = new_bottle_hash.dig("tags", tag.to_s)
-    if new_value.present? && new_value["sha256"] != old_hexdigest
-      mismatches << "sha256 #{tag}: old: #{old_hexdigest.inspect}, new: #{new_value["sha256"].inspect}"
-    elsif new_value.present? && new_value["cellar"] != old_cellar.to_s
-      mismatches << "cellar #{tag}: old: #{old_cellar.to_s.inspect}, new: #{new_value["cellar"].inspect}"
-    else
-      checksums << { cellar: old_cellar, tag.to_sym => old_hexdigest }
-    end
-  end
-
-  [mismatches, checksums]
-end
-
-
- -
-

- - #merge_json_files(json_files) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-
-
# File 'dev-cmd/bottle.rb', line 162
-
-def merge_json_files(json_files)
-  json_files.reduce({}) do |hash, json_file|
-    json_file.each_value do |json_hash|
-      json_bottle = json_hash["bottle"]
-      cellar = json_bottle.delete("cellar")
-      json_bottle["tags"].each_value do |json_platform|
-        json_platform["cellar"] ||= cellar
-      end
-    end
-    hash.deep_merge(json_file)
-  end
-end
-
-
- -
-

- - #parse_json_files(filenames) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-156
-157
-158
-159
-160
-
-
# File 'dev-cmd/bottle.rb', line 156
-
-def parse_json_files(filenames)
-  filenames.map do |filename|
-    JSON.parse(File.read(filename))
-  end
-end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-
-
# File 'dev-cmd/bottle.rb', line 98
-
-def run
-  if args.merge?
-    Homebrew.install_bundler_gems!(groups: ["ast"])
-    return merge
-  end
-
-  Homebrew.install_bundler_gems!(groups: ["bottle"])
-
-  gnu_tar_formula_ensure_installed_if_needed!
-
-  args.named.to_resolved_formulae(uniq: false).each do |formula|
-    bottle_formula formula
-  end
-end
-
-
- -
-

- - #tar_argsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'extend/os/mac/dev-cmd/bottle.rb', line 10
-
-def tar_args
-  if MacOS.version >= :catalina
-    ["--no-mac-metadata", "--no-acls", "--no-xattrs"].freeze
-  else
-    [].freeze
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Bottle/Args.html b/docs/Homebrew/DevCmd/Bottle/Args.html deleted file mode 100644 index 9af16927c..000000000 --- a/docs/Homebrew/DevCmd/Bottle/Args.html +++ /dev/null @@ -1,1149 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Bottle::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Bottle::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #committerString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 15
-
-def committer; end
-
-
- -
-

- - #force_core_tap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 18
-
-def force_core_tap?; end
-
-
- -
-

- - #json?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 21
-
-def json?; end
-
-
- -
-

- - #keep_old?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 24
-
-def keep_old?; end
-
-
- -
-

- - #merge?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 27
-
-def merge?; end
-
-
- -
-

- - #no_all_checks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 30
-
-def no_all_checks?; end
-
-
- -
-

- - #no_commit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 33
-
-def no_commit?; end
-
-
- -
-

- - #no_rebuild?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 36
-
-def no_rebuild?; end
-
-
- -
-

- - #only_json_tab?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 39
-
-def only_json_tab?; end
-
-
- -
-

- - #root_urlString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 42
-
-def root_url; end
-
-
- -
-

- - #root_url_usingString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 45
-
-def root_url_using; end
-
-
- -
-

- - #skip_relocation?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 48
-
-def skip_relocation?; end
-
-
- -
-

- - #write?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bottle.rbi', line 51
-
-def write?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Bump.html b/docs/Homebrew/DevCmd/Bump.html deleted file mode 100644 index db25d7150..000000000 --- a/docs/Homebrew/DevCmd/Bump.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Bump - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Bump - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/bump.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args, VersionBumpInfo - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Bump::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-
-
# File 'dev-cmd/bump.rb', line 57
-
-def run
-  Homebrew.install_bundler_gems!(groups: ["livecheck"])
-
-  if args.limit.present? && !args.formula? && !args.cask?
-    raise UsageError, "`--limit` must be used with either `--formula` or `--cask`."
-  end
-
-  Homebrew.with_no_api_env do
-    formulae_and_casks = if args.tap
-      tap = Tap.fetch(T.must(args.tap))
-      raise UsageError, "`--tap` cannot be used with official taps." if tap.official?
-
-      formulae = args.cask? ? [] : tap.formula_files.map { |path| Formulary.factory(path) }
-      casks = args.formula? ? [] : tap.cask_files.map { |path| Cask::CaskLoader.load(path) }
-      formulae + casks
-    elsif args.installed?
-      formulae = args.cask? ? [] : Formula.installed
-      casks = args.formula? ? [] : Cask::Caskroom.casks
-      formulae + casks
-    elsif args.named.present?
-      args.named.to_formulae_and_casks_with_taps
-    end
-
-    formulae_and_casks = formulae_and_casks&.sort_by do |formula_or_cask|
-      formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name
-    end
-
-    unless Utils::Curl.curl_supports_tls13?
-      begin
-        ensure_formula_installed!("curl", reason: "Repology queries") unless HOMEBREW_BREWED_CURL_PATH.exist?
-      rescue FormulaUnavailableError
-        opoo "A newer `curl` is required for Repology queries."
-      end
-    end
-
-    if formulae_and_casks.present?
-      handle_formula_and_casks(formulae_and_casks)
-    else
-      handle_api_response
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Bump/Args.html b/docs/Homebrew/DevCmd/Bump/Args.html deleted file mode 100644 index 25def9070..000000000 --- a/docs/Homebrew/DevCmd/Bump/Args.html +++ /dev/null @@ -1,1075 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Bump::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Bump::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 21
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 24
-
-def formulae?; end
-
-
- -
-

- - #full_name?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 27
-
-def full_name?; end
-
-
- -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 30
-
-def installed?; end
-
-
- -
-

- - #limitString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 33
-
-def limit; end
-
-
- -
-

- - #no_fork?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 36
-
-def no_fork?; end
-
-
- -
-

- - #no_pull_requests?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 39
-
-def no_pull_requests?; end
-
-
- -
-

- - #open_pr?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 42
-
-def open_pr?; end
-
-
- -
-

- - #start_withString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 45
-
-def start_with; end
-
-
- -
-

- - #tapString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 48
-
-def tap; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Bump/VersionBumpInfo.html b/docs/Homebrew/DevCmd/Bump/VersionBumpInfo.html deleted file mode 100644 index 9d5fa4d4e..000000000 --- a/docs/Homebrew/DevCmd/Bump/VersionBumpInfo.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Bump::VersionBumpInfo - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Bump::VersionBumpInfo - - - Private -

-
- -
-
Inherits:
-
- T::Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/bump.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(type:, multiple_versions:, version_name:, current_version:, repology_latest:, new_version:, open_pull_requests: nil, closed_pull_requests: nil) ⇒ void - - - - - -

-
- - -
-
-
-

Parameters:

-
    - -
  • - - type - - - (Symbol) - - - -
  • - -
  • - - multiple_versions - - - (Boolean) - - - -
  • - -
  • - - version_name - - - (String) - - - -
  • - -
  • - - current_version - - - (BumpVersionParser) - - - -
  • - -
  • - - repology_latest - - - (String, Version) - - - -
  • - -
  • - - new_version - - - (BumpVersionParser) - - - -
  • - -
  • - - open_pull_requests - - - (Array<String>, String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - closed_pull_requests - - - (Array<String>, String, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :type, Symbol
-const :multiple_versions, T::Boolean
-const :version_name, String
-const :current_version, BumpVersionParser
-const :repology_latest, T.any(String, Version)
-const :new_version, BumpVersionParser
-const :open_pull_requests, T.nilable(T.any(T::Array[String], String))
-const :closed_pull_requests, T.nilable(T.any(T::Array[String], String))
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #closed_pull_requestsArray<String>, ... (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop closed_pull_requests.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :closed_pull_requests, T.nilable(T.any(T::Array[String], String))
-
-
- - - -
-

- - #current_versionBumpVersionParser (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop current_version.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :current_version, BumpVersionParser
-
-
- - - -
-

- - #multiple_versionsBoolean (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop multiple_versions.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :multiple_versions, T::Boolean
-
-
- - - -
-

- - #new_versionBumpVersionParser (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop new_version.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :new_version, BumpVersionParser
-
-
- - - -
-

- - #open_pull_requestsArray<String>, ... (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop open_pull_requests.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :open_pull_requests, T.nilable(T.any(T::Array[String], String))
-
-
- - - -
-

- - #repology_latestString, Version (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop repology_latest.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :repology_latest, T.any(String, Version)
-
-
- - - -
-

- - #typeSymbol (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop type.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :type, Symbol
-
-
- - - -
-

- - #version_nameString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop version_name.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :version_name, String
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/BumpCaskPr.html b/docs/Homebrew/DevCmd/BumpCaskPr.html deleted file mode 100644 index ebdb64ba7..000000000 --- a/docs/Homebrew/DevCmd/BumpCaskPr.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::BumpCaskPr - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::BumpCaskPr - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/bump-cask-pr.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::BumpCaskPr::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-
-
# File 'dev-cmd/bump-cask-pr.rb', line 62
-
-def run
-  odisabled "brew bump-cask-pr --online" if args.online?
-
-  # This will be run by `brew audit` or `brew style` later so run it first to
-  # not start spamming during normal output.
-  gem_groups = []
-  gem_groups << "style" if !args.no_audit? || !args.no_style?
-  gem_groups << "audit" unless args.no_audit?
-  Homebrew.install_bundler_gems!(groups: gem_groups) unless gem_groups.empty?
-
-  # As this command is simplifying user-run commands then let's just use a
-  # user path, too.
-  ENV["PATH"] = PATH.new(ORIGINAL_PATHS).to_s
-
-  # Use the user's browser, too.
-  ENV["BROWSER"] = EnvConfig.browser
-
-  cask = args.named.to_casks.first
-
-  odie "This cask is not in a tap!" if cask.tap.blank?
-  odie "This cask's tap is not a Git repository!" unless cask.tap.git?
-
-  odie <<~EOS unless cask.tap.allow_bump?(cask.token)
-    Whoops, the #{cask.token} cask has its version update
-    pull requests automatically opened by BrewTestBot every ~3 hours!
-    We'd still love your contributions, though, so try another one
-    that's not in the autobump list:
-      #{Formatter.url("#{cask.tap.remote}/blob/master/.github/autobump.txt")}
-  EOS
-
-  odie "You have too many PRs open: close or merge some first!" if GitHub.too_many_open_prs?(cask.tap)
-
-  new_version = BumpVersionParser.new(
-    general: args.version,
-    intel:   args.version_intel,
-    arm:     args.version_arm,
-  )
-
-  new_hash = unless (new_hash = args.sha256).nil?
-    raise UsageError, "`--sha256` must not be empty." if new_hash.blank?
-
-    ["no_check", ":no_check"].include?(new_hash) ? :no_check : new_hash
-  end
-
-  new_base_url = unless (new_base_url = args.url).nil?
-    raise UsageError, "`--url` must not be empty." if new_base_url.blank?
-
-    begin
-      URI(new_base_url)
-    rescue URI::InvalidURIError
-      raise UsageError, "`--url` is not valid."
-    end
-  end
-
-  if new_version.blank? && new_base_url.nil? && new_hash.nil?
-    raise UsageError, "No `--version`, `--url` or `--sha256` argument specified!"
-  end
-
-  check_pull_requests(cask, new_version:)
-
-  replacement_pairs ||= []
-  branch_name = "bump-#{cask.token}"
-  commit_message = nil
-
-  old_contents = File.read(cask.sourcefile_path)
-
-  if new_base_url
-    commit_message ||= "#{cask.token}: update URL"
-
-    m = /^ +url "(.+?)"\n/m.match(old_contents)
-    odie "Could not find old URL in cask!" if m.nil?
-
-    old_base_url = m.captures.fetch(0)
-
-    replacement_pairs << [
-      /#{Regexp.escape(old_base_url)}/,
-      new_base_url.to_s,
-    ]
-  end
-
-  if new_version.present?
-    # For simplicity, our naming defers to the arm version if we multiple architectures are specified
-    branch_version = new_version.arm || new_version.general
-    if branch_version.is_a?(Cask::DSL::Version)
-      commit_version = shortened_version(branch_version, cask:)
-      branch_name = "bump-#{cask.token}-#{branch_version.tr(",:", "-")}"
-      commit_message ||= "#{cask.token} #{commit_version}"
-    end
-    replacement_pairs = replace_version_and_checksum(cask, new_hash, new_version, replacement_pairs)
-  end
-  # Now that we have all replacement pairs, we will replace them further down
-
-  commit_message ||= "#{cask.token}: update checksum" if new_hash
-
-  # Remove nested arrays where elements are identical
-  replacement_pairs = replacement_pairs.reject { |pair| pair[0] == pair[1] }.uniq.compact
-  Utils::Inreplace.inreplace_pairs(cask.sourcefile_path,
-                                   replacement_pairs,
-                                   read_only_run: args.dry_run?,
-                                   silent:        args.quiet?)
-
-  run_cask_audit(cask, old_contents)
-  run_cask_style(cask, old_contents)
-
-  pr_info = {
-    branch_name:,
-    commit_message:,
-    old_contents:,
-    pr_message:      "Created with `brew bump-cask-pr`.",
-    sourcefile_path: cask.sourcefile_path,
-    tap:             cask.tap,
-  }
-  GitHub.create_bump_pr(pr_info, args:)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/BumpCaskPr/Args.html b/docs/Homebrew/DevCmd/BumpCaskPr/Args.html deleted file mode 100644 index 09cff8551..000000000 --- a/docs/Homebrew/DevCmd/BumpCaskPr/Args.html +++ /dev/null @@ -1,1371 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::BumpCaskPr::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::BumpCaskPr::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #commit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 15
-
-def commit?; end
-
-
- -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 18
-
-def dry_run?; end
-
-
- -
-

- - #fork_orgString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 21
-
-def fork_org; end
-
-
- -
-

- - #messageString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 24
-
-def message; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 27
-
-def n?; end
-
-
- -
-

- - #no_audit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 30
-
-def no_audit?; end
-
-
- -
-

- - #no_browse?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 33
-
-def no_browse?; end
-
-
- -
-

- - #no_fork?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 36
-
-def no_fork?; end
-
-
- -
-

- - #no_style?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 39
-
-def no_style?; end
-
-
- -
-

- - #online?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 42
-
-def online?; end
-
-
- -
-

- - #sha256String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 45
-
-def sha256; end
-
-
- -
-

- - #urlString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 48
-
-def url; end
-
-
- -
-

- - #versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 51
-
-def version; end
-
-
- -
-

- - #version_armString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 54
-
-def version_arm; end
-
-
- -
-

- - #version_intelString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 57
-
-def version_intel; end
-
-
- -
-

- - #write_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_cask_pr.rbi', line 60
-
-def write_only?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/BumpFormulaPr.html b/docs/Homebrew/DevCmd/BumpFormulaPr.html deleted file mode 100644 index 0e239f4f6..000000000 --- a/docs/Homebrew/DevCmd/BumpFormulaPr.html +++ /dev/null @@ -1,932 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::BumpFormulaPr - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::BumpFormulaPr - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/bump-formula-pr.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::BumpFormulaPr::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-
-
# File 'dev-cmd/bump-formula-pr.rb', line 93
-
-def run
-  if args.revision.present? && args.tag.nil? && args.version.nil?
-    raise UsageError, "`--revision` must be passed with either `--tag` or `--version`!"
-  end
-
-  # As this command is simplifying user-run commands then let's just use a
-  # user path, too.
-  ENV["PATH"] = PATH.new(ORIGINAL_PATHS).to_s
-
-  # Use the user's browser, too.
-  ENV["BROWSER"] = Homebrew::EnvConfig.browser
-
-  formula = args.named.to_formulae.first
-  new_url = args.url
-  raise FormulaUnspecifiedError if formula.blank?
-
-  odie "This formula is disabled!" if formula.disabled?
-  odie "This formula is deprecated and does not build!" if formula.deprecation_reason == :does_not_build
-  odie "This formula is not in a tap!" if formula.tap.blank?
-  odie "This formula's tap is not a Git repository!" unless formula.tap.git?
-
-  odie <<~EOS unless formula.tap.allow_bump?(formula.name)
-    Whoops, the #{formula.name} formula has its version update
-    pull requests automatically opened by BrewTestBot every ~3 hours!
-    We'd still love your contributions, though, so try another one
-    that's not in the autobump list:
-      #{Formatter.url("#{formula.tap.remote}/blob/master/.github/autobump.txt")}
-  EOS
-
-  odie "You have too many PRs open: close or merge some first!" if GitHub.too_many_open_prs?(formula.tap)
-
-  formula_spec = formula.stable
-  odie "#{formula}: no stable specification found!" if formula_spec.blank?
-
-  # This will be run by `brew audit` later so run it first to not start
-  # spamming during normal output.
-  Homebrew.install_bundler_gems!(groups: ["audit", "style"]) unless args.no_audit?
-
-  tap_remote_repo = formula.tap.full_name || formula.tap.remote_repo
-  remote = "origin"
-  remote_branch = formula.tap.git_repository.origin_branch_name
-  previous_branch = "-"
-
-  check_open_pull_requests(formula, tap_remote_repo)
-
-  new_version = args.version
-  check_new_version(formula, tap_remote_repo, version: new_version) if new_version.present?
-
-  opoo "This formula has patches that may be resolved upstream." if formula.patchlist.present?
-  if formula.resources.any? { |resource| !resource.name.start_with?("homebrew-") }
-    opoo "This formula has resources that may need to be updated."
-  end
-
-  old_mirrors = formula_spec.mirrors
-  new_mirrors ||= args.mirror
-  new_mirror ||= determine_mirror(new_url)
-  new_mirrors ||= [new_mirror] if new_mirror.present?
-
-  check_for_mirrors(formula, old_mirrors, new_mirrors) if new_url.present?
-
-  old_hash = formula_spec.checksum&.hexdigest
-  new_hash = args.sha256
-  new_tag = args.tag
-  new_revision = args.revision
-  old_url = formula_spec.url
-  old_tag = formula_spec.specs[:tag]
-  old_formula_version = formula_version(formula)
-  old_version = old_formula_version.to_s
-  forced_version = new_version.present?
-  new_url_hash = if new_url.present? && new_hash.present?
-    check_new_version(formula, tap_remote_repo, url: new_url) if new_version.blank?
-    true
-  elsif new_tag.present? && new_revision.present?
-    check_new_version(formula, tap_remote_repo, url: old_url, tag: new_tag) if new_version.blank?
-    false
-  elsif old_hash.blank?
-    if new_tag.blank? && new_version.blank? && new_revision.blank?
-      raise UsageError, "#{formula}: no `--tag` or `--version` argument specified!"
-    end
-
-    if old_tag.present?
-      new_tag ||= old_tag.gsub(old_version, new_version)
-      if new_tag == old_tag
-        odie <<~EOS
-          You need to bump this formula manually since the new tag
-          and old tag are both #{new_tag}.
-        EOS
-      end
-      check_new_version(formula, tap_remote_repo, url: old_url, tag: new_tag) if new_version.blank?
-      resource_path, forced_version = fetch_resource_and_forced_version(formula, new_version, old_url,
-                                                                        tag: new_tag)
-      new_revision = Utils.popen_read("git", "-C", resource_path.to_s, "rev-parse", "-q", "--verify", "HEAD")
-      new_revision = new_revision.strip
-    elsif new_revision.blank?
-      odie "#{formula}: the current URL requires specifying a `--revision=` argument."
-    end
-    false
-  elsif new_url.blank? && new_version.blank?
-    raise UsageError, "#{formula}: no `--url` or `--version` argument specified!"
-  else
-    new_url ||= PyPI.update_pypi_url(old_url, T.must(new_version))
-    if new_url.blank?
-      new_url = update_url(old_url, old_version, T.must(new_version))
-      if new_mirrors.blank? && old_mirrors.present?
-        new_mirrors = old_mirrors.map do |old_mirror|
-          update_url(old_mirror, old_version, T.must(new_version))
-        end
-      end
-    end
-    if new_url == old_url
-      odie <<~EOS
-        You need to bump this formula manually since the new URL
-        and old URL are both:
-          #{new_url}
-      EOS
-    end
-    check_new_version(formula, tap_remote_repo, url: new_url) if new_version.blank?
-    resource_path, forced_version = fetch_resource_and_forced_version(formula, new_version, new_url)
-    Utils::Tar.validate_file(resource_path)
-    new_hash = resource_path.sha256
-  end
-
-  replacement_pairs = []
-  if formula.revision.nonzero?
-    replacement_pairs << [
-      /^  revision \d+\n(\n(  head "))?/m,
-      "\\2",
-    ]
-  end
-
-  replacement_pairs += formula_spec.mirrors.map do |mirror|
-    [
-      / +mirror "#{Regexp.escape(mirror)}"\n/m,
-      "",
-    ]
-  end
-
-  replacement_pairs += if new_url_hash.present?
-    [
-      [
-        /#{Regexp.escape(formula_spec.url)}/,
-        new_url,
-      ],
-      [
-        old_hash,
-        new_hash,
-      ],
-    ]
-  elsif new_tag.present?
-    [
-      [
-        /tag:(\s+")#{formula_spec.specs[:tag]}(?=")/,
-        "tag:\\1#{new_tag}\\2",
-      ],
-      [
-        formula_spec.specs[:revision],
-        new_revision,
-      ],
-    ]
-  elsif new_url.present?
-    [
-      [
-        /#{Regexp.escape(formula_spec.url)}/,
-        new_url,
-      ],
-      [
-        formula_spec.specs[:revision],
-        new_revision,
-      ],
-    ]
-  else
-    [
-      [
-        formula_spec.specs[:revision],
-        new_revision,
-      ],
-    ]
-  end
-
-  old_contents = formula.path.read
-
-  if new_mirrors.present?
-    replacement_pairs << [
-      /^( +)(url "#{Regexp.escape(T.must(new_url))}"[^\n]*?\n)/m,
-      "\\1\\2\\1mirror \"#{new_mirrors.join("\"\n\\1mirror \"")}\"\n",
-    ]
-  end
-
-  if forced_version && new_version != "0"
-    replacement_pairs << if old_contents.include?("version \"#{old_formula_version}\"")
-      [
-        "version \"#{old_formula_version}\"",
-        "version \"#{new_version}\"",
-      ]
-    elsif new_mirrors.present?
-      [
-        /^( +)(mirror "#{Regexp.escape(new_mirrors.last)}"\n)/m,
-        "\\1\\2\\1version \"#{new_version}\"\n",
-      ]
-    elsif new_url.present?
-      [
-        /^( +)(url "#{Regexp.escape(new_url)}"[^\n]*?\n)/m,
-        "\\1\\2\\1version \"#{new_version}\"\n",
-      ]
-    elsif new_revision.present?
-      [
-        /^( {2})( +)(:revision => "#{new_revision}"\n)/m,
-        "\\1\\2\\3\\1version \"#{new_version}\"\n",
-      ]
-    end
-  elsif forced_version && new_version == "0"
-    replacement_pairs << [
-      /^  version "[\w.\-+]+"\n/m,
-      "",
-    ]
-  end
-  new_contents = Utils::Inreplace.inreplace_pairs(formula.path,
-                                                  replacement_pairs.uniq.compact,
-                                                  read_only_run: args.dry_run?,
-                                                  silent:        args.quiet?)
-
-  new_formula_version = formula_version(formula, new_contents)
-
-  if new_formula_version < old_formula_version
-    formula.path.atomic_write(old_contents) unless args.dry_run?
-    odie <<~EOS
-      You need to bump this formula manually since changing the version
-      from #{old_formula_version} to #{new_formula_version} would be a downgrade.
-    EOS
-  elsif new_formula_version == old_formula_version
-    formula.path.atomic_write(old_contents) unless args.dry_run?
-    odie <<~EOS
-      You need to bump this formula manually since the new version
-      and old version are both #{new_formula_version}.
-    EOS
-  end
-
-  alias_rename = alias_update_pair(formula, new_formula_version)
-  if alias_rename.present?
-    ohai "Renaming alias #{alias_rename.first} to #{alias_rename.last}"
-    alias_rename.map! { |a| formula.tap.alias_dir/a }
-  end
-
-  unless args.dry_run?
-    resources_checked = PyPI.update_python_resources! formula,
-                                                      version:                  new_formula_version.to_s,
-                                                      package_name:             args.python_package_name,
-                                                      extra_packages:           args.python_extra_packages,
-                                                      exclude_packages:         args.python_exclude_packages,
-                                                      install_dependencies:     args.install_dependencies?,
-                                                      silent:                   args.quiet?,
-                                                      ignore_non_pypi_packages: true
-  end
-
-  run_audit(formula, alias_rename, old_contents)
-
-  pr_message = "Created with `brew bump-formula-pr`."
-  if resources_checked.nil? && formula.resources.any? { |resource| !resource.name.start_with?("homebrew-") }
-    pr_message += <<~EOS
-
-
-      - [ ] `resource` blocks have been checked for updates.
-    EOS
-  end
-
-  if new_url =~ %r{^https://github\.com/([\w-]+)/([\w-]+)/archive/refs/tags/(v?[.0-9]+)\.tar\.}
-    owner = Regexp.last_match(1)
-    repo = Regexp.last_match(2)
-    tag = Regexp.last_match(3)
-    github_release_data = begin
-      GitHub::API.open_rest("#{GitHub::API_URL}/repos/#{owner}/#{repo}/releases/tags/#{tag}")
-    rescue GitHub::API::HTTPNotFoundError
-      # If this is a 404: we can't do anything.
-      nil
-    end
-
-    if github_release_data.present?
-      pre = "pre" if github_release_data["prerelease"].present?
-      pr_message += <<~XML
-        <details>
-          <summary>#{pre}release notes</summary>
-          <pre>#{github_release_data["body"]}</pre>
-        </details>
-      XML
-    end
-  end
-
-  pr_info = {
-    sourcefile_path:  formula.path,
-    old_contents:,
-    additional_files: alias_rename,
-    remote:,
-    remote_branch:,
-    branch_name:      "bump-#{formula.name}-#{new_formula_version}",
-    commit_message:   "#{formula.name} #{new_formula_version}",
-    previous_branch:,
-    tap:              formula.tap,
-    tap_remote_repo:,
-    pr_message:,
-  }
-  GitHub.create_bump_pr(pr_info, args:)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/BumpFormulaPr/Args.html b/docs/Homebrew/DevCmd/BumpFormulaPr/Args.html deleted file mode 100644 index 3379c371a..000000000 --- a/docs/Homebrew/DevCmd/BumpFormulaPr/Args.html +++ /dev/null @@ -1,1889 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::BumpFormulaPr::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::BumpFormulaPr::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #commit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 15
-
-def commit?; end
-
-
- -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 18
-
-def dry_run?; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 21
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 24
-
-def force?; end
-
-
- -
-

- - #fork_orgString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 27
-
-def fork_org; end
-
-
- -
-

- - #install_dependencies?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 30
-
-def install_dependencies?; end
-
-
- -
-

- - #messageString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 33
-
-def message; end
-
-
- -
-

- - #mirrorArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 36
-
-def mirror; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 39
-
-def n?; end
-
-
- -
-

- - #no_audit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 42
-
-def no_audit?; end
-
-
- -
-

- - #no_browse?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 45
-
-def no_browse?; end
-
-
- -
-

- - #no_fork?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 48
-
-def no_fork?; end
-
-
- -
-

- - #online?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 51
-
-def online?; end
-
-
- -
-

- - #python_exclude_packagesArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 54
-
-def python_exclude_packages; end
-
-
- -
-

- - #python_extra_packagesArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 57
-
-def python_extra_packages; end
-
-
- -
-

- - #python_package_nameString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 60
-
-def python_package_name; end
-
-
- -
-

- - #revisionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 63
-
-def revision; end
-
-
- -
-

- - #sha256String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 66
-
-def sha256; end
-
-
- -
-

- - #strict?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 69
-
-def strict?; end
-
-
- -
-

- - #tagString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 72
-
-def tag; end
-
-
- -
-

- - #urlString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 75
-
-def url; end
-
-
- -
-

- - #versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 78
-
-def version; end
-
-
- -
-

- - #write_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi', line 81
-
-def write_only?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/BumpRevision.html b/docs/Homebrew/DevCmd/BumpRevision.html deleted file mode 100644 index 137a0fe71..000000000 --- a/docs/Homebrew/DevCmd/BumpRevision.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::BumpRevision - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::BumpRevision - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/bump-revision.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/bump_revision.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::BumpRevision::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_revision.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'dev-cmd/bump-revision.rb', line 30
-
-def run
-  # As this command is simplifying user-run commands then let's just use a
-  # user path, too.
-  ENV["PATH"] = PATH.new(ORIGINAL_PATHS).to_s
-
-  Homebrew.install_bundler_gems!(groups: ["ast"]) unless args.dry_run?
-
-  args.named.to_formulae.each do |formula|
-    current_revision = formula.revision
-    new_revision = current_revision + 1
-
-    if args.dry_run?
-      unless args.quiet?
-        old_text = "revision #{current_revision}"
-        new_text = "revision #{new_revision}"
-        if current_revision.zero?
-          ohai "add #{new_text.inspect}"
-        else
-          ohai "replace #{old_text.inspect} with #{new_text.inspect}"
-        end
-      end
-    else
-      require "utils/ast"
-
-      formula_ast = Utils::AST::FormulaAST.new(formula.path.read)
-      if current_revision.zero?
-        formula_ast.add_stanza(:revision, new_revision)
-      else
-        formula_ast.replace_stanza(:revision, new_revision)
-      end
-      formula_ast.remove_stanza(:bottle) if args.remove_bottle_block?
-      formula.path.atomic_write(formula_ast.process)
-    end
-
-    message = "#{formula.name}: revision bump #{args.message}"
-    if args.dry_run?
-      ohai "git commit --no-edit --verbose --message=#{message} -- #{formula.path}"
-    elsif !args.write_only?
-      formula.path.parent.cd do
-        safe_system "git", "commit", "--no-edit", "--verbose",
-                    "--message=#{message}", "--", formula.path
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/BumpRevision/Args.html b/docs/Homebrew/DevCmd/BumpRevision/Args.html deleted file mode 100644 index 7491df6a2..000000000 --- a/docs/Homebrew/DevCmd/BumpRevision/Args.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::BumpRevision::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::BumpRevision::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/bump_revision.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_revision.rbi', line 15
-
-def dry_run?; end
-
-
- -
-

- - #messageString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_revision.rbi', line 18
-
-def message; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_revision.rbi', line 21
-
-def n?; end
-
-
- -
-

- - #remove_bottle_block?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_revision.rbi', line 24
-
-def remove_bottle_block?; end
-
-
- -
-

- - #write_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_revision.rbi', line 27
-
-def write_only?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/BumpUnversionedCasks.html b/docs/Homebrew/DevCmd/BumpUnversionedCasks.html deleted file mode 100644 index aff3c8820..000000000 --- a/docs/Homebrew/DevCmd/BumpUnversionedCasks.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::BumpUnversionedCasks - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::BumpUnversionedCasks - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
dev-cmd/bump-unversioned-casks.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/bump_unversioned_casks.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::BumpUnversionedCasks::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_unversioned_casks.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'dev-cmd/bump-unversioned-casks.rb', line 32
-
-def run
-  Homebrew.install_bundler_gems!(groups: ["bump_unversioned_casks"])
-
-  state_file = if args.state_file.present?
-    Pathname(T.must(args.state_file)).expand_path
-  else
-    HOMEBREW_CACHE/"bump_unversioned_casks.json"
-  end
-  state_file.dirname.mkpath
-
-  state = state_file.exist? ? JSON.parse(state_file.read) : {}
-
-  casks = args.named.to_paths(only: :cask, recurse_tap: true).map { |path| Cask::CaskLoader.load(path) }
-
-  unversioned_casks = casks.select do |cask|
-    cask.url&.unversioned? && !cask.livecheckable?
-  end
-
-  ohai "Unversioned Casks: #{unversioned_casks.count} (#{state.size} cached)"
-
-  checked, unchecked = unversioned_casks.partition { |c| state.key?(c.full_name) }
-
-  queue = Queue.new
-
-  # Start with random casks which have not been checked.
-  unchecked.shuffle.each do |c|
-    queue.enq c
-  end
-
-  # Continue with previously checked casks, ordered by when they were last checked.
-  checked.sort_by { |c| state.dig(c.full_name, "check_time") }.each do |c|
-    queue.enq c
-  end
-
-  limit = args.limit.presence&.to_i
-  end_time = Time.now + (limit * 60) if limit
-
-  until queue.empty? || (end_time && end_time < Time.now)
-    cask = queue.deq
-
-    key = cask.full_name
-
-    new_state = bump_unversioned_cask(cask, state: state.fetch(key, {}))
-
-    next unless new_state
-
-    state[key] = new_state
-
-    state_file.atomic_write JSON.pretty_generate(state) unless args.dry_run?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/BumpUnversionedCasks/Args.html b/docs/Homebrew/DevCmd/BumpUnversionedCasks/Args.html deleted file mode 100644 index f87ce6b52..000000000 --- a/docs/Homebrew/DevCmd/BumpUnversionedCasks/Args.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::BumpUnversionedCasks::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::BumpUnversionedCasks::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/bump_unversioned_casks.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_unversioned_casks.rbi', line 15
-
-def dry_run?; end
-
-
- -
-

- - #limitString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_unversioned_casks.rbi', line 18
-
-def limit; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_unversioned_casks.rbi', line 21
-
-def n?; end
-
-
- -
-

- - #state_fileString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump_unversioned_casks.rbi', line 24
-
-def state_file; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Cat.html b/docs/Homebrew/DevCmd/Cat.html deleted file mode 100644 index 1f8c35ae9..000000000 --- a/docs/Homebrew/DevCmd/Cat.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Cat - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Cat - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
dev-cmd/cat.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/cat.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Cat::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/cat.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-
-
# File 'dev-cmd/cat.rb', line 28
-
-def run
-  cd HOMEBREW_REPOSITORY do
-    pager = if Homebrew::EnvConfig.bat?
-      ENV["BAT_CONFIG_PATH"] = Homebrew::EnvConfig.bat_config_path
-      ENV["BAT_THEME"] = Homebrew::EnvConfig.bat_theme
-      ensure_formula_installed!(
-        "bat",
-        reason:           "displaying <formula>/<cask> source",
-        # The user might want to capture the output of `brew cat ...`
-        # Redirect stdout to stderr
-        output_to_stderr: true,
-      ).opt_bin/"bat"
-    else
-      "cat"
-    end
-
-    args.named.to_paths.each do |path|
-      next path if path.exist?
-
-      path = path.basename(".rb") if args.cask?
-
-      ofail "#{path}'s source doesn't exist on disk."
-    end
-
-    if Homebrew.failed?
-      $stderr.puts "The name may be wrong, or the tap hasn't been tapped. Instead try:"
-      treat_as = "--cask " if args.cask?
-      treat_as = "--formula " if args.formula?
-      $stderr.puts "  brew info --github #{treat_as}#{args.named.join(" ")}"
-      return
-    end
-
-    safe_system pager, *args.named.to_paths
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Cat/Args.html b/docs/Homebrew/DevCmd/Cat/Args.html deleted file mode 100644 index 86eaac379..000000000 --- a/docs/Homebrew/DevCmd/Cat/Args.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Cat::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Cat::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/cat.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/cat.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/cat.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/cat.rbi', line 21
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/cat.rbi', line 24
-
-def formulae?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Contributions.html b/docs/Homebrew/DevCmd/Contributions.html deleted file mode 100644 index 329745460..000000000 --- a/docs/Homebrew/DevCmd/Contributions.html +++ /dev/null @@ -1,481 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Contributions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Contributions - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/contributions.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
PRIMARY_REPOS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[brew core cask].freeze
- -
SUPPORTED_REPOS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  PRIMARY_REPOS,
-  OFFICIAL_CMD_TAPS.keys.map { |t| t.delete_prefix("homebrew/") },
-  OFFICIAL_CASK_TAPS.reject { |t| t == "cask" },
-].flatten.freeze
- -
MAX_REPO_COMMITS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
1000
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Contributions::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'dev-cmd/contributions.rb', line 49
-
-def run
-  results = {}
-  grand_totals = {}
-
-  repos = if args.repositories.blank? || T.must(args.repositories).include?("primary")
-    PRIMARY_REPOS
-  elsif T.must(args.repositories).include?("all")
-    SUPPORTED_REPOS
-  else
-    args.repositories
-  end
-
-  from = args.from.presence || Date.today.prev_year.iso8601
-
-  contribution_types = [:author, :committer, :coauthor, :review]
-
-  users = args.user.presence || GitHub.members_by_team("Homebrew", "maintainers").keys
-  users.each do |username|
-    # TODO: Using the GitHub username to scan the `git log` undercounts some
-    # contributions as people might not always have configured their Git
-    # committer details to match the ones on GitHub.
-    # TODO: Switch to using the GitHub APIs instead of `git log` if
-    # they ever support trailers.
-    results[username] = scan_repositories(repos, username, from:)
-    grand_totals[username] = total(results[username])
-
-    contributions = contribution_types.filter_map do |type|
-      type_count = grand_totals[username][type]
-      next if type_count.to_i.zero?
-
-      "#{Utils.pluralize("time", type_count, include_count: true)} (#{type})"
-    end
-    contributions <<
-      "#{Utils.pluralize("time", grand_totals[username].values.sum, include_count: true)} (total)"
-
-    puts [
-      "#{username} contributed",
-      *contributions.to_sentence,
-      "#{time_period(from:, to: args.to)}.",
-    ].join(" ")
-  end
-
-  return unless args.csv?
-
-  puts
-  puts generate_csv(grand_totals)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Contributions/Args.html b/docs/Homebrew/DevCmd/Contributions/Args.html deleted file mode 100644 index 15a5c943d..000000000 --- a/docs/Homebrew/DevCmd/Contributions/Args.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Contributions::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Contributions::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #csv?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi', line 15
-
-def csv?; end
-
-
- -
-

- - #fromString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi', line 18
-
-def from; end
-
-
- -
-

- - #repositoriesArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi', line 21
-
-def repositories; end
-
-
- -
-

- - #toString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi', line 24
-
-def to; end
-
-
- -
-

- - #userArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/contributions.rbi', line 27
-
-def user; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Create.html b/docs/Homebrew/DevCmd/Create.html deleted file mode 100644 index 6fe853dea..000000000 --- a/docs/Homebrew/DevCmd/Create.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Create - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Create - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/create.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Create::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Create a formula from a tarball URL.

- - -
-
-
- - -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'dev-cmd/create.rb', line 70
-
-def run
-  path = if args.cask?
-    create_cask
-  else
-    create_formula
-  end
-
-  exec_editor path
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Create/Args.html b/docs/Homebrew/DevCmd/Create/Args.html deleted file mode 100644 index 14b8a1160..000000000 --- a/docs/Homebrew/DevCmd/Create/Args.html +++ /dev/null @@ -1,1593 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Create::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Create::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #autotools?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 18
-
-def autotools?; end
-
-
- -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 21
-
-def cask?; end
-
-
- -
-

- - #cmake?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 24
-
-def cmake?; end
-
-
- -
-

- - #crystal?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 27
-
-def crystal?; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 30
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 33
-
-def force?; end
-
-
- -
-

- - #go?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 36
-
-def go?; end
-
-
- -
-

- - #HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 15
-
-def HEAD?; end
-
-
- -
-

- - #meson?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 39
-
-def meson?; end
-
-
- -
-

- - #no_fetch?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 42
-
-def no_fetch?; end
-
-
- -
-

- - #node?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 45
-
-def node?; end
-
-
- -
-

- - #perl?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 48
-
-def perl?; end
-
-
- -
-

- - #python?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 51
-
-def python?; end
-
-
- -
-

- - #ruby?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 54
-
-def ruby?; end
-
-
- -
-

- - #rust?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 57
-
-def rust?; end
-
-
- -
-

- - #set_licenseString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 60
-
-def set_license; end
-
-
- -
-

- - #set_nameString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 63
-
-def set_name; end
-
-
- -
-

- - #set_versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 66
-
-def set_version; end
-
-
- -
-

- - #tapString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 69
-
-def tap; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/DetermineTestRunners.html b/docs/Homebrew/DevCmd/DetermineTestRunners.html deleted file mode 100644 index ffc2fdb70..000000000 --- a/docs/Homebrew/DevCmd/DetermineTestRunners.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::DetermineTestRunners - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::DetermineTestRunners - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/determine-test-runners.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/determine_test_runners.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::DetermineTestRunners::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/determine_test_runners.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'dev-cmd/determine-test-runners.rb', line 35
-
-def run
-  if args.no_named? && !args.all_supported?
-    raise Homebrew::CLI::MinNamedArgumentsError, 1
-  elsif args.all_supported? && !args.no_named?
-    raise UsageError, "`--all-supported` is mutually exclusive to other arguments."
-  end
-
-  testing_formulae = args.named.first&.split(",").to_a
-  testing_formulae.map! { |name| TestRunnerFormula.new(Formulary.factory(name), eval_all: args.eval_all?) }
-                  .freeze
-  deleted_formulae = args.named.second&.split(",").to_a.freeze
-  runner_matrix = GitHubRunnerMatrix.new(testing_formulae, deleted_formulae,
-                                         all_supported:    args.all_supported?,
-                                         dependent_matrix: args.dependents?)
-  runners = runner_matrix.active_runner_specs_hash
-
-  ohai "Runners", JSON.pretty_generate(runners)
-
-  github_output = ENV.fetch("GITHUB_OUTPUT")
-  File.open(github_output, "a") do |f|
-    f.puts("runners=#{runners.to_json}")
-    f.puts("runners_present=#{runners.present?}")
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/DetermineTestRunners/Args.html b/docs/Homebrew/DevCmd/DetermineTestRunners/Args.html deleted file mode 100644 index 7652dce46..000000000 --- a/docs/Homebrew/DevCmd/DetermineTestRunners/Args.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::DetermineTestRunners::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::DetermineTestRunners::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/determine_test_runners.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #all_supported?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/determine_test_runners.rbi', line 15
-
-def all_supported?; end
-
-
- -
-

- - #dependents?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/determine_test_runners.rbi', line 18
-
-def dependents?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/determine_test_runners.rbi', line 21
-
-def eval_all?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/DispatchBuildBottle.html b/docs/Homebrew/DevCmd/DispatchBuildBottle.html deleted file mode 100644 index 1d35b2465..000000000 --- a/docs/Homebrew/DevCmd/DispatchBuildBottle.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::DispatchBuildBottle - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::DispatchBuildBottle - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/dispatch-build-bottle.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::DispatchBuildBottle::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-
-
# File 'dev-cmd/dispatch-build-bottle.rb', line 38
-
-def run
-  tap = Tap.fetch(args.tap || CoreTap.instance.name)
-  user, repo = tap.full_name.split("/")
-  ref = "master"
-  workflow = args.workflow || "dispatch-build-bottle.yml"
-
-  runners = []
-
-  if (macos = args.macos&.compact_blank) && macos.present?
-    runners += macos.map do |element|
-      # We accept runner name syntax (11-arm64) or bottle syntax (arm64_big_sur)
-      os, arch = element.then do |s|
-        tag = Utils::Bottles::Tag.from_symbol(s.to_sym)
-        [tag.to_macos_version, tag.arch]
-      rescue ArgumentError, MacOSVersion::Error
-        os, arch = s.split("-", 2)
-        [MacOSVersion.new(os), arch&.to_sym]
-      end
-
-      if arch.present? && arch != :x86_64
-        "#{os}-#{arch}"
-      else
-        os.to_s
-      end
-    end
-  end
-
-  if args.linux?
-    runners << "ubuntu-22.04"
-  elsif args.linux_self_hosted?
-    runners << "linux-self-hosted-1"
-  end
-
-  raise UsageError, "Must specify `--macos`, `--linux` or `--linux-self-hosted` option." if runners.empty?
-
-  args.named.to_resolved_formulae.each do |formula|
-    # Required inputs
-    inputs = {
-      runner:  runners.join(","),
-      formula: formula.name,
-    }
-
-    # Optional inputs
-    # These cannot be passed as nil to GitHub API
-    inputs[:timeout] = args.timeout if args.timeout
-    inputs[:issue] = args.issue if args.issue
-    inputs[:upload] = args.upload?
-
-    ohai "Dispatching #{tap} bottling request of formula \"#{formula.name}\" for #{runners.join(", ")}"
-    GitHub.workflow_dispatch_event(user, repo, workflow, ref, **inputs)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/DispatchBuildBottle/Args.html b/docs/Homebrew/DevCmd/DispatchBuildBottle/Args.html deleted file mode 100644 index 5006b20b7..000000000 --- a/docs/Homebrew/DevCmd/DispatchBuildBottle/Args.html +++ /dev/null @@ -1,853 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::DispatchBuildBottle::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::DispatchBuildBottle::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #issueString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 15
-
-def issue; end
-
-
- -
-

- - #linux?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 18
-
-def linux?; end
-
-
- -
-

- - #linux_self_hosted?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 21
-
-def linux_self_hosted?; end
-
-
- -
-

- - #linux_wheezy?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 24
-
-def linux_wheezy?; end
-
-
- -
-

- - #macosArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 27
-
-def macos; end
-
-
- -
-

- - #tapString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 30
-
-def tap; end
-
-
- -
-

- - #timeoutString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 33
-
-def timeout; end
-
-
- -
-

- - #upload?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 36
-
-def upload?; end
-
-
- -
-

- - #workflowString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/dispatch_build_bottle.rbi', line 39
-
-def workflow; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Edit.html b/docs/Homebrew/DevCmd/Edit.html deleted file mode 100644 index 6f66f3b40..000000000 --- a/docs/Homebrew/DevCmd/Edit.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Edit - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Edit - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/edit.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/edit.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Edit::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/edit.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'dev-cmd/edit.rb', line 29
-
-def run
-  ENV["COLORTERM"] = ENV.fetch("HOMEBREW_COLORTERM", nil)
-
-  unless (HOMEBREW_REPOSITORY/".git").directory?
-    odie <<~EOS
-      Changes will be lost!
-      The first time you `brew update`, all local changes will be lost; you should
-      thus `brew update` before you `brew edit`!
-    EOS
-  end
-
-  paths = if args.named.empty?
-    # Sublime requires opting into the project editing path,
-    # as opposed to VS Code which will infer from the .vscode path
-    if which_editor(silent: true) == "subl"
-      ["--project", "#{HOMEBREW_REPOSITORY}/.sublime/homebrew.sublime-project"]
-    else
-      # If no formulae are listed, open the project root in an editor.
-      [HOMEBREW_REPOSITORY]
-    end
-  else
-    expanded_paths = args.named.to_paths
-    expanded_paths.each do |path|
-      raise_with_message!(path, args.cask?) unless path.exist?
-    end
-    expanded_paths
-  end
-
-  if args.print_path?
-    paths.each { puts _1 }
-    return
-  end
-
-  exec_editor(*paths)
-
-  if paths.any? do |path|
-       !Homebrew::EnvConfig.no_install_from_api? &&
-       !Homebrew::EnvConfig.no_env_hints? &&
-       (core_formula_path?(path) || core_cask_path?(path) || core_formula_tap?(path) || core_cask_tap?(path))
-     end
-    opoo <<~EOS
-      `brew install` ignores locally edited casks and formulae if
-      HOMEBREW_NO_INSTALL_FROM_API is not set.
-    EOS
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Edit/Args.html b/docs/Homebrew/DevCmd/Edit/Args.html deleted file mode 100644 index 8d7e6f994..000000000 --- a/docs/Homebrew/DevCmd/Edit/Args.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Edit::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Edit::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/edit.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/edit.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/edit.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/edit.rbi', line 21
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/edit.rbi', line 24
-
-def formulae?; end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/edit.rbi', line 27
-
-def print_path?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Extract.html b/docs/Homebrew/DevCmd/Extract.html deleted file mode 100644 index c3ac4af8f..000000000 --- a/docs/Homebrew/DevCmd/Extract.html +++ /dev/null @@ -1,588 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Extract - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Extract - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/extract.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/extract.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
BOTTLE_BLOCK_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/  bottle (?:do.+?end|:[a-z]+)\n\n/m
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Extract::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/extract.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-
-
# File 'dev-cmd/extract.rb', line 34
-
-def run
-  if (tap_with_name = args.named.first&.then { Tap.with_formula_name(_1) })
-    source_tap, name = tap_with_name
-  else
-    name = args.named.first.downcase
-    source_tap = CoreTap.instance
-  end
-  raise TapFormulaUnavailableError.new(source_tap, name) unless source_tap.installed?
-
-  destination_tap = Tap.fetch(args.named.second)
-  unless Homebrew::EnvConfig.developer?
-    odie "Cannot extract formula to homebrew/core!" if destination_tap.core_tap?
-    odie "Cannot extract formula to homebrew/cask!" if destination_tap.core_cask_tap?
-    odie "Cannot extract formula to the same tap!" if destination_tap == source_tap
-  end
-  destination_tap.install unless destination_tap.installed?
-
-  repo = source_tap.path
-  pattern = if source_tap.core_tap?
-    [source_tap.new_formula_path(name), repo/"Formula/#{name}.rb"].uniq
-  else
-    # A formula can technically live in the root directory of a tap or in any of its subdirectories
-    [repo/"#{name}.rb", repo/"**/#{name}.rb"]
-  end
-
-  if args.version
-    ohai "Searching repository history"
-    version = args.version
-    version_segments = Gem::Version.new(version).segments if Gem::Version.correct?(version)
-    rev = T.let(nil, T.nilable(String))
-    test_formula = T.let(nil, T.nilable(Formula))
-    result = ""
-    loop do
-      rev = rev.nil? ? "HEAD" : "#{rev}~1"
-      rev, (path,) = Utils::Git.last_revision_commit_of_files(repo, pattern, before_commit: rev)
-      if rev.nil? && source_tap.shallow?
-        odie <<~EOS
-          Could not find #{name} but #{source_tap} is a shallow clone!
-          Try again after running:
-            git -C "#{source_tap.path}" fetch --unshallow
-        EOS
-      elsif rev.nil?
-        odie "Could not find #{name}! The formula or version may not have existed."
-      end
-
-      file = repo/path
-      result = Utils::Git.last_revision_of_file(repo, file, before_commit: rev)
-      if result.empty?
-        odebug "Skipping revision #{rev} - file is empty at this revision"
-        next
-      end
-
-      test_formula = formula_at_revision(repo, name, file, rev)
-      break if test_formula.nil? || test_formula.version == version
-
-      if version_segments && Gem::Version.correct?(test_formula.version)
-        test_formula_version_segments = Gem::Version.new(test_formula.version).segments
-        if version_segments.length < test_formula_version_segments.length
-          odebug "Apply semantic versioning with #{test_formula_version_segments}"
-          break if version_segments == test_formula_version_segments.first(version_segments.length)
-        end
-      end
-
-      odebug "Trying #{test_formula.version} from revision #{rev} against desired #{version}"
-    end
-    odie "Could not find #{name}! The formula or version may not have existed." if test_formula.nil?
-  else
-    # Search in the root directory of `repository` as well as recursively in all of its subdirectories.
-    files = Dir[repo/"{,**/}"].filter_map do |dir|
-      Pathname.glob("#{dir}/#{name}.rb").find(&:file?)
-    end
-
-    if files.empty?
-      ohai "Searching repository history"
-      rev, (path,) = Utils::Git.last_revision_commit_of_files(repo, pattern)
-      odie "Could not find #{name}! The formula or version may not have existed." if rev.nil?
-      file = repo/path
-      version = T.must(formula_at_revision(repo, name, file, rev)).version
-      result = Utils::Git.last_revision_of_file(repo, file)
-    else
-      file = files.fetch(0).realpath
-      rev = T.let("HEAD", T.nilable(String))
-      version = Formulary.factory(file).version
-      result = File.read(file)
-    end
-  end
-
-  # The class name has to be renamed to match the new filename,
-  # e.g. Foo version 1.2.3 becomes FooAT123 and resides in Foo@1.2.3.rb.
-  class_name = Formulary.class_s(name)
-
-  # Remove any existing version suffixes, as a new one will be added later
-  name.sub!(/\b@(.*)\z\b/i, "")
-  versioned_name = Formulary.class_s("#{name}@#{version}")
-  result.sub!("class #{class_name} < Formula", "class #{versioned_name} < Formula")
-
-  # Remove bottle blocks, they won't work.
-  result.sub!(BOTTLE_BLOCK_REGEX, "")
-
-  path = destination_tap.path/"Formula/#{name}@#{version.to_s.downcase}.rb"
-  if path.exist?
-    unless args.force?
-      odie <<~EOS
-        Destination formula already exists: #{path}
-        To overwrite it and continue anyways, run:
-          brew extract --force --version=#{version} #{name} #{destination_tap.name}
-      EOS
-    end
-    odebug "Overwriting existing formula at #{path}"
-    path.delete
-  end
-  ohai "Writing formula for #{name} from revision #{rev} to:", path
-  path.dirname.mkpath
-  path.write result
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Extract/Args.html b/docs/Homebrew/DevCmd/Extract/Args.html deleted file mode 100644 index 57e355e64..000000000 --- a/docs/Homebrew/DevCmd/Extract/Args.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Extract::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Extract::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/extract.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/extract.rbi', line 15
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/extract.rbi', line 18
-
-def force?; end
-
-
- -
-

- - #versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/extract.rbi', line 21
-
-def version; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/FormulaCmd.html b/docs/Homebrew/DevCmd/FormulaCmd.html deleted file mode 100644 index 967d349b8..000000000 --- a/docs/Homebrew/DevCmd/FormulaCmd.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::FormulaCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::FormulaCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/formula.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/formula_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::FormulaCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/formula_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'dev-cmd/formula.rb', line 19
-
-def run
-  formula_paths = args.named.to_paths(only: :formula).select(&:exist?)
-  if formula_paths.blank? && args.named
-                                 .to_paths(only: :cask)
-                                 .any?(&:exist?)
-    odie "Found casks but did not find formulae!"
-  end
-  formula_paths.each { puts _1 }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/FormulaCmd/Args.html b/docs/Homebrew/DevCmd/FormulaCmd/Args.html deleted file mode 100644 index e6f606f71..000000000 --- a/docs/Homebrew/DevCmd/FormulaCmd/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::FormulaCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::FormulaCmd::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/formula_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/GenerateCaskApi.html b/docs/Homebrew/DevCmd/GenerateCaskApi.html deleted file mode 100644 index 8267ff531..000000000 --- a/docs/Homebrew/DevCmd/GenerateCaskApi.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::GenerateCaskApi - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::GenerateCaskApi - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/generate-cask-api.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/generate_cask_api.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
CASK_JSON_TEMPLATE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
<<~EOS
-  ---
-  layout: cask_json
-  ---
-  {{ content }}
-EOS
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::GenerateCaskApi::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/generate_cask_api.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-
-
# File 'dev-cmd/generate-cask-api.rb', line 31
-
-def run
-  tap = CoreCaskTap.instance
-  raise TapUnavailableError, tap.name unless tap.installed?
-
-  unless args.dry_run?
-    directories = ["_data/cask", "api/cask", "api/cask-source", "cask", "api/internal/v3"].freeze
-    FileUtils.rm_rf directories
-    FileUtils.mkdir_p directories
-  end
-
-  Homebrew.with_no_api_env do
-    tap_migrations_json = JSON.dump(tap.tap_migrations)
-    File.write("api/cask_tap_migrations.json", tap_migrations_json) unless args.dry_run?
-
-    Cask::Cask.generating_hash!
-
-    tap.cask_files.each do |path|
-      cask = Cask::CaskLoader.load(path)
-      name = cask.token
-      json = JSON.pretty_generate(cask.to_hash_with_variations)
-      cask_source = path.read
-      html_template_name = html_template(name)
-
-      unless args.dry_run?
-        File.write("_data/cask/#{name}.json", "#{json}\n")
-        File.write("api/cask/#{name}.json", CASK_JSON_TEMPLATE)
-        File.write("api/cask-source/#{name}.rb", cask_source)
-        File.write("cask/#{name}.html", html_template_name)
-      end
-    rescue
-      onoe "Error while generating data for cask '#{path.stem}'."
-      raise
-    end
-
-    homebrew_cask_tap_json = JSON.generate(tap.to_internal_api_hash)
-    File.write("api/internal/v3/homebrew-cask.json", homebrew_cask_tap_json) unless args.dry_run?
-    canonical_json = JSON.pretty_generate(tap.cask_renames)
-    File.write("_data/cask_canonical.json", "#{canonical_json}\n") unless args.dry_run?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/GenerateCaskApi/Args.html b/docs/Homebrew/DevCmd/GenerateCaskApi/Args.html deleted file mode 100644 index c07dc4a8d..000000000 --- a/docs/Homebrew/DevCmd/GenerateCaskApi/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::GenerateCaskApi::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::GenerateCaskApi::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/generate_cask_api.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/generate_cask_api.rbi', line 15
-
-def dry_run?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/generate_cask_api.rbi', line 18
-
-def n?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/GenerateFormulaApi.html b/docs/Homebrew/DevCmd/GenerateFormulaApi.html deleted file mode 100644 index 9975c3a38..000000000 --- a/docs/Homebrew/DevCmd/GenerateFormulaApi.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::GenerateFormulaApi - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::GenerateFormulaApi - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/generate-formula-api.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/generate_formula_api.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
FORMULA_JSON_TEMPLATE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
<<~EOS
-  ---
-  layout: formula_json
-  ---
-  {{ content }}
-EOS
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::GenerateFormulaApi::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/generate_formula_api.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-
-
# File 'dev-cmd/generate-formula-api.rb', line 30
-
-def run
-  tap = CoreTap.instance
-  raise TapUnavailableError, tap.name unless tap.installed?
-
-  unless args.dry_run?
-    directories = ["_data/formula", "api/formula", "formula", "api/internal/v3"]
-    FileUtils.rm_rf directories + ["_data/formula_canonical.json"]
-    FileUtils.mkdir_p directories
-  end
-
-  Homebrew.with_no_api_env do
-    tap_migrations_json = JSON.dump(tap.tap_migrations)
-    File.write("api/formula_tap_migrations.json", tap_migrations_json) unless args.dry_run?
-
-    Formulary.enable_factory_cache!
-    Formula.generating_hash!
-
-    tap.formula_names.each do |name|
-      formula = Formulary.factory(name)
-      name = formula.name
-      json = JSON.pretty_generate(formula.to_hash_with_variations)
-      html_template_name = html_template(name)
-
-      unless args.dry_run?
-        File.write("_data/formula/#{name.tr("+", "_")}.json", "#{json}\n")
-        File.write("api/formula/#{name}.json", FORMULA_JSON_TEMPLATE)
-        File.write("formula/#{name}.html", html_template_name)
-      end
-    rescue
-      onoe "Error while generating data for formula '#{name}'."
-      raise
-    end
-
-    homebrew_core_tap_json = JSON.generate(tap.to_internal_api_hash)
-    File.write("api/internal/v3/homebrew-core.json", homebrew_core_tap_json) unless args.dry_run?
-    canonical_json = JSON.pretty_generate(tap.formula_renames.merge(tap.alias_table))
-    File.write("_data/formula_canonical.json", "#{canonical_json}\n") unless args.dry_run?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/GenerateFormulaApi/Args.html b/docs/Homebrew/DevCmd/GenerateFormulaApi/Args.html deleted file mode 100644 index d0aa848de..000000000 --- a/docs/Homebrew/DevCmd/GenerateFormulaApi/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::GenerateFormulaApi::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::GenerateFormulaApi::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/generate_formula_api.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/generate_formula_api.rbi', line 15
-
-def dry_run?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/generate_formula_api.rbi', line 18
-
-def n?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/GenerateManCompletions.html b/docs/Homebrew/DevCmd/GenerateManCompletions.html deleted file mode 100644 index cd9b4a464..000000000 --- a/docs/Homebrew/DevCmd/GenerateManCompletions.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::GenerateManCompletions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::GenerateManCompletions - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
dev-cmd/generate-man-completions.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/generate_man_completions.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::GenerateManCompletions::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/generate_man_completions.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'dev-cmd/generate-man-completions.rb', line 23
-
-def run
-  Homebrew.install_bundler_gems!(groups: ["man"])
-
-  Commands.rebuild_internal_commands_completion_list
-  Manpages.regenerate_man_pages(quiet: args.quiet?)
-  Completions.update_shell_completions!
-
-  diff = system_command "git", args: [
-    "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "docs/Manpage.md", "manpages", "completions"
-  ]
-  if diff.status.success?
-    ofail "No changes to manpage or completions."
-  else
-    puts "Manpage and completions updated."
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/GenerateManCompletions/Args.html b/docs/Homebrew/DevCmd/GenerateManCompletions/Args.html deleted file mode 100644 index fa5b1d02a..000000000 --- a/docs/Homebrew/DevCmd/GenerateManCompletions/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::GenerateManCompletions::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::GenerateManCompletions::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/generate_man_completions.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/InstallBundlerGems.html b/docs/Homebrew/DevCmd/InstallBundlerGems.html deleted file mode 100644 index f67332b08..000000000 --- a/docs/Homebrew/DevCmd/InstallBundlerGems.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::InstallBundlerGems - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::InstallBundlerGems - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/install-bundler-gems.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/install_bundler_gems.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::InstallBundlerGems::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/install_bundler_gems.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'dev-cmd/install-bundler-gems.rb', line 26
-
-def run
-  groups = args.groups || args.add_groups || []
-
-  if groups.delete("all")
-    groups |= Homebrew.valid_gem_groups
-  elsif args.groups # if we have been asked to replace
-    Homebrew.forget_user_gem_groups!
-  end
-
-  Process::UID.change_privilege(Process.euid) if Process.euid != Process.uid
-  Homebrew.install_bundler_gems!(groups:)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/InstallBundlerGems/Args.html b/docs/Homebrew/DevCmd/InstallBundlerGems/Args.html deleted file mode 100644 index 97e2108d1..000000000 --- a/docs/Homebrew/DevCmd/InstallBundlerGems/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::InstallBundlerGems::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::InstallBundlerGems::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/install_bundler_gems.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #add_groupsArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/install_bundler_gems.rbi', line 15
-
-def add_groups; end
-
-
- -
-

- - #groupsArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/install_bundler_gems.rbi', line 18
-
-def groups; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Irb.html b/docs/Homebrew/DevCmd/Irb.html deleted file mode 100644 index ba12d43ae..000000000 --- a/docs/Homebrew/DevCmd/Irb.html +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Irb - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Irb - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/irb.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/irb.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, parser

- -
-

Constructor Details

- -
-

- - #initialize(argv = nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

work around IRB modifying ARGV.

- - -
-
-
-

Parameters:

-
    - -
  • - - argv - - - (Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-49
-
-
# File 'dev-cmd/irb.rb', line 49
-
-def initialize(argv = nil) = super(argv || ARGV.dup.freeze)
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Irb::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/irb.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-
-
# File 'dev-cmd/irb.rb', line 52
-
-def run
-  clean_argv
-
-  if args.examples?
-    puts <<~EOS
-      'v8'.f # => instance of the v8 formula
-      :hub.f.latest_version_installed?
-      :lua.f.methods - 1.methods
-      :mpd.f.recursive_dependencies.reject(&:installed?)
-
-      'vlc'.c # => instance of the vlc cask
-      :tsh.c.livecheckable?
-    EOS
-    return
-  end
-
-  if args.pry?
-    Homebrew.install_bundler_gems!(groups: ["pry"])
-    require "pry"
-  else
-    require "irb"
-  end
-
-  require "formula"
-  require "keg"
-  require "cask"
-
-  ohai "Interactive Homebrew Shell", "Example commands available with: `brew irb --examples`"
-  if args.pry?
-    Pry.config.should_load_rc = false # skip loading .pryrc
-    Pry.config.history_file = "#{Dir.home}/.brew_pry_history"
-    Pry.config.prompt_name = "brew"
-
-    Pry.start
-  else
-    ENV["IRBRC"] = (HOMEBREW_LIBRARY_PATH/"brew_irbrc").to_s
-
-    IRB.start
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Irb/Args.html b/docs/Homebrew/DevCmd/Irb/Args.html deleted file mode 100644 index a4565f66c..000000000 --- a/docs/Homebrew/DevCmd/Irb/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Irb::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Irb::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/irb.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #examples?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/irb.rbi', line 15
-
-def examples?; end
-
-
- -
-

- - #pry?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/irb.rbi', line 18
-
-def pry?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Linkage.html b/docs/Homebrew/DevCmd/Linkage.html deleted file mode 100644 index b19b3e4a9..000000000 --- a/docs/Homebrew/DevCmd/Linkage.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Linkage - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Linkage - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/linkage.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/linkage.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Linkage::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/linkage.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'dev-cmd/linkage.rb', line 33
-
-def run
-  CacheStoreDatabase.use(:linkage) do |db|
-    kegs = if args.named.to_default_kegs.empty?
-      Formula.installed.filter_map(&:any_installed_keg)
-    else
-      args.named.to_default_kegs
-    end
-    kegs.each do |keg|
-      ohai "Checking #{keg.name} linkage" if kegs.size > 1
-
-      result = LinkageChecker.new(keg, cache_db: db)
-
-      if args.test?
-        result.display_test_output(strict: args.strict?)
-        Homebrew.failed = true if result.broken_library_linkage?(test: true, strict: args.strict?)
-      elsif args.reverse?
-        result.display_reverse_output
-      else
-        result.display_normal_output
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Linkage/Args.html b/docs/Homebrew/DevCmd/Linkage/Args.html deleted file mode 100644 index b8a52a9f9..000000000 --- a/docs/Homebrew/DevCmd/Linkage/Args.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Linkage::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Linkage::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/linkage.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cached?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/linkage.rbi', line 15
-
-def cached?; end
-
-
- -
-

- - #reverse?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/linkage.rbi', line 18
-
-def reverse?; end
-
-
- -
-

- - #strict?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/linkage.rbi', line 21
-
-def strict?; end
-
-
- -
-

- - #test?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/linkage.rbi', line 24
-
-def test?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/LivecheckCmd.html b/docs/Homebrew/DevCmd/LivecheckCmd.html deleted file mode 100644 index 174037c5c..000000000 --- a/docs/Homebrew/DevCmd/LivecheckCmd.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::LivecheckCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::LivecheckCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/livecheck.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::LivecheckCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-
-
# File 'dev-cmd/livecheck.rb', line 51
-
-def run
-  Homebrew.install_bundler_gems!(groups: ["livecheck"])
-
-  all = args.eval_all?
-
-  if args.debug? && args.verbose?
-    puts args
-    puts Homebrew::EnvConfig.livecheck_watchlist if Homebrew::EnvConfig.livecheck_watchlist.present?
-  end
-
-  formulae_and_casks_to_check = Homebrew.with_no_api_env do
-    if args.tap
-      tap = Tap.fetch(T.must(args.tap))
-      formulae = args.cask? ? [] : tap.formula_files.map { |path| Formulary.factory(path) }
-      casks = args.formula? ? [] : tap.cask_files.map { |path| Cask::CaskLoader.load(path) }
-      formulae + casks
-    elsif args.installed?
-      formulae = args.cask? ? [] : Formula.installed
-      casks = args.formula? ? [] : Cask::Caskroom.casks
-      formulae + casks
-    elsif all
-      formulae = args.cask? ? [] : Formula.all(eval_all: args.eval_all?)
-      casks = args.formula? ? [] : Cask::Cask.all(eval_all: args.eval_all?)
-      formulae + casks
-    elsif args.named.present?
-      args.named.to_formulae_and_casks_with_taps
-    elsif File.exist?(watchlist_path)
-      begin
-        names = Pathname.new(watchlist_path).read.lines
-                        .reject { |line| line.start_with?("#") || line.blank? }
-                        .map(&:strip)
-
-        named_args = CLI::NamedArgs.new(*names, parent: args)
-        named_args.to_formulae_and_casks(ignore_unavailable: true)
-      rescue Errno::ENOENT => e
-        onoe e
-      end
-    else
-      raise UsageError, "A watchlist file is required when no arguments are given."
-    end
-  end
-
-  formulae_and_casks_to_check = formulae_and_casks_to_check.sort_by do |formula_or_cask|
-    formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name
-  end
-
-  raise UsageError, "No formulae or casks to check." if formulae_and_casks_to_check.blank?
-
-  options = {
-    json:                 args.json?,
-    full_name:            args.full_name?,
-    handle_name_conflict: !args.formula? && !args.cask?,
-    check_resources:      args.resources?,
-    newer_only:           args.newer_only?,
-    extract_plist:        args.extract_plist?,
-    quiet:                args.quiet?,
-    debug:                args.debug?,
-    verbose:              args.verbose?,
-  }.compact
-
-  Livecheck.run_checks(formulae_and_casks_to_check, **options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/LivecheckCmd/Args.html b/docs/Homebrew/DevCmd/LivecheckCmd/Args.html deleted file mode 100644 index 8b57af0a7..000000000 --- a/docs/Homebrew/DevCmd/LivecheckCmd/Args.html +++ /dev/null @@ -1,1149 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::LivecheckCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::LivecheckCmd::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 21
-
-def eval_all?; end
-
-
- -
-

- - #extract_plist?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 24
-
-def extract_plist?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 27
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 30
-
-def formulae?; end
-
-
- -
-

- - #full_name?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 33
-
-def full_name?; end
-
-
- -
-

- - #installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 36
-
-def installed?; end
-
-
- -
-

- - #json?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 39
-
-def json?; end
-
-
- -
-

- - #newer_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 42
-
-def newer_only?; end
-
-
- -
-

- - #r?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 45
-
-def r?; end
-
-
- -
-

- - #resources?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 48
-
-def resources?; end
-
-
- -
-

- - #tapString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/livecheck_cmd.rbi', line 51
-
-def tap; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/PrAutomerge.html b/docs/Homebrew/DevCmd/PrAutomerge.html deleted file mode 100644 index 512371c3a..000000000 --- a/docs/Homebrew/DevCmd/PrAutomerge.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::PrAutomerge - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::PrAutomerge - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/pr-automerge.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::PrAutomerge::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-
-
# File 'dev-cmd/pr-automerge.rb', line 38
-
-def run
-  without_labels = args.without_labels || [
-    "do not merge",
-    "new formula",
-    "automerge-skip",
-    "pre-release",
-    "CI-published-bottle-commits",
-  ]
-  tap = Tap.fetch(args.tap || CoreTap.instance.name)
-
-  query = "is:pr is:open repo:#{tap.full_name} draft:false"
-  query += args.ignore_failures? ? " -status:pending" : " status:success"
-  query += " review:approved" unless args.without_approval?
-  query += " label:\"#{args.with_label}\"" if args.with_label
-  without_labels.each { |label| query += " -label:\"#{label}\"" }
-  odebug "Searching: #{query}"
-
-  prs = GitHub.search_issues query
-  if prs.blank?
-    ohai "No matching pull requests!"
-    return
-  end
-
-  ohai "#{prs.count} matching pull #{Utils.pluralize("request", prs.count)}:"
-  pr_urls = []
-  prs.each do |pr|
-    puts "#{tap.full_name unless tap.core_tap?}##{pr["number"]}: #{pr["title"]}"
-    pr_urls << pr["html_url"]
-  end
-
-  publish_args = ["pr-publish"]
-  publish_args << "--tap=#{tap}" if tap
-  publish_args << "--workflow=#{args.workflow}" if args.workflow
-  publish_args << "--autosquash" if args.autosquash?
-  if args.publish?
-    safe_system HOMEBREW_BREW_FILE, *publish_args, *pr_urls
-  else
-    ohai "Now run:", "  brew #{publish_args.join " "} \\\n    #{pr_urls.join " \\\n    "}"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/PrAutomerge/Args.html b/docs/Homebrew/DevCmd/PrAutomerge/Args.html deleted file mode 100644 index b906cd8a3..000000000 --- a/docs/Homebrew/DevCmd/PrAutomerge/Args.html +++ /dev/null @@ -1,779 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::PrAutomerge::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::PrAutomerge::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #autosquash?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi', line 15
-
-def autosquash?; end
-
-
- -
-

- - #ignore_failures?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi', line 18
-
-def ignore_failures?; end
-
-
- -
-

- - #publish?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi', line 21
-
-def publish?; end
-
-
- -
-

- - #tapString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi', line 24
-
-def tap; end
-
-
- -
-

- - #with_labelString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi', line 27
-
-def with_label; end
-
-
- -
-

- - #without_approval?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi', line 30
-
-def without_approval?; end
-
-
- -
-

- - #without_labelsArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi', line 33
-
-def without_labels; end
-
-
- -
-

- - #workflowString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_automerge.rbi', line 36
-
-def workflow; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/PrPublish.html b/docs/Homebrew/DevCmd/PrPublish.html deleted file mode 100644 index 1412e3ddf..000000000 --- a/docs/Homebrew/DevCmd/PrPublish.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::PrPublish - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::PrPublish - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/pr-publish.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/pr_publish.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::PrPublish::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_publish.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-
-
# File 'dev-cmd/pr-publish.rb', line 34
-
-def run
-  tap = Tap.fetch(args.tap || CoreTap.instance.name)
-  workflow = args.workflow || "publish-commit-bottles.yml"
-  ref = args.branch || "master"
-
-  inputs = {
-    autosquash:   args.autosquash?,
-    large_runner: args.large_runner?,
-  }
-  inputs[:message] = args.message if args.message.presence
-
-  args.named.uniq.each do |arg|
-    arg = "#{tap.default_remote}/pull/#{arg}" if arg.to_i.positive?
-    url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
-    _, user, repo, issue = *url_match
-    odie "Not a GitHub pull request: #{arg}" unless issue
-
-    inputs[:pull_request] = issue
-
-    pr_labels = GitHub.pull_request_labels(user, repo, issue)
-    if pr_labels.include?("autosquash")
-      oh1 "Found `autosquash` label on ##{issue}. Requesting autosquash."
-      inputs[:autosquash] = true
-    end
-    if pr_labels.include?("large-bottle-upload")
-      oh1 "Found `large-bottle-upload` label on ##{issue}. Requesting upload on large runner."
-      inputs[:large_runner] = true
-    end
-
-    if args.tap.present? && !T.must("#{user}/#{repo}".casecmp(tap.full_name)).zero?
-      odie "Pull request URL is for #{user}/#{repo} but `--tap=#{tap.full_name}` was specified!"
-    end
-
-    ohai "Dispatching #{tap} pull request ##{issue}"
-    GitHub.workflow_dispatch_event(user, repo, workflow, ref, **inputs)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/PrPublish/Args.html b/docs/Homebrew/DevCmd/PrPublish/Args.html deleted file mode 100644 index 825063191..000000000 --- a/docs/Homebrew/DevCmd/PrPublish/Args.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::PrPublish::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::PrPublish::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/pr_publish.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #autosquash?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_publish.rbi', line 15
-
-def autosquash?; end
-
-
- -
-

- - #branchString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_publish.rbi', line 18
-
-def branch; end
-
-
- -
-

- - #large_runner?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_publish.rbi', line 21
-
-def large_runner?; end
-
-
- -
-

- - #messageString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_publish.rbi', line 24
-
-def message; end
-
-
- -
-

- - #tapString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_publish.rbi', line 27
-
-def tap; end
-
-
- -
-

- - #workflowString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_publish.rbi', line 30
-
-def workflow; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/PrPull.html b/docs/Homebrew/DevCmd/PrPull.html deleted file mode 100644 index a0a38566a..000000000 --- a/docs/Homebrew/DevCmd/PrPull.html +++ /dev/null @@ -1,1407 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::PrPull - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::PrPull - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
dev-cmd/pr-pull.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::PrPull::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 10
-
-def args; end
-
-
- -
-

- - #autosquash!(original_commit, tap:, reason: "", verbose: false, resolve: false, cherry_picked: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- TODO: -

fix test in test/dev-cmd/pr-pull_spec.rb and assume cherry_picked: false.

-
-
- - - -
-
-
- - -
- - - - -
-
-
-
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-
-
# File 'dev-cmd/pr-pull.rb', line 343
-
-def autosquash!(original_commit, tap:, reason: "", verbose: false, resolve: false, cherry_picked: true)
-  git_repo = tap.git_repository
-  original_head = git_repo.head_ref
-
-  commits = Utils.safe_popen_read("git", "-C", tap.path, "rev-list",
-                                  "--reverse", "#{original_commit}..HEAD").lines.map(&:strip)
-
-  # Generate a bidirectional mapping of commits <=> formula/cask files.
-  files_to_commits = {}
-  commits_to_files = commits.to_h do |commit|
-    files = Utils.safe_popen_read("git", "-C", tap.path, "diff-tree", "--diff-filter=AMD",
-                                  "-r", "--name-only", "#{commit}^", commit).lines.map(&:strip)
-    files.each do |file|
-      files_to_commits[file] ||= []
-      files_to_commits[file] << commit
-      tap_file = (tap.path/file).to_s
-      if (tap_file.start_with?("#{tap.formula_dir}/") || tap_file.start_with?("#{tap.cask_dir}/")) &&
-         File.extname(file) == ".rb"
-        next
-      end
-
-      odie <<~EOS
-        Autosquash can only squash commits that modify formula or cask files.
-          File:   #{file}
-          Commit: #{commit}
-      EOS
-    end
-    [commit, files]
-  end
-
-  # Reset to state before cherry-picking.
-  safe_system "git", "-C", tap.path, "reset", "--hard", original_commit
-
-  # Iterate over every commit in the pull request series, but if we have to squash
-  # multiple commits into one, ensure that we skip over commits we've already squashed.
-  processed_commits = T.let([], T::Array[String])
-  commits.each do |commit|
-    next if processed_commits.include? commit
-
-    files = commits_to_files[commit]
-    if files.length == 1 && files_to_commits[files.first].length == 1
-      # If there's a 1:1 mapping of commits to files, just cherry pick and (maybe) reword.
-      reword_package_commit(
-        commit, files.first, git_repo:, reason:, verbose:, resolve:
-      )
-      processed_commits << commit
-    elsif files.length == 1 && files_to_commits[files.first].length > 1
-      # If multiple commits modify a single file, squash them down into a single commit.
-      file = files.first
-      commits = files_to_commits[file]
-      squash_package_commits(commits, file, git_repo:, reason:, verbose:, resolve:)
-      processed_commits += commits
-    else
-      # We can't split commits (yet) so just raise an error.
-      odie <<~EOS
-        Autosquash can't split commits that modify multiple files.
-          Commit: #{commit}
-          Files:  #{files.join " "}
-      EOS
-    end
-  end
-rescue
-  opoo "Autosquash encountered an error; resetting to original state at #{original_head}"
-  system "git", "-C", tap.path, "reset", "--hard", original_head
-  system "git", "-C", tap.path, "cherry-pick", "--abort" if cherry_picked
-  raise
-end
-
-
- -
-

- - #determine_bump_subject(old_contents, new_contents, subject_path, reason: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-
-
# File 'dev-cmd/pr-pull.rb', line 243
-
-def determine_bump_subject(old_contents, new_contents, subject_path, reason: nil)
-  subject_path = Pathname(subject_path)
-  tap          = Tap.from_path(subject_path)
-  subject_name = subject_path.basename.to_s.chomp(".rb")
-  is_cask      = subject_path.to_s.start_with?("#{tap.cask_dir}/")
-  name         = is_cask ? "cask" : "formula"
-
-  new_package = get_package(tap, subject_name, subject_path, new_contents)
-
-  return "#{subject_name}: delete #{reason}".strip if new_package.blank?
-
-  old_package = get_package(tap, subject_name, subject_path, old_contents)
-
-  if old_package.blank?
-    "#{subject_name} #{new_package.version} (new #{name})"
-  elsif old_package.version != new_package.version
-    "#{subject_name} #{new_package.version}"
-  elsif !is_cask && old_package.revision != new_package.revision
-    "#{subject_name}: revision #{reason}".strip
-  elsif is_cask && old_package.sha256 != new_package.sha256
-    "#{subject_name}: checksum update #{reason}".strip
-  else
-    "#{subject_name}: #{reason || "rebuild"}".strip
-  end
-end
-
-
- -
-

- - #get_package(tap, subject_name, subject_path, content) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-
-
# File 'dev-cmd/pr-pull.rb', line 226
-
-def get_package(tap, subject_name, subject_path, content)
-  if subject_path.to_s.start_with?("#{tap.cask_dir}/")
-    cask = begin
-      Cask::CaskLoader.load(content.dup)
-    rescue Cask::CaskUnavailableError
-      nil
-    end
-    return cask
-  end
-
-  begin
-    Formulary.from_contents(subject_name, subject_path, content, :stable)
-  rescue FormulaUnavailableError
-    nil
-  end
-end
-
-
- -
-

- - #reword_package_commit(commit, file, git_repo:, reason: "", verbose: false, resolve: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Cherry picks a single commit that modifies a single file. -Potentially rewords this commit using #determine_bump_subject.

- - -
-
-
- - -
- - - - -
-
-
-
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-
-
# File 'dev-cmd/pr-pull.rb', line 271
-
-def reword_package_commit(commit, file, git_repo:, reason: "", verbose: false, resolve: false)
-  package_file = git_repo.pathname / file
-  package_name = package_file.basename.to_s.chomp(".rb")
-
-  odebug "Cherry-picking #{package_file}: #{commit}"
-  Utils::Git.cherry_pick!(git_repo.to_s, commit, verbose:, resolve:)
-
-  old_package = Utils::Git.file_at_commit(git_repo.to_s, file, "HEAD^")
-  new_package = Utils::Git.file_at_commit(git_repo.to_s, file, "HEAD")
-
-  bump_subject = determine_bump_subject(old_package, new_package, package_file, reason:).strip
-  subject, body, trailers = separate_commit_message(git_repo.commit_message)
-
-  if subject != bump_subject && !subject.start_with?("#{package_name}:")
-    safe_system("git", "-C", git_repo.pathname, "commit", "--amend", "-q",
-                "-m", bump_subject, "-m", subject, "-m", body, "-m", trailers)
-    ohai bump_subject
-  else
-    ohai subject
-  end
-end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-
-
# File 'dev-cmd/pr-pull.rb', line 74
-
-def run
-  # Needed when extracting the CI artifact.
-  ensure_executable!("unzip", reason: "extracting CI artifacts")
-
-  workflows = args.workflows.presence || ["tests.yml"]
-  artifact_pattern = args.artifact_pattern || "bottles{,_*}"
-  tap = Tap.fetch(args.tap || CoreTap.instance.name)
-  raise TapUnavailableError, tap.name unless tap.installed?
-
-  Utils::Git.set_name_email!(committer: args.committer.blank?)
-  Utils::Git.setup_gpg!
-
-  if (committer = args.committer)
-    committer = Utils.parse_author!(committer)
-    ENV["GIT_COMMITTER_NAME"] = committer[:name]
-    ENV["GIT_COMMITTER_EMAIL"] = committer[:email]
-  end
-
-  args.named.uniq.each do |arg|
-    arg = "#{tap.default_remote}/pull/#{arg}" if arg.to_i.positive?
-    url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
-    _, user, repo, pr = *url_match
-    odie "Not a GitHub pull request: #{arg}" unless pr
-
-    git_repo = tap.git_repository
-    if !git_repo.default_origin_branch? && !args.branch_okay? && !args.no_commit? && !args.no_cherry_pick?
-      origin_branch_name = git_repo.origin_branch_name
-      opoo "Current branch is #{git_repo.branch_name}: do you need to pull inside #{origin_branch_name}?"
-    end
-
-    pr_labels = GitHub.pull_request_labels(user, repo, pr)
-    if pr_labels.include?("autosquash") && !args.autosquash?
-      opoo "Pull request is labelled `autosquash`: do you need to pass `--autosquash`?"
-    end
-
-    pr_check_conflicts("#{user}/#{repo}", pr)
-
-    ohai "Fetching #{tap} pull request ##{pr}"
-    dir = Dir.mktmpdir("pr-pull-#{pr}-", HOMEBREW_TEMP)
-    begin
-      cd dir do
-        current_branch_head = ENV["GITHUB_SHA"] || tap.git_head
-        original_commit = if args.no_cherry_pick?
-          # TODO: Handle the case where `merge-base` returns multiple commits.
-          Utils.safe_popen_read("git", "-C", tap.path, "merge-base", "origin/HEAD",
-                                current_branch_head).strip
-        else
-          current_branch_head
-        end
-        odebug "Pull request merge-base: #{original_commit}"
-
-        unless args.no_commit?
-          cherry_pick_pr!(user, repo, pr, path: tap.path) unless args.no_cherry_pick?
-          if args.autosquash? && !args.dry_run?
-            autosquash!(original_commit, tap:, cherry_picked: !args.no_cherry_pick?,
-                        verbose: args.verbose?, resolve: args.resolve?, reason: args.message)
-          end
-          signoff!(git_repo, pull_request: pr, dry_run: args.dry_run?) unless args.clean?
-        end
-
-        unless formulae_need_bottles?(tap, original_commit, pr_labels)
-          ohai "Skipping artifacts for ##{pr} as the formulae don't need bottles"
-          next
-        end
-
-        workflows.each do |workflow|
-          workflow_run = GitHub.get_workflow_run(
-            user, repo, pr, workflow_id: workflow, artifact_pattern:
-          )
-          if args.ignore_missing_artifacts.present? &&
-             T.must(args.ignore_missing_artifacts).include?(workflow) &&
-             workflow_run.first.blank?
-            # Ignore that workflow as it was not executed and we specified
-            # that we could skip it.
-            ohai "Ignoring workflow #{workflow} as requested by `--ignore-missing-artifacts`"
-            next
-          end
-
-          ohai "Downloading bottles for workflow: #{workflow}"
-
-          urls = GitHub.get_artifact_urls(workflow_run)
-          urls.each { |url| GitHub.download_artifact(url, pr) }
-        end
-
-        next if args.no_upload?
-
-        upload_args = ["pr-upload"]
-        upload_args << "--debug" if args.debug?
-        upload_args << "--verbose" if args.verbose?
-        upload_args << "--no-commit" if args.no_commit?
-        upload_args << "--dry-run" if args.dry_run?
-        upload_args << "--keep-old" if args.keep_old?
-        upload_args << "--warn-on-upload-failure" if args.warn_on_upload_failure?
-        upload_args << "--committer=#{args.committer}" if args.committer
-        upload_args << "--root-url=#{args.root_url}" if args.root_url
-        upload_args << "--root-url-using=#{args.root_url_using}" if args.root_url_using
-        safe_system HOMEBREW_BREW_FILE, *upload_args
-      end
-    ensure
-      if args.retain_bottle_dir? && GitHub::Actions.env_set?
-        ohai "Bottle files retained at:", dir
-        File.open(ENV.fetch("GITHUB_OUTPUT"), "a") do |f|
-          f.puts "bottle_path=#{dir}"
-        end
-      else
-        FileUtils.remove_entry dir
-      end
-    end
-  end
-end
-
-
- -
-

- - #separate_commit_message(message) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Separates a commit message into subject, body and trailers.

- - -
-
-
- - -
- - - - -
-
-
-
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-
-
# File 'dev-cmd/pr-pull.rb', line 186
-
-def separate_commit_message(message)
-  subject = message.lines.first.strip
-
-  # Skip the subject and separate lines that look like trailers (e.g. "Co-authored-by")
-  # from lines that look like regular body text.
-  trailers, body = message.lines.drop(1).partition { |s| s.match?(/^[a-z-]+-by:/i) }
-
-  trailers = trailers.uniq.join.strip
-  body = body.join.strip.gsub(/\n{3,}/, "\n\n")
-
-  [subject, body, trailers]
-end
-
-
- -
-

- - #signoff!(git_repo, pull_request: nil, dry_run: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-
-
# File 'dev-cmd/pr-pull.rb', line 199
-
-def signoff!(git_repo, pull_request: nil, dry_run: false)
-  subject, body, trailers = separate_commit_message(git_repo.commit_message)
-
-  if pull_request
-    # This is a tap pull request and approving reviewers should also sign-off.
-    tap = Tap.from_path(git_repo.pathname)
-    review_trailers = GitHub.approved_reviews(tap.user, tap.full_name.split("/").last,
-                                              pull_request).map do |r|
-      "Signed-off-by: #{r["name"]} <#{r["email"]}>"
-    end
-    trailers = trailers.lines.concat(review_trailers).map(&:strip).uniq.join("\n")
-
-    # Append the close message as well, unless the commit body already includes it.
-    close_message = "Closes ##{pull_request}."
-    body += "\n\n#{close_message}" unless body.include? close_message
-  end
-
-  git_args = Utils::Git.git, "-C", git_repo.pathname, "commit", "--amend", "--signoff", "--allow-empty",
-             "--quiet", "--message", subject, "--message", body, "--message", trailers
-
-  if dry_run
-    puts(*git_args)
-  else
-    safe_system(*git_args)
-  end
-end
-
-
- -
-

- - #squash_package_commits(commits, file, git_repo:, reason: "", verbose: false, resolve: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Cherry picks multiple commits that each modify a single file. -Words the commit according to #determine_bump_subject with the body -corresponding to all the original commit messages combined.

- - -
-
-
- - -
- - - - -
-
-
-
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-
-
# File 'dev-cmd/pr-pull.rb', line 296
-
-def squash_package_commits(commits, file, git_repo:, reason: "", verbose: false, resolve: false)
-  odebug "Squashing #{file}: #{commits.join " "}"
-
-  # Format commit messages into something similar to `git fmt-merge-message`.
-  # * subject 1
-  # * subject 2
-  #   optional body
-  # * subject 3
-  messages = []
-  trailers = []
-  commits.each do |commit|
-    subject, body, trailer = separate_commit_message(git_repo.commit_message(commit))
-    body = body.lines.map { |line| "  #{line.strip}" }.join("\n")
-    messages << "* #{subject}\n#{body}".strip
-    trailers << trailer
-  end
-
-  # Get the set of authors in this series.
-  authors = Utils.safe_popen_read("git", "-C", git_repo.pathname, "show",
-                                  "--no-patch", "--pretty=%an <%ae>", *commits).lines.map(&:strip).uniq.compact
-
-  # Get the author and date of the first commit of this series, which we use for the squashed commit.
-  original_author = authors.shift
-  original_date = Utils.safe_popen_read "git", "-C", git_repo.pathname, "show", "--no-patch", "--pretty=%ad",
-                                        commits.first
-
-  # Generate trailers for coauthors and combine them with the existing trailers.
-  co_author_trailers = authors.map { |au| "Co-authored-by: #{au}" }
-  trailers = [trailers + co_author_trailers].flatten.uniq.compact
-
-  # Apply the patch series but don't commit anything yet.
-  Utils::Git.cherry_pick!(git_repo.pathname, "--no-commit", *commits, verbose:, resolve:)
-
-  # Determine the bump subject by comparing the original state of the tree to its current state.
-  package_file = git_repo.pathname / file
-  old_package = Utils::Git.file_at_commit(git_repo.pathname, file, "#{commits.first}^")
-  new_package = package_file.read
-  bump_subject = determine_bump_subject(old_package, new_package, package_file, reason:)
-
-  # Commit with the new subject, body and trailers.
-  safe_system("git", "-C", git_repo.pathname, "commit", "--quiet",
-              "-m", bump_subject, "-m", messages.join("\n"), "-m", trailers.join("\n"),
-              "--author", original_author, "--date", original_date, "--", file)
-  ohai bump_subject
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/PrPull/Args.html b/docs/Homebrew/DevCmd/PrPull/Args.html deleted file mode 100644 index 132065f78..000000000 --- a/docs/Homebrew/DevCmd/PrPull/Args.html +++ /dev/null @@ -1,1741 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::PrPull::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::PrPull::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #artifactString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 15
-
-def artifact; end
-
-
- -
-

- - #artifact_patternString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 18
-
-def artifact_pattern; end
-
-
- -
-

- - #autosquash?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 21
-
-def autosquash?; end
-
-
- -
-

- - #branch_okay?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 24
-
-def branch_okay?; end
-
-
- -
-

- - #clean?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 27
-
-def clean?; end
-
-
- -
-

- - #committerString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 30
-
-def committer; end
-
-
- -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 33
-
-def dry_run?; end
-
-
- -
-

- - #ignore_missing_artifactsArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 36
-
-def ignore_missing_artifacts; end
-
-
- -
-

- - #keep_old?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 39
-
-def keep_old?; end
-
-
- -
-

- - #messageString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 42
-
-def message; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 45
-
-def n?; end
-
-
- -
-

- - #no_cherry_pick?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 48
-
-def no_cherry_pick?; end
-
-
- -
-

- - #no_commit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 51
-
-def no_commit?; end
-
-
- -
-

- - #no_upload?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 54
-
-def no_upload?; end
-
-
- -
-

- - #resolve?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 57
-
-def resolve?; end
-
-
- -
-

- - #retain_bottle_dir?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 60
-
-def retain_bottle_dir?; end
-
-
- -
-

- - #root_urlString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 63
-
-def root_url; end
-
-
- -
-

- - #root_url_usingString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 66
-
-def root_url_using; end
-
-
- -
-

- - #tapString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 69
-
-def tap; end
-
-
- -
-

- - #warn_on_upload_failure?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 72
-
-def warn_on_upload_failure?; end
-
-
- -
-

- - #workflowsArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-75
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_pull.rbi', line 75
-
-def workflows; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/PrUpload.html b/docs/Homebrew/DevCmd/PrUpload.html deleted file mode 100644 index e26e16477..000000000 --- a/docs/Homebrew/DevCmd/PrUpload.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::PrUpload - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::PrUpload - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/pr-upload.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::PrUpload::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'dev-cmd/pr-upload.rb', line 44
-
-def run
-  json_files = Dir["*.bottle.json"]
-  odie "No bottle JSON files found in the current working directory" if json_files.blank?
-
-  Homebrew.install_bundler_gems!(groups: ["pr_upload"])
-
-  bottles_hash = bottles_hash_from_json_files(json_files, args)
-
-  unless args.upload_only?
-    bottle_args = ["bottle", "--merge", "--write"]
-    bottle_args << "--verbose" if args.verbose?
-    bottle_args << "--debug" if args.debug?
-    bottle_args << "--keep-old" if args.keep_old?
-    bottle_args << "--root-url=#{args.root_url}" if args.root_url
-    bottle_args << "--committer=#{args.committer}" if args.committer
-    bottle_args << "--no-commit" if args.no_commit?
-    bottle_args << "--root-url-using=#{args.root_url_using}" if args.root_url_using
-    bottle_args += json_files
-
-    if args.dry_run?
-      dry_run_service = if github_packages?(bottles_hash)
-        # GitHub Packages has its own --dry-run handling.
-        nil
-      elsif github_releases?(bottles_hash)
-        "GitHub Releases"
-      else
-        odie "Service specified by root_url is not recognized"
-      end
-
-      if dry_run_service
-        puts <<~EOS
-          brew #{bottle_args.join " "}
-          Upload bottles described by these JSON files to #{dry_run_service}:
-            #{json_files.join("\n  ")}
-        EOS
-        return
-      end
-    end
-
-    check_bottled_formulae!(bottles_hash)
-
-    safe_system HOMEBREW_BREW_FILE, *bottle_args
-
-    json_files = Dir["*.bottle.json"]
-    if json_files.blank?
-      puts "No bottle JSON files after merge, no upload needed!"
-      return
-    end
-
-    # Reload the JSON files (in case `brew bottle --merge` generated
-    # `all: $SHA256` bottles)
-    bottles_hash = bottles_hash_from_json_files(json_files, args)
-
-    # Check the bottle commits did not break `brew audit`
-    unless args.no_commit?
-      audit_args = ["audit", "--skip-style"]
-      audit_args << "--verbose" if args.verbose?
-      audit_args << "--debug" if args.debug?
-      audit_args += bottles_hash.keys
-      safe_system HOMEBREW_BREW_FILE, *audit_args
-    end
-  end
-
-  if github_releases?(bottles_hash)
-    github_releases = GitHubReleases.new
-    github_releases.upload_bottles(bottles_hash)
-  elsif github_packages?(bottles_hash)
-    github_packages = GitHubPackages.new
-    github_packages.upload_bottles(bottles_hash,
-                                   keep_old:      args.keep_old?,
-                                   dry_run:       args.dry_run?,
-                                   warn_on_error: args.warn_on_upload_failure?)
-  else
-    odie "Service specified by root_url is not recognized"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/PrUpload/Args.html b/docs/Homebrew/DevCmd/PrUpload/Args.html deleted file mode 100644 index 4283f664d..000000000 --- a/docs/Homebrew/DevCmd/PrUpload/Args.html +++ /dev/null @@ -1,853 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::PrUpload::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::PrUpload::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #committerString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 15
-
-def committer; end
-
-
- -
-

- - #dry_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 18
-
-def dry_run?; end
-
-
- -
-

- - #keep_old?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 21
-
-def keep_old?; end
-
-
- -
-

- - #n?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 24
-
-def n?; end
-
-
- -
-

- - #no_commit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 27
-
-def no_commit?; end
-
-
- -
-

- - #root_urlString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 30
-
-def root_url; end
-
-
- -
-

- - #root_url_usingString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 33
-
-def root_url_using; end
-
-
- -
-

- - #upload_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 36
-
-def upload_only?; end
-
-
- -
-

- - #warn_on_upload_failure?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/pr_upload.rbi', line 39
-
-def warn_on_upload_failure?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Prof.html b/docs/Homebrew/DevCmd/Prof.html deleted file mode 100644 index d6f3d278d..000000000 --- a/docs/Homebrew/DevCmd/Prof.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Prof - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Prof - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/prof.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/prof.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Prof::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/prof.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'dev-cmd/prof.rb', line 22
-
-def run
-  Homebrew.install_bundler_gems!(groups: ["prof"], setup_path: false)
-
-  brew_rb = (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path
-  FileUtils.mkdir_p "prof"
-  cmd = args.named.first
-
-  case Commands.path(cmd)&.extname
-  when ".rb"
-    # expected file extension so we do nothing
-  when ".sh"
-    raise UsageError, <<~EOS
-      `#{cmd}` is a Bash command!
-      Try `hyperfine` for benchmarking instead.
-    EOS
-  else
-    raise UsageError, "`#{cmd}` is an unknown command!"
-  end
-
-  Homebrew.setup_gem_environment!
-
-  if args.stackprof?
-    # odeprecated. vernier is better in every way
-    with_env HOMEBREW_STACKPROF: "1" do
-      system(*HOMEBREW_RUBY_EXEC_ARGS, brew_rb, *args.named)
-    end
-    output_filename = "prof/d3-flamegraph.html"
-    safe_system "stackprof --d3-flamegraph prof/stackprof.dump > #{output_filename}"
-    exec_browser output_filename
-  elsif args.vernier?
-    output_filename = "prof/vernier.json"
-    Process::UID.change_privilege(Process.euid) if Process.euid != Process.uid
-    safe_system "vernier", "run", "--output=#{output_filename}", "--allocation_sample_rate=500", "--",
-                RUBY_PATH, brew_rb, *args.named
-    ohai "Profiling complete!"
-    puts "Upload the results from #{output_filename} to:"
-    puts "  #{Formatter.url("https://vernier.prof")}"
-  else
-    output_filename = "prof/call_stack.html"
-    safe_system "ruby-prof", "--printer=call_stack", "--file=#{output_filename}", brew_rb, "--", *args.named
-    exec_browser output_filename
-  end
-rescue OptionParser::InvalidOption => e
-  ofail e
-
-  # The invalid option could have been meant for the subcommand.
-  # Suggest `brew prof list -r` -> `brew prof -- list -r`
-  args = ARGV - ["--"]
-  puts "Try `brew prof -- #{args.join(" ")}` instead."
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Prof/Args.html b/docs/Homebrew/DevCmd/Prof/Args.html deleted file mode 100644 index 77599fc01..000000000 --- a/docs/Homebrew/DevCmd/Prof/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Prof::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Prof::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/prof.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #stackprof?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/prof.rbi', line 15
-
-def stackprof?; end
-
-
- -
-

- - #vernier?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/prof.rbi', line 18
-
-def vernier?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Release.html b/docs/Homebrew/DevCmd/Release.html deleted file mode 100644 index 7125de3a7..000000000 --- a/docs/Homebrew/DevCmd/Release.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Release - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Release - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/release.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/release.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Release::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/release.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'dev-cmd/release.rb', line 30
-
-def run
-  safe_system "git", "-C", HOMEBREW_REPOSITORY, "fetch", "origin" if Homebrew::EnvConfig.no_auto_update?
-
-  begin
-    latest_release = GitHub.get_latest_release "Homebrew", "brew"
-  rescue GitHub::API::HTTPNotFoundError
-    odie "No existing releases found!"
-  end
-  latest_version = Version.new latest_release["tag_name"]
-
-  if args.major? || args.minor?
-    one_month_ago = Date.today << 1
-    latest_major_minor_release = begin
-      GitHub.get_release "Homebrew", "brew", "#{latest_version.major_minor}.0"
-    rescue GitHub::API::HTTPNotFoundError
-      nil
-    end
-
-    if latest_major_minor_release.blank?
-      opoo "Unable to determine the release date of the latest major/minor release."
-    elsif Date.parse(latest_major_minor_release["published_at"]) > one_month_ago
-      odie "The latest major/minor release was less than one month ago."
-    end
-  end
-
-  new_version = if args.major?
-    Version.new "#{latest_version.major.to_i + 1}.0.0"
-  elsif args.minor?
-    Version.new "#{latest_version.major}.#{latest_version.minor.to_i + 1}.0"
-  else
-    Version.new "#{latest_version.major}.#{latest_version.minor}.#{latest_version.patch.to_i + 1}"
-  end.to_s
-
-  if args.major? || args.minor?
-    latest_major_minor_version = "#{latest_version.major}.#{latest_version.minor.to_i}.0"
-    ohai "Release notes since #{latest_major_minor_version} for #{new_version} blog post:"
-    # release notes without usernames, new contributors, or extra lines
-    blog_post_notes = GitHub.generate_release_notes("Homebrew", "brew", new_version,
-                                                    previous_tag: latest_major_minor_version)["body"]
-    blog_post_notes = blog_post_notes.lines.filter_map do |line|
-      next unless (match = line.match(/^\* (.*) by @[\w-]+ in (.*)$/))
-
-      "- [#{match[1]}](#{match[2]})"
-    end.sort
-    puts blog_post_notes
-  end
-
-  ohai "Creating draft release for version #{new_version}"
-
-  release_notes = if args.major? || args.minor?
-    "Release notes for this release can be found on the [Homebrew blog](https://brew.sh/blog/#{new_version}).\n"
-  else
-    ""
-  end
-  release_notes += GitHub.generate_release_notes("Homebrew", "brew", new_version,
-                                                 previous_tag: latest_version)["body"]
-
-  begin
-    release = GitHub.create_or_update_release "Homebrew", "brew", new_version, body: release_notes, draft: true
-  rescue *GitHub::API::ERRORS => e
-    odie "Unable to create release: #{e.message}!"
-  end
-
-  puts release["html_url"]
-  exec_browser release["html_url"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Release/Args.html b/docs/Homebrew/DevCmd/Release/Args.html deleted file mode 100644 index 0df1029f1..000000000 --- a/docs/Homebrew/DevCmd/Release/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Release::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Release::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/release.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #major?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/release.rbi', line 15
-
-def major?; end
-
-
- -
-

- - #minor?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/release.rbi', line 18
-
-def minor?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Ruby.html b/docs/Homebrew/DevCmd/Ruby.html deleted file mode 100644 index 3f4a5c223..000000000 --- a/docs/Homebrew/DevCmd/Ruby.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Ruby - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Ruby - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/ruby.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/ruby.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Ruby::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/ruby.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'dev-cmd/ruby.rb', line 26
-
-def run
-  ruby_sys_args = []
-  ruby_sys_args << "-r#{args.r}" if args.r
-  ruby_sys_args << "-e #{args.e}" if args.e
-  ruby_sys_args += args.named
-
-  exec(*HOMEBREW_RUBY_EXEC_ARGS,
-       "-I", $LOAD_PATH.join(File::PATH_SEPARATOR),
-       "-rglobal", "-rdev-cmd/irb",
-       *ruby_sys_args)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Ruby/Args.html b/docs/Homebrew/DevCmd/Ruby/Args.html deleted file mode 100644 index 5f48bc1de..000000000 --- a/docs/Homebrew/DevCmd/Ruby/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Ruby::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Ruby::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/ruby.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #eString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/ruby.rbi', line 15
-
-def e; end
-
-
- -
-

- - #rString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/ruby.rbi', line 18
-
-def r; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Rubydoc.html b/docs/Homebrew/DevCmd/Rubydoc.html deleted file mode 100644 index 261de1a64..000000000 --- a/docs/Homebrew/DevCmd/Rubydoc.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Rubydoc - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Rubydoc - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/rubydoc.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/rubydoc.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Rubydoc::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/rubydoc.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'dev-cmd/rubydoc.rb', line 20
-
-def run
-  Homebrew.install_bundler_gems!(groups: ["doc"])
-
-  HOMEBREW_LIBRARY_PATH.cd do |dir|
-    no_api_args = if args.only_public?
-      ["--hide-api", "private", "--hide-api", "internal"]
-    else
-      []
-    end
-
-    output_dir = dir/"doc"
-
-    safe_system "bundle", "exec", "yard", "doc", "--fail-on-warning", *no_api_args, "--output", output_dir
-
-    exec_browser "file://#{output_dir}/index.html" if args.open?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Rubydoc/Args.html b/docs/Homebrew/DevCmd/Rubydoc/Args.html deleted file mode 100644 index d4e85e5cf..000000000 --- a/docs/Homebrew/DevCmd/Rubydoc/Args.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Rubydoc::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Rubydoc::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/rubydoc.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #only_public?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/rubydoc.rbi', line 15
-
-def only_public?; end
-
-
- -
-

- - #open?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/rubydoc.rbi', line 18
-
-def open?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Sh.html b/docs/Homebrew/DevCmd/Sh.html deleted file mode 100644 index fb208cfce..000000000 --- a/docs/Homebrew/DevCmd/Sh.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Sh - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Sh - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/sh.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/sh.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Sh::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/sh.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-
-
# File 'dev-cmd/sh.rb', line 28
-
-def run
-  ENV.activate_extensions!(env: args.env)
-
-  ENV.deps = Formula.installed.select { |f| f.keg_only? && f.opt_prefix.directory? } if superenv?(args.env)
-  ENV.setup_build_environment
-  if superenv?(args.env)
-    # superenv stopped adding brew's bin but generally users will want it
-    ENV["PATH"] = PATH.new(ENV.fetch("PATH")).insert(1, HOMEBREW_PREFIX/"bin").to_s
-  end
-
-  ENV["VERBOSE"] = "1" if args.verbose?
-
-  preferred_shell = Utils::Shell.preferred_path(default: "/bin/bash")
-
-  if args.cmd.present?
-    safe_system(preferred_shell, "-c", args.cmd)
-  elsif args.named.present?
-    safe_system(preferred_shell, args.named.first)
-  else
-    shell_type = Utils::Shell.preferred
-    subshell = case shell_type
-    when :zsh
-      "PS1='brew %B%F{green}%~%f%b$ ' #{preferred_shell} -d -f"
-    when :bash
-      "PS1=\"brew \\[\\033[1;32m\\]\\w\\[\\033[0m\\]$ \" #{preferred_shell} --noprofile --norc"
-    else
-      "PS1=\"brew \\[\\033[1;32m\\]\\w\\[\\033[0m\\]$ \" #{preferred_shell}"
-    end
-    puts <<~EOS
-      Your shell has been configured to use Homebrew's build environment;
-      this should help you build stuff. Notably though, the system versions of
-      gem and pip will ignore our configuration and insist on using the
-      environment they were built under (mostly). Sadly, scons will also
-      ignore our configuration.
-      When done, type `exit`.
-    EOS
-    $stdout.flush
-    safe_system subshell
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Sh/Args.html b/docs/Homebrew/DevCmd/Sh/Args.html deleted file mode 100644 index 50468c348..000000000 --- a/docs/Homebrew/DevCmd/Sh/Args.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Sh::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Sh::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/sh.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/sh.rbi', line 15
-
-def c; end
-
-
- -
-

- - #cmdString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/sh.rbi', line 18
-
-def cmd; end
-
-
- -
-

- - #envString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/sh.rbi', line 21
-
-def env; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/StyleCmd.html b/docs/Homebrew/DevCmd/StyleCmd.html deleted file mode 100644 index 0c3f0bb46..000000000 --- a/docs/Homebrew/DevCmd/StyleCmd.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::StyleCmd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::StyleCmd - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/style.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::StyleCmd::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'dev-cmd/style.rb', line 45
-
-def run
-  Homebrew.install_bundler_gems!(groups: ["style"])
-
-  target = if args.no_named?
-    nil
-  else
-    args.named.to_paths
-  end
-
-  only_cops = args.only_cops
-  except_cops = args.except_cops
-
-  options = {
-    fix:         args.fix?,
-    reset_cache: args.reset_cache?,
-    debug:       args.debug?,
-    verbose:     args.verbose?,
-  }
-  if only_cops
-    options[:only_cops] = only_cops
-  elsif except_cops
-    options[:except_cops] = except_cops
-  else
-    options[:except_cops] = %w[FormulaAuditStrict]
-  end
-
-  Homebrew.failed = !Style.check_style_and_print(target, **options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/StyleCmd/Args.html b/docs/Homebrew/DevCmd/StyleCmd/Args.html deleted file mode 100644 index 8986ba520..000000000 --- a/docs/Homebrew/DevCmd/StyleCmd/Args.html +++ /dev/null @@ -1,853 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::StyleCmd::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::StyleCmd::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #context, #debug?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 15
-
-def cask?; end
-
-
- -
-

- - #casks?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 18
-
-def casks?; end
-
-
- -
-

- - #display_cop_names?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 21
-
-def display_cop_names?; end
-
-
- -
-

- - #except_copsArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 24
-
-def except_cops; end
-
-
- -
-

- - #fix?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 27
-
-def fix?; end
-
-
- -
-

- - #formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 30
-
-def formula?; end
-
-
- -
-

- - #formulae?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 33
-
-def formulae?; end
-
-
- -
-

- - #only_copsArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 36
-
-def only_cops; end
-
-
- -
-

- - #reset_cache?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi', line 39
-
-def reset_cache?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/TapNew.html b/docs/Homebrew/DevCmd/TapNew.html deleted file mode 100644 index 2a0f41603..000000000 --- a/docs/Homebrew/DevCmd/TapNew.html +++ /dev/null @@ -1,649 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::TapNew - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::TapNew - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
dev-cmd/tap-new.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/tap_new.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::TapNew::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tap_new.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-
-
# File 'dev-cmd/tap-new.rb', line 33
-
-def run
-  label = args.pull_label || "pr-pull"
-  branch = args.branch || "main"
-
-  tap = args.named.to_taps.fetch(0)
-  odie "Invalid tap name '#{tap}'" unless tap.path.to_s.match?(HOMEBREW_TAP_PATH_REGEX)
-  odie "Tap is already installed!" if tap.installed?
-
-  titleized_user = tap.user.dup
-  titleized_repo = tap.repo.dup
-  titleized_user[0] = titleized_user[0].upcase
-  titleized_repo[0] = titleized_repo[0].upcase
-  root_url = GitHubPackages.root_url(tap.user, "homebrew-#{tap.repo}") if args.github_packages?
-
-  (tap.path/"Formula").mkpath
-
-  # FIXME: https://github.com/errata-ai/vale/issues/818
-  # <!-- vale off -->
-  readme = <<~MARKDOWN
-    # #{titleized_user} #{titleized_repo}
-
-    ## How do I install these formulae?
-
-    `brew install #{tap}/<formula>`
-
-    Or `brew tap #{tap}` and then `brew install <formula>`.
-
-    Or, in a [`brew bundle`](https://github.com/Homebrew/homebrew-bundle) `Brewfile`:
-
-    ```ruby
-    tap "#{tap}"
-    brew "<formula>"
-    ```
-
-    ## Documentation
-
-    `brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh).
-  MARKDOWN
-  # <!-- vale on -->
-  write_path(tap, "README.md", readme)
-
-  actions_main = <<~YAML
-    name: brew test-bot
-
-    on:
-      push:
-        branches:
-          - #{branch}
-      pull_request:
-
-    jobs:
-      test-bot:
-        strategy:
-          matrix:
-            os: [ubuntu-22.04, macos-13]
-        runs-on: ${{ matrix.os }}
-        steps:
-          - name: Set up Homebrew
-            id: set-up-homebrew
-            uses: Homebrew/actions/setup-homebrew@master
-
-          - name: Cache Homebrew Bundler RubyGems
-            uses: actions/cache@v4
-            with:
-              path: ${{ steps.set-up-homebrew.outputs.gems-path }}
-              key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
-              restore-keys: ${{ runner.os }}-rubygems-
-
-          - run: brew test-bot --only-cleanup-before
-
-          - run: brew test-bot --only-setup
-
-          - run: brew test-bot --only-tap-syntax
-
-          - run: brew test-bot --only-formulae#{" --root-url='#{root_url}'" if root_url}
-            if: github.event_name == 'pull_request'
-
-          - name: Upload bottles as artifact
-            if: always() && github.event_name == 'pull_request'
-            uses: actions/upload-artifact@v4
-            with:
-              name: bottles_${{ matrix.os }}
-              path: '*.bottle.*'
-  YAML
-
-  pr_pull_permissions = {
-    "contents"      => "write",
-    "pull-requests" => "write",
-  }
-  pr_pull_env = {
-    "HOMEBREW_GITHUB_API_TOKEN" => "${{ github.token }}",
-  }
-  if args.github_packages?
-    pr_pull_permissions["packages"] = "write"
-    pr_pull_env["HOMEBREW_GITHUB_PACKAGES_TOKEN"] = "${{ github.token }}"
-    pr_pull_env["HOMEBREW_GITHUB_PACKAGES_USER"] = "${{ github.repository_owner }}"
-  end
-  actions_publish = <<~YAML
-    name: brew pr-pull
-
-    on:
-      pull_request_target:
-        types:
-          - labeled
-
-    jobs:
-      pr-pull:
-        if: contains(github.event.pull_request.labels.*.name, '#{label}')
-        runs-on: ubuntu-22.04
-        permissions:
-    #{pr_pull_permissions.sort.map { |k, v| "      #{k}: #{v}" }.join("\n")}
-        steps:
-          - name: Set up Homebrew
-            uses: Homebrew/actions/setup-homebrew@master
-
-          - name: Set up git
-            uses: Homebrew/actions/git-user-config@master
-
-          - name: Pull bottles
-            env:
-    #{pr_pull_env.sort.map { |k, v| "          #{k}: #{v}" }.join("\n")}
-              PULL_REQUEST: ${{ github.event.pull_request.number }}
-            run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST"
-
-          - name: Push commits
-            uses: Homebrew/actions/git-try-push@master
-            with:
-              token: ${{ github.token }}
-              branch: #{branch}
-
-          - name: Delete branch
-            if: github.event.pull_request.head.repo.fork == false
-            env:
-              BRANCH: ${{ github.event.pull_request.head.ref }}
-            run: git push --delete origin "$BRANCH"
-  YAML
-
-  (tap.path/".github/workflows").mkpath
-  write_path(tap, ".github/workflows/tests.yml", actions_main)
-  write_path(tap, ".github/workflows/publish.yml", actions_publish)
-
-  unless args.no_git?
-    cd tap.path do
-      Utils::Git.set_name_email!
-      Utils::Git.setup_gpg!
-
-      # Would be nice to use --initial-branch here but it's not available in
-      # older versions of Git that we support.
-      safe_system "git", "-c", "init.defaultBranch=#{branch}", "init"
-      safe_system "git", "add", "--all"
-      safe_system "git", "commit", "-m", "Create #{tap} tap"
-      safe_system "git", "branch", "-m", branch
-    end
-  end
-
-  ohai "Created #{tap}"
-  puts <<~EOS
-    #{tap.path}
-
-    When a pull request making changes to a formula (or formulae) becomes green
-    (all checks passed), then you can publish the built bottles.
-    To do so, label your PR as `#{label}` and the workflow will be triggered.
-  EOS
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/TapNew/Args.html b/docs/Homebrew/DevCmd/TapNew/Args.html deleted file mode 100644 index 5c8e93e01..000000000 --- a/docs/Homebrew/DevCmd/TapNew/Args.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::TapNew::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::TapNew::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/tap_new.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #branchString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tap_new.rbi', line 15
-
-def branch; end
-
-
- -
-

- - #github_packages?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tap_new.rbi', line 18
-
-def github_packages?; end
-
-
- -
-

- - #no_git?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tap_new.rbi', line 21
-
-def no_git?; end
-
-
- -
-

- - #pull_labelString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tap_new.rbi', line 24
-
-def pull_label; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Test.html b/docs/Homebrew/DevCmd/Test.html deleted file mode 100644 index 1bc0f2a03..000000000 --- a/docs/Homebrew/DevCmd/Test.html +++ /dev/null @@ -1,469 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Test - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Test - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/test.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/test.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Test::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/test.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-
-
# File 'dev-cmd/test.rb', line 33
-
-def run
-  Homebrew.install_bundler_gems!(groups: ["formula_test"], setup_path: false)
-
-  require "formula_assertions"
-  require "formula_free_port"
-
-  args.named.to_resolved_formulae.each do |f|
-    # Cannot test uninstalled formulae
-    unless f.latest_version_installed?
-      ofail "Testing requires the latest version of #{f.full_name}"
-      next
-    end
-
-    # Cannot test formulae without a test method
-    unless f.test_defined?
-      ofail "#{f.full_name} defines no test"
-      next
-    end
-
-    # Don't test unlinked formulae
-    if !args.force? && !f.keg_only? && !f.linked?
-      ofail "#{f.full_name} is not linked"
-      next
-    end
-
-    # Don't test formulae missing test dependencies
-    missing_test_deps = f.recursive_dependencies do |dependent, dependency|
-      Dependency.prune if dependency.installed?
-      next if dependency.test? && dependent == f
-
-      Dependency.prune unless dependency.required?
-    end.map(&:to_s)
-    unless missing_test_deps.empty?
-      ofail "#{f.full_name} is missing test dependencies: #{missing_test_deps.join(" ")}"
-      next
-    end
-
-    oh1 "Testing #{f.full_name}"
-
-    env = ENV.to_hash
-
-    begin
-      exec_args = HOMEBREW_RUBY_EXEC_ARGS + %W[
-        --
-        #{HOMEBREW_LIBRARY_PATH}/test.rb
-        #{f.path}
-      ].concat(args.options_only)
-
-      exec_args << "--HEAD" if f.head?
-
-      Utils.safe_fork do |error_pipe|
-        if Sandbox.available?
-          sandbox = Sandbox.new
-          f.logs.mkpath
-          sandbox.record_log(f.logs/"test.sandbox.log")
-          sandbox.allow_write_temp_and_cache
-          sandbox.allow_write_log(f)
-          sandbox.allow_write_xcode
-          sandbox.allow_write_path(HOMEBREW_PREFIX/"var/cache")
-          sandbox.allow_write_path(HOMEBREW_PREFIX/"var/homebrew/locks")
-          sandbox.allow_write_path(HOMEBREW_PREFIX/"var/log")
-          sandbox.allow_write_path(HOMEBREW_PREFIX/"var/run")
-          sandbox.deny_all_network_except_pipe(error_pipe) unless f.class.network_access_allowed?(:test)
-          sandbox.exec(*exec_args)
-        else
-          exec(*exec_args)
-        end
-      end
-    rescue Exception => e # rubocop:disable Lint/RescueException
-      retry if retry_test?(f)
-      ofail "#{f.full_name}: failed"
-      $stderr.puts e, Utils::Backtrace.clean(e)
-    ensure
-      ENV.replace(env)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Test/Args.html b/docs/Homebrew/DevCmd/Test/Args.html deleted file mode 100644 index 4236ec4f2..000000000 --- a/docs/Homebrew/DevCmd/Test/Args.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Test::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Test::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/test.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/test.rbi', line 18
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/test.rbi', line 21
-
-def force?; end
-
-
- -
-

- - #HEAD?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/test.rbi', line 15
-
-def HEAD?; end
-
-
- -
-

- - #keep_tmp?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/test.rbi', line 24
-
-def keep_tmp?; end
-
-
- -
-

- - #retry?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/test.rbi', line 27
-
-def retry?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Tests.html b/docs/Homebrew/DevCmd/Tests.html deleted file mode 100644 index 9adad9daa..000000000 --- a/docs/Homebrew/DevCmd/Tests.html +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Tests - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Tests - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
dev-cmd/tests.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Tests::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-
-
# File 'dev-cmd/tests.rb', line 44
-
-def run
-  # Given we might be testing various commands, we probably want everything (except sorbet-static)
-  Homebrew.install_bundler_gems!(groups: Homebrew.valid_gem_groups - ["sorbet"])
-
-  HOMEBREW_LIBRARY_PATH.cd do
-    setup_environment!
-
-    parallel = true
-
-    files = if args.only
-      # FIXME: This is safe once args are namespaced by command
-      test_name, line = T.unsafe(args.only).split(":", 2)
-
-      if line.nil?
-        Dir.glob("test/{#{test_name},#{test_name}/**/*}_spec.rb")
-      else
-        parallel = false
-        ["test/#{test_name}_spec.rb:#{line}"]
-      end
-    elsif args.changed?
-      changed_test_files
-    else
-      Dir.glob("test/**/*_spec.rb")
-    end
-
-    if files.blank?
-      raise UsageError, "The `--only` argument requires a valid file or folder name!" if args.only
-
-      if args.changed?
-        opoo "No tests are directly associated with the changed files!"
-        return
-      end
-    end
-
-    parallel = false if args.profile
-
-    parallel_rspec_log_name = "parallel_runtime_rspec"
-    parallel_rspec_log_name = "#{parallel_rspec_log_name}.generic" if args.generic?
-    parallel_rspec_log_name = "#{parallel_rspec_log_name}.online" if args.online?
-    parallel_rspec_log_name = "#{parallel_rspec_log_name}.log"
-
-    parallel_rspec_log_path = if ENV["CI"]
-      "tests/#{parallel_rspec_log_name}"
-    else
-      "#{HOMEBREW_CACHE}/#{parallel_rspec_log_name}"
-    end
-    ENV["PARALLEL_RSPEC_LOG_PATH"] = parallel_rspec_log_path
-
-    parallel_args = if ENV["CI"]
-      %W[
-        --combine-stderr
-        --serialize-stdout
-        --runtime-log #{parallel_rspec_log_path}
-      ]
-    else
-      %w[
-        --nice
-      ]
-    end
-
-    # Generate seed ourselves and output later to avoid multiple different
-    # seeds being output when running parallel tests.
-    seed = args.seed || rand(0xFFFF).to_i
-
-    bundle_args = ["-I", HOMEBREW_LIBRARY_PATH/"test"]
-    bundle_args += %W[
-      --seed #{seed}
-      --color
-      --require spec_helper
-    ]
-    bundle_args << "--fail-fast" if args.fail_fast?
-    bundle_args << "--profile" << args.profile if args.profile
-
-    # TODO: Refactor and move to extend/os
-    # rubocop:disable Homebrew/MoveToExtendOS
-    unless OS.mac?
-      bundle_args << "--tag" << "~needs_macos" << "--tag" << "~cask"
-      files = files.grep_v(%r{^test/(os/mac|cask)(/.*|_spec\.rb)$})
-    end
-
-    unless OS.linux?
-      bundle_args << "--tag" << "~needs_linux"
-      files = files.grep_v(%r{^test/os/linux(/.*|_spec\.rb)$})
-    end
-    # rubocop:enable Homebrew/MoveToExtendOS
-
-    bundle_args << "--tag" << "~needs_network" unless args.online?
-    unless ENV["CI"]
-      bundle_args << "--tag" << "~needs_ci" \
-                  << "--tag" << "~needs_svn"
-    end
-
-    puts "Randomized with seed #{seed}"
-
-    ENV["HOMEBREW_DEBUG"] = "1" if args.debug? # Used in spec_helper.rb to require the "debug" gem.
-
-    # Submit test flakiness information using BuildPulse
-    # BUILDPULSE used in spec_helper.rb
-    if use_buildpulse?
-      ENV["BUILDPULSE"] = "1"
-      ohai "Running tests with BuildPulse-friendly settings"
-    end
-
-    # Workaround for:
-    #
-    # ```
-    # ruby: no -r allowed while running setuid (SecurityError)
-    # ```
-    Process::UID.change_privilege(Process.euid) if Process.euid != Process.uid
-
-    if parallel
-      system "bundle", "exec", "parallel_rspec", *parallel_args, "--", *bundle_args, "--", *files
-    else
-      system "bundle", "exec", "rspec", *bundle_args, "--", *files
-    end
-    success = $CHILD_STATUS.success?
-
-    run_buildpulse if use_buildpulse?
-
-    return if success
-
-    Homebrew.failed = true
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Tests/Args.html b/docs/Homebrew/DevCmd/Tests/Args.html deleted file mode 100644 index b689248e0..000000000 --- a/docs/Homebrew/DevCmd/Tests/Args.html +++ /dev/null @@ -1,779 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Tests::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Tests::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #changed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi', line 15
-
-def changed?; end
-
-
- -
-

- - #coverage?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi', line 18
-
-def coverage?; end
-
-
- -
-

- - #fail_fast?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi', line 21
-
-def fail_fast?; end
-
-
- -
-

- - #generic?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi', line 24
-
-def generic?; end
-
-
- -
-

- - #online?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi', line 27
-
-def online?; end
-
-
- -
-

- - #onlyString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi', line 30
-
-def only; end
-
-
- -
-

- - #profileString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi', line 33
-
-def profile; end
-
-
- -
-

- - #seedString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi', line 36
-
-def seed; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Typecheck.html b/docs/Homebrew/DevCmd/Typecheck.html deleted file mode 100644 index b4518c19f..000000000 --- a/docs/Homebrew/DevCmd/Typecheck.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Typecheck - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Typecheck - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
dev-cmd/typecheck.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Typecheck::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-
-
# File 'dev-cmd/typecheck.rb', line 41
-
-def run
-  update = args.update? || args.update_all?
-  groups = update ? Homebrew.valid_gem_groups : ["typecheck"]
-  Homebrew.install_bundler_gems!(groups:)
-
-  # Sorbet doesn't use bash privileged mode so we align EUID and UID here.
-  Process::UID.change_privilege(Process.euid) if Process.euid != Process.uid
-
-  HOMEBREW_LIBRARY_PATH.cd do
-    if update
-      workers = args.debug? ? ["--workers=1"] : []
-      safe_system "bundle", "exec", "tapioca", "dsl", *workers
-      # Prefer adding args here: Library/Homebrew/sorbet/tapioca/config.yml
-      tapioca_args = args.update_all? ? ["--all"] : []
-
-      ohai "Updating Tapioca RBI files..."
-      safe_system "bundle", "exec", "tapioca", "gem", *tapioca_args
-      safe_system "bundle", "exec", "parlour"
-
-      if args.suggest_typed?
-        ohai "Checking if we can bump Sorbet `typed` sigils..."
-        # --sorbet needed because of https://github.com/Shopify/spoom/issues/488
-        safe_system "bundle", "exec", "spoom", "srb", "bump", "--dry", "--from", "false", "--to", "true",
-                    "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
-        safe_system "bundle", "exec", "spoom", "srb", "bump", "--dry", "--from", "true", "--to", "strict",
-                    "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
-      end
-
-      return
-    end
-
-    srb_exec = %w[bundle exec srb tc]
-
-    srb_exec << "--quiet" if args.quiet?
-
-    if args.fix?
-      # Auto-correcting method names is almost always wrong.
-      srb_exec << "--suppress-error-code" << "7003"
-
-      srb_exec << "--autocorrect"
-    end
-
-    srb_exec += ["--ignore", args.ignore] if args.ignore.present?
-    if args.file.present? || args.dir.present?
-      cd("sorbet") do
-        srb_exec += ["--file", "../#{args.file}"] if args.file
-        srb_exec += ["--dir", "../#{args.dir}"] if args.dir
-      end
-    end
-    success = system(*srb_exec)
-    return if success
-
-    $stderr.puts "Check #{Formatter.url("https://docs.brew.sh/Typechecking")} for " \
-                 "more information on how to resolve these errors."
-    Homebrew.failed = true
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Typecheck/Args.html b/docs/Homebrew/DevCmd/Typecheck/Args.html deleted file mode 100644 index 24d0d9a61..000000000 --- a/docs/Homebrew/DevCmd/Typecheck/Args.html +++ /dev/null @@ -1,705 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Typecheck::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Typecheck::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi', line 15
-
-def dir; end
-
-
- -
-

- - #fileString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi', line 18
-
-def file; end
-
-
- -
-

- - #fix?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi', line 21
-
-def fix?; end
-
-
- -
-

- - #ignoreString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi', line 24
-
-def ignore; end
-
-
- -
-

- - #suggest_typed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi', line 27
-
-def suggest_typed?; end
-
-
- -
-

- - #update?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi', line 30
-
-def update?; end
-
-
- -
-

- - #update_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/typecheck.rbi', line 33
-
-def update_all?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Unbottled.html b/docs/Homebrew/DevCmd/Unbottled.html deleted file mode 100644 index 48c1586f8..000000000 --- a/docs/Homebrew/DevCmd/Unbottled.html +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Unbottled - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Unbottled - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/unbottled.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/unbottled.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Unbottled::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unbottled.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-
-
# File 'dev-cmd/unbottled.rb', line 34
-
-def run
-  Formulary.enable_factory_cache!
-
-  @bottle_tag = if (tag = args.tag)
-    Utils::Bottles::Tag.from_symbol(tag.to_sym)
-  else
-    Utils::Bottles.tag
-  end
-
-  if args.lost?
-    if args.named.present?
-      raise UsageError, "`brew unbottled --lost` cannot be used with formula arguments!"
-    elsif !CoreTap.instance.installed?
-      raise UsageError, "`brew unbottled --lost` requires `homebrew/core` to be tapped locally!"
-    else
-      output_lost_bottles
-      return
-    end
-  end
-
-  os = @bottle_tag.system
-  arch = if Hardware::CPU::INTEL_ARCHS.include?(@bottle_tag.arch)
-    :intel
-  elsif Hardware::CPU::ARM_ARCHS.include?(@bottle_tag.arch)
-    :arm
-  else
-    raise "Unknown arch #{@bottle_tag.arch}."
-  end
-
-  Homebrew::SimulateSystem.with(os:, arch:) do
-    all = args.eval_all?
-    if args.total?
-      if !all && !Homebrew::EnvConfig.eval_all?
-        raise UsageError, "`brew unbottled --total` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!"
-      end
-
-      all = true
-    end
-
-    if args.named.blank?
-      ohai "Getting formulae..."
-    elsif all
-      raise UsageError, "Cannot specify formulae when using `--eval-all`/`--total`."
-    end
-
-    formulae, all_formulae, formula_installs = formulae_all_installs_from_args(all)
-    deps_hash, uses_hash = deps_uses_from_formulae(all_formulae)
-
-    if args.dependents?
-      formula_dependents = {}
-      formulae = formulae.sort_by do |f|
-        dependents = uses_hash[f.name]&.length || 0
-        formula_dependents[f.name] ||= dependents
-      end.reverse
-    elsif all
-      output_total(formulae)
-      return
-    end
-
-    noun, hash = if args.named.present?
-      [nil, {}]
-    elsif args.dependents?
-      ["dependents", formula_dependents]
-    else
-      ["installs", formula_installs]
-    end
-
-    output_unbottled(formulae, deps_hash, noun, hash, args.named.present?)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Unbottled/Args.html b/docs/Homebrew/DevCmd/Unbottled/Args.html deleted file mode 100644 index ee42762e7..000000000 --- a/docs/Homebrew/DevCmd/Unbottled/Args.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Unbottled::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Unbottled::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/unbottled.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #dependents?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unbottled.rbi', line 15
-
-def dependents?; end
-
-
- -
-

- - #eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unbottled.rbi', line 18
-
-def eval_all?; end
-
-
- -
-

- - #lost?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unbottled.rbi', line 21
-
-def lost?; end
-
-
- -
-

- - #tagString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unbottled.rbi', line 24
-
-def tag; end
-
-
- -
-

- - #total?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unbottled.rbi', line 27
-
-def total?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Unpack.html b/docs/Homebrew/DevCmd/Unpack.html deleted file mode 100644 index 328b51966..000000000 --- a/docs/Homebrew/DevCmd/Unpack.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Unpack - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Unpack - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
dev-cmd/unpack.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/unpack.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::Unpack::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unpack.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-
-
# File 'dev-cmd/unpack.rb', line 35
-
-def run
-  formulae = args.named.to_formulae
-
-  if (dir = args.destdir)
-    unpack_dir = Pathname.new(dir).expand_path
-    unpack_dir.mkpath
-  else
-    unpack_dir = Pathname.pwd
-  end
-
-  odie "Cannot write to #{unpack_dir}" unless unpack_dir.writable?
-
-  formulae.each do |f|
-    stage_dir = unpack_dir/"#{f.name}-#{f.version}"
-
-    if stage_dir.exist?
-      odie "Destination #{stage_dir} already exists!" unless args.force?
-
-      rm_rf stage_dir
-    end
-
-    oh1 "Unpacking #{Formatter.identifier(f.full_name)} to: #{stage_dir}"
-
-    # show messages about tar
-    with_env VERBOSE: "1" do
-      f.brew do
-        f.patch if args.patch?
-        cp_r getwd, stage_dir, preserve: true
-      end
-    end
-
-    next unless args.git?
-
-    ohai "Setting up Git repository"
-    cd(stage_dir) do
-      system "git", "init", "-q"
-      system "git", "add", "-A"
-      system "git", "commit", "-q", "-m", "brew-unpack"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/Unpack/Args.html b/docs/Homebrew/DevCmd/Unpack/Args.html deleted file mode 100644 index 52bc66072..000000000 --- a/docs/Homebrew/DevCmd/Unpack/Args.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::Unpack::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::Unpack::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/unpack.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #destdirString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unpack.rbi', line 15
-
-def destdir; end
-
-
- -
-

- - #f?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unpack.rbi', line 18
-
-def f?; end
-
-
- -
-

- - #force?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unpack.rbi', line 21
-
-def force?; end
-
-
- -
-

- - #g?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unpack.rbi', line 24
-
-def g?; end
-
-
- -
-

- - #git?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unpack.rbi', line 27
-
-def git?; end
-
-
- -
-

- - #patch?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/unpack.rbi', line 30
-
-def patch?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdateLicenseData.html b/docs/Homebrew/DevCmd/UpdateLicenseData.html deleted file mode 100644 index 02f0a5b2b..000000000 --- a/docs/Homebrew/DevCmd/UpdateLicenseData.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdateLicenseData - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdateLicenseData - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
dev-cmd/update-license-data.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/update_license_data.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::UpdateLicenseData::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_license_data.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'dev-cmd/update-license-data.rb', line 21
-
-def run
-  SPDX.download_latest_license_data!
-  diff = system_command "git", args: [
-    "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", SPDX::DATA_PATH
-  ]
-  if diff.status.success?
-    ofail "No changes to SPDX license data."
-  else
-    puts "SPDX license data updated."
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdateLicenseData/Args.html b/docs/Homebrew/DevCmd/UpdateLicenseData/Args.html deleted file mode 100644 index 5b5df9722..000000000 --- a/docs/Homebrew/DevCmd/UpdateLicenseData/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdateLicenseData::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdateLicenseData::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/update_license_data.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdateMaintainers.html b/docs/Homebrew/DevCmd/UpdateMaintainers.html deleted file mode 100644 index c125199b5..000000000 --- a/docs/Homebrew/DevCmd/UpdateMaintainers.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdateMaintainers - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdateMaintainers - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
dev-cmd/update-maintainers.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/update_maintainers.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::UpdateMaintainers::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_maintainers.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'dev-cmd/update-maintainers.rb', line 23
-
-def run
-  # We assume that only public members wish to be included in the README
-  public_members = GitHub.public_member_usernames("Homebrew")
-  maintainers = GitHub.members_by_team("Homebrew", "maintainers")
-
-  HOMEBREW_MAINTAINER_JSON.write(maintainers.keys.to_json)
-  maintainer_json_relative_path = HOMEBREW_MAINTAINER_JSON.relative_path_from(HOMEBREW_REPOSITORY).to_s
-
-  members = {
-    plc:         GitHub.members_by_team("Homebrew", "plc"),
-    tsc:         GitHub.members_by_team("Homebrew", "tsc"),
-    maintainers:,
-  }
-
-  sentences = {}
-  members.each do |group, hash|
-    hash.replace(hash.slice(*public_members))
-    hash.each { |, name| hash[] = "[#{name}](https://github.com/#{})" }
-    sentences[group] = hash.values.sort.to_sentence
-  end
-
-  readme = HOMEBREW_REPOSITORY/"README.md"
-
-  content = readme.read
-  content.gsub!(/(Homebrew's \[Project Leadership Committee.*) is .*\./,
-                "\\1 is #{sentences[:plc]}.")
-  content.gsub!(/(Homebrew's \[Technical Steering Committee.*) is .*\./,
-                "\\1 is #{sentences[:tsc]}.")
-  content.gsub!(/(Homebrew's maintainers are).*\./,
-                "\\1 #{sentences[:maintainers]}.")
-
-  File.write(readme, content)
-
-  diff = system_command "git", args: [
-    "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "README.md", maintainer_json_relative_path
-  ]
-  if diff.status.success?
-    ofail "No changes to list of maintainers."
-  else
-    Manpages.regenerate_man_pages(quiet: true)
-    puts "List of maintainers updated in the README and the generated man pages."
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdateMaintainers/Args.html b/docs/Homebrew/DevCmd/UpdateMaintainers/Args.html deleted file mode 100644 index cb460e5f3..000000000 --- a/docs/Homebrew/DevCmd/UpdateMaintainers/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdateMaintainers::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdateMaintainers::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/update_maintainers.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdatePythonResources.html b/docs/Homebrew/DevCmd/UpdatePythonResources.html deleted file mode 100644 index 3f9d41f7b..000000000 --- a/docs/Homebrew/DevCmd/UpdatePythonResources.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdatePythonResources - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdatePythonResources - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/update-python-resources.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::UpdatePythonResources::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'dev-cmd/update-python-resources.rb', line 37
-
-def run
-  args.named.to_formulae.each do |formula|
-    PyPI.update_python_resources! formula,
-                                  version:                  args.version,
-                                  package_name:             args.package_name,
-                                  extra_packages:           args.extra_packages,
-                                  exclude_packages:         args.exclude_packages,
-                                  install_dependencies:     args.install_dependencies?,
-                                  print_only:               args.print_only?,
-                                  silent:                   args.silent?,
-                                  verbose:                  args.verbose?,
-                                  ignore_non_pypi_packages: args.ignore_non_pypi_packages?
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdatePythonResources/Args.html b/docs/Homebrew/DevCmd/UpdatePythonResources/Args.html deleted file mode 100644 index 2acd36ed5..000000000 --- a/docs/Homebrew/DevCmd/UpdatePythonResources/Args.html +++ /dev/null @@ -1,927 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdatePythonResources::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdatePythonResources::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #exclude_packagesArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 15
-
-def exclude_packages; end
-
-
- -
-

- - #extra_packagesArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 18
-
-def extra_packages; end
-
-
- -
-

- - #ignore_non_pypi_packages?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 21
-
-def ignore_non_pypi_packages?; end
-
-
- -
-

- - #install_dependencies?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 24
-
-def install_dependencies?; end
-
-
- -
-

- - #p?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 27
-
-def p?; end
-
-
- -
-

- - #package_nameString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 30
-
-def package_name; end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 33
-
-def print_only?; end
-
-
- -
-

- - #s?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 36
-
-def s?; end
-
-
- -
-

- - #silent?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 39
-
-def silent?; end
-
-
- -
-

- - #versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 42
-
-def version; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdateSponsors.html b/docs/Homebrew/DevCmd/UpdateSponsors.html deleted file mode 100644 index 4fdfda8ad..000000000 --- a/docs/Homebrew/DevCmd/UpdateSponsors.html +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdateSponsors - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdateSponsors - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
dev-cmd/update-sponsors.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/update_sponsors.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - -

- Constant Summary - collapse -

- -
- -
NAMED_MONTHLY_AMOUNT = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
100
- -
URL_MONTHLY_AMOUNT = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
1000
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::UpdateSponsors::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_sponsors.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-
-
# File 'dev-cmd/update-sponsors.rb', line 25
-
-def run
-  named_sponsors = []
-  logo_sponsors = []
-  # FIXME: This T.let should be unnecessary https://github.com/sorbet/sorbet/issues/6894
-  largest_monthly_amount = T.let(0, T.untyped)
-
-  GitHub.sponsorships("Homebrew").each do |s|
-    largest_monthly_amount = [s[:monthly_amount], s[:closest_tier_monthly_amount]].max
-    if largest_monthly_amount >= NAMED_MONTHLY_AMOUNT
-      named_sponsors << "[#{sponsor_name(s)}](#{sponsor_url(s)})"
-    end
-
-    next if largest_monthly_amount < URL_MONTHLY_AMOUNT
-
-    logo_sponsors << "[![#{sponsor_name(s)}](#{(s)})](#{sponsor_url(s)})"
-  end
-
-  odie "No sponsorships amounts found! Ensure you have sufficient permissions!" if largest_monthly_amount.zero?
-
-  named_sponsors << "many other users and organisations via [GitHub Sponsors](https://github.com/sponsors/Homebrew)"
-
-  readme = HOMEBREW_REPOSITORY/"README.md"
-  content = readme.read
-  content.gsub!(/(Homebrew is generously supported by) .*\Z/m, "\\1 #{named_sponsors.to_sentence}.\n")
-  content << "\n#{logo_sponsors.join}\n" if logo_sponsors.presence
-
-  File.write(readme, content)
-
-  diff = system_command "git", args: [
-    "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "README.md"
-  ]
-  if diff.status.success?
-    ofail "No changes to list of sponsors."
-  else
-    puts "List of sponsors updated in the README."
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdateSponsors/Args.html b/docs/Homebrew/DevCmd/UpdateSponsors/Args.html deleted file mode 100644 index 543045d3d..000000000 --- a/docs/Homebrew/DevCmd/UpdateSponsors/Args.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdateSponsors::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdateSponsors::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/update_sponsors.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - - - - - - - -

Method Summary

- -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdateTest.html b/docs/Homebrew/DevCmd/UpdateTest.html deleted file mode 100644 index af56f62dc..000000000 --- a/docs/Homebrew/DevCmd/UpdateTest.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdateTest - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdateTest - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
extend/os/linux/dev-cmd/update-test.rb,
- dev-cmd/update-test.rb,
sorbet/rbi/dsl/homebrew/dev_cmd/update_test.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::UpdateTest::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_test.rbi', line 10
-
-def args; end
-
-
- -
-

- - #generic_git_tagsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-
-
# File 'extend/os/linux/dev-cmd/update-test.rb', line 7
-
-alias generic_git_tags git_tags
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-
-
# File 'dev-cmd/update-test.rb', line 30
-
-def run
-  # Avoid `update-report.rb` tapping Homebrew/homebrew-core
-  ENV["HOMEBREW_UPDATE_TEST"] = "1"
-
-  # Avoid accidentally updating when we don't expect it.
-  ENV["HOMEBREW_NO_AUTO_UPDATE"] = "1"
-
-  # Use default behaviours
-  ENV["HOMEBREW_AUTO_UPDATE_SECS"] = nil
-  ENV["HOMEBREW_DEVELOPER"] = nil
-  ENV["HOMEBREW_DEV_CMD_RUN"] = nil
-  ENV["HOMEBREW_MERGE"] = nil
-  ENV["HOMEBREW_NO_UPDATE_CLEANUP"] = nil
-
-  branch = if args.to_tag?
-    ENV["HOMEBREW_UPDATE_TO_TAG"] = "1"
-    "stable"
-  else
-    ENV["HOMEBREW_UPDATE_TO_TAG"] = nil
-    "master"
-  end
-
-  # Utils.popen_read returns a String without a block argument, but that isn't easily typed. We thus label this
-  # as untyped for now.
-  start_commit = T.let("", T.untyped)
-  end_commit = "HEAD"
-  cd HOMEBREW_REPOSITORY do
-    start_commit = if (commit = args.commit)
-      commit
-    elsif (date = args.before)
-      Utils.popen_read("git", "rev-list", "-n1", "--before=#{date}", "origin/master").chomp
-    elsif args.to_tag?
-      tags = git_tags
-      current_tag, previous_tag, = tags.lines
-      current_tag = current_tag.to_s.chomp
-      odie "Could not find current tag in:\n#{tags}" if current_tag.empty?
-      # ^0 ensures this points to the commit rather than the tag object.
-      end_commit = "#{current_tag}^0"
-
-      previous_tag = previous_tag.to_s.chomp
-      odie "Could not find previous tag in:\n#{tags}" if previous_tag.empty?
-      # ^0 ensures this points to the commit rather than the tag object.
-      "#{previous_tag}^0"
-    else
-      Utils.popen_read("git", "merge-base", "origin/master", end_commit).chomp
-    end
-    odie "Could not find start commit!" if start_commit.empty?
-
-    start_commit = Utils.popen_read("git", "rev-parse", start_commit).chomp
-    odie "Could not find start commit!" if start_commit.empty?
-
-    end_commit = T.cast(Utils.popen_read("git", "rev-parse", end_commit).chomp, String)
-    odie "Could not find end commit!" if end_commit.empty?
-
-    if Utils.popen_read("git", "branch", "--list", "master").blank?
-      safe_system "git", "branch", "master", "origin/master"
-    end
-  end
-
-  puts <<~EOS
-    Start commit: #{start_commit}
-      End commit: #{end_commit}
-  EOS
-
-  mkdir "update-test"
-  chdir "update-test" do
-    curdir = Pathname.new(Dir.pwd)
-
-    oh1 "Preparing test environment..."
-    # copy Homebrew installation
-    safe_system "git", "clone", "#{HOMEBREW_REPOSITORY}/.git", ".",
-                "--branch", "master", "--single-branch"
-
-    # set git origin to another copy
-    safe_system "git", "clone", "#{HOMEBREW_REPOSITORY}/.git", "remote.git",
-                "--bare", "--branch", "master", "--single-branch"
-    safe_system "git", "config", "remote.origin.url", "#{curdir}/remote.git"
-    ENV["HOMEBREW_BREW_GIT_REMOTE"] = "#{curdir}/remote.git"
-
-    # force push origin to end_commit
-    safe_system "git", "checkout", "-B", "master", end_commit
-    safe_system "git", "push", "--force", "origin", "master"
-
-    # set test copy to start_commit
-    safe_system "git", "reset", "--hard", start_commit
-
-    # update ENV["PATH"]
-    ENV["PATH"] = PATH.new(ENV.fetch("PATH")).prepend(curdir/"bin").to_s
-
-    # Run `brew help` to install `portable-ruby` (if needed).
-    quiet_system "brew", "help"
-
-    # run brew update
-    oh1 "Running `brew update`..."
-    safe_system "brew", "update", "--verbose", "--debug"
-    actual_end_commit = Utils.popen_read("git", "rev-parse", branch).chomp
-    if actual_end_commit != end_commit
-      start_log = Utils.popen_read("git", "log", "-1", "--decorate", "--oneline", start_commit).chomp
-      end_log = Utils.popen_read("git", "log", "-1", "--decorate", "--oneline", end_commit).chomp
-      actual_log = Utils.popen_read("git", "log", "-1", "--decorate", "--oneline", actual_end_commit).chomp
-      odie <<~EOS
-        `brew update` didn't update #{branch}!
-        Start commit:        #{start_log}
-        Expected end commit: #{end_log}
-        Actual end commit:   #{actual_log}
-      EOS
-    end
-  end
-ensure
-  FileUtils.rm_rf "update-test" unless args.keep_tmp?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/UpdateTest/Args.html b/docs/Homebrew/DevCmd/UpdateTest/Args.html deleted file mode 100644 index 870e70a21..000000000 --- a/docs/Homebrew/DevCmd/UpdateTest/Args.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::UpdateTest::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::UpdateTest::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/update_test.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #beforeString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_test.rbi', line 15
-
-def before; end
-
-
- -
-

- - #commitString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_test.rbi', line 18
-
-def commit; end
-
-
- -
-

- - #keep_tmp?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_test.rbi', line 21
-
-def keep_tmp?; end
-
-
- -
-

- - #to_tag?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_test.rbi', line 24
-
-def to_tag?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/VendorGems.html b/docs/Homebrew/DevCmd/VendorGems.html deleted file mode 100644 index 05da5d1b8..000000000 --- a/docs/Homebrew/DevCmd/VendorGems.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::VendorGems - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::VendorGems - - - Private -

-
- -
-
Inherits:
-
- AbstractCommand - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/vendor-gems.rb,
- sorbet/rbi/dsl/homebrew/dev_cmd/vendor_gems.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Args - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractCommand

-

command, command_name, dev_cmd?, #initialize, parser

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::AbstractCommand

- -
- - -
-

Instance Method Details

- - -
-

- - #argsHomebrew::DevCmd::VendorGems::Args - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/vendor_gems.rbi', line 10
-
-def args; end
-
-
- -
-

- - #runvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-
-
# File 'dev-cmd/vendor-gems.rb', line 26
-
-def run
-  Homebrew.install_bundler!
-
-  ENV["BUNDLE_WITH"] = Homebrew.valid_gem_groups.join(":")
-
-  ohai "cd #{HOMEBREW_LIBRARY_PATH}"
-  HOMEBREW_LIBRARY_PATH.cd do
-    if args.update
-      ohai "bundle update"
-      safe_system "bundle", "update", *args.update
-
-      unless args.no_commit?
-        ohai "git add Gemfile.lock"
-        system "git", "add", "Gemfile.lock"
-      end
-    end
-
-    ohai "bundle install --standalone"
-    safe_system "bundle", "install", "--standalone"
-
-    ohai "bundle pristine"
-    safe_system "bundle", "pristine"
-
-    ohai "bundle clean"
-    safe_system "bundle", "clean"
-
-    # Workaround Bundler 2.4.21 issue where platforms may be removed.
-    # Although we don't use 2.4.21, Dependabot does as it currently ignores your lockfile version.
-    # https://github.com/rubygems/rubygems/issues/7169
-    safe_system "bundle", "lock", "--add-platform", "aarch64-linux", "arm-linux"
-    system "git", "add", "Gemfile.lock" unless args.no_commit?
-
-    if args.non_bundler_gems?
-      %w[
-        mechanize
-      ].each do |gem|
-        (HOMEBREW_LIBRARY_PATH/"vendor/gems").cd do
-          Pathname.glob("#{gem}-*/").each { |path| FileUtils.rm_r(path) }
-        end
-        ohai "gem install #{gem}"
-        safe_system "gem", "install", gem, "--install-dir", "vendor",
-                    "--no-document", "--no-wrappers", "--ignore-dependencies", "--force"
-        (HOMEBREW_LIBRARY_PATH/"vendor/gems").cd do
-          source = Pathname.glob("#{gem}-*/").first
-          next if source.blank?
-
-          # We cannot use `#ln_sf` here because that has unintended consequences when
-          # the symlink we want to create exists and points to an existing directory.
-          FileUtils.rm_f gem
-          FileUtils.ln_s source, gem
-        end
-      end
-    end
-
-    unless args.no_commit?
-      ohai "git add vendor"
-      system "git", "add", "vendor"
-
-      Utils::Git.set_name_email!
-      Utils::Git.setup_gpg!
-
-      ohai "git commit"
-      system "git", "commit", "--message", "brew vendor-gems: commit updates."
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/DevCmd/VendorGems/Args.html b/docs/Homebrew/DevCmd/VendorGems/Args.html deleted file mode 100644 index b06e7fd55..000000000 --- a/docs/Homebrew/DevCmd/VendorGems/Args.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - Class: Homebrew::DevCmd::VendorGems::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::DevCmd::VendorGems::Args - - - Private -

-
- -
-
Inherits:
-
- CLI::Args - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/rbi/dsl/homebrew/dev_cmd/vendor_gems.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CLI::Args

-

#flags_only, #options_only

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CLI::Args

-

#arch, #build_from_source?, #build_from_source_formulae, #cask?, #context, #debug?, #formula?, #freeze_named_args!, #freeze_processed_options!, #freeze_remaining_args!, #help?, #include_test?, #include_test_formulae, #initialize, #named, #no_named?, #only_formula_or_cask, #os, #os_arch_combinations, #quiet?, #remaining, #value, #verbose?

- -
-

Constructor Details

- -

This class inherits a constructor from Homebrew::CLI::Args

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Homebrew::CLI::Args - -

- -
- - -
-

Instance Method Details

- - -
-

- - #no_commit?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/vendor_gems.rbi', line 15
-
-def no_commit?; end
-
-
- -
-

- - #non_bundler_gems?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/vendor_gems.rbi', line 18
-
-def non_bundler_gems?; end
-
-
- -
-

- - #updateArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-21
-
-
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/vendor_gems.rbi', line 21
-
-def update; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Diagnostic.html b/docs/Homebrew/Diagnostic.html deleted file mode 100644 index bb200d6be..000000000 --- a/docs/Homebrew/Diagnostic.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - Module: Homebrew::Diagnostic - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Diagnostic - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
diagnostic.rb,
- extend/os/mac/diagnostic.rb,
extend/os/linux/diagnostic.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Module containing diagnostic checks.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Checks, Volumes - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .checks(type, fatal: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-
-
# File 'diagnostic.rb', line 31
-
-def self.checks(type, fatal: true)
-  @checks ||= Checks.new
-  failed = T.let(false, T::Boolean)
-  @checks.public_send(type).each do |check|
-    out = @checks.public_send(check)
-    next if out.nil?
-
-    if fatal
-      failed ||= true
-      ofail out
-    else
-      opoo out
-    end
-  end
-  exit 1 if failed && fatal
-end
-
-
- -
-

- - .missing_deps(formulae, hide = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'diagnostic.rb', line 19
-
-def self.missing_deps(formulae, hide = nil)
-  missing = {}
-  formulae.each do |f|
-    missing_dependencies = f.missing_dependencies(hide:)
-    next if missing_dependencies.empty?
-
-    yield f.full_name, missing_dependencies if block_given?
-    missing[f.full_name] = missing_dependencies
-  end
-  missing
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Diagnostic/Checks.html b/docs/Homebrew/Diagnostic/Checks.html deleted file mode 100644 index 679cf6dbf..000000000 --- a/docs/Homebrew/Diagnostic/Checks.html +++ /dev/null @@ -1,8679 +0,0 @@ - - - - - - - Class: Homebrew::Diagnostic::Checks - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Diagnostic::Checks - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
diagnostic.rb,
- extend/os/mac/diagnostic.rb,
extend/os/linux/diagnostic.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Diagnostic checks.

- - -
-
-
- - -
- - - - - - - -

- HELPERS - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

-
-

Constructor Details

- -
-

- - #initialize(verbose: true) ⇒ Checks - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Checks.

- - -
-
-
- - -
- - - - -
-
-
-
-52
-53
-54
-
-
# File 'diagnostic.rb', line 52
-
-def initialize(verbose: true)
-  @verbose = verbose
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #__check_linked_brew(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-
-
# File 'diagnostic.rb', line 573
-
-def __check_linked_brew(formula)
-  formula.installed_prefixes.each do |prefix|
-    prefix.find do |src|
-      next if src == prefix
-
-      dst = HOMEBREW_PREFIX + src.relative_path_from(prefix)
-      return true if dst.symlink? && src == dst.resolved_path
-    end
-  end
-
-  false
-end
-
-
- -
-

- - #__check_stray_files(dir, pattern, allow_list, message) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-
-
# File 'diagnostic.rb', line 185
-
-def __check_stray_files(dir, pattern, allow_list, message)
-  return unless File.directory?(dir)
-
-  files = Dir.chdir(dir) do
-    (Dir.glob(pattern) - Dir.glob(allow_list))
-      .select { |f| File.file?(f) && !File.symlink?(f) }
-      .map { |f| File.join(dir, f) }
-  end
-  return if files.empty?
-
-  inject_file_list(files.sort, message)
-end
-
-
- -
-

- - #add_info(*args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-81
-82
-83
-
-
# File 'diagnostic.rb', line 81
-
-def add_info(*args)
-  ohai(*args) if @verbose
-end
-
-
- -
-

- - #allObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1039
-1040
-1041
-
-
# File 'diagnostic.rb', line 1039
-
-def all
-  methods.map(&:to_s).grep(/^check_/).sort
-end
-
-
- -
-

- - #broken_tap(tap) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-
-
# File 'diagnostic.rb', line 155
-
-def broken_tap(tap)
-  return unless Utils::Git.available?
-
-  repo = GitRepository.new(HOMEBREW_REPOSITORY)
-  return unless repo.git_repository?
-
-  message = <<~EOS
-    #{tap.full_name} was not tapped properly! Run:
-      rm -rf "#{tap.path}"
-      brew tap #{tap.name}
-  EOS
-
-  return message if tap.remote.blank?
-
-  tap_head = tap.git_head
-  return message if tap_head.blank?
-  return if tap_head != repo.head_ref
-
-  message
-end
-
-
- -
-

- - #build_error_checksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-110
-111
-112
-
-
# File 'diagnostic.rb', line 110
-
-def build_error_checks
-  supported_configuration_checks + build_from_source_checks
-end
-
-
- -
-

- - #build_from_source_checksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-85
-86
-87
-88
-89
-90
-91
-
-
# File 'extend/os/mac/diagnostic.rb', line 85
-
-def build_from_source_checks
-  %w[
-    check_for_installed_developer_tools
-    check_xcode_up_to_date
-    check_clt_up_to_date
-  ].freeze
-end
-
-
- -
-

- - #cask_checksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1043
-1044
-1045
-
-
# File 'diagnostic.rb', line 1043
-
-def cask_checks
-  all.grep(/^check_cask_/)
-end
-
-
- -
-

- - #check_access_directoriesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-
-
# File 'diagnostic.rb', line 360
-
-def check_access_directories
-  not_writable_dirs =
-    Keg::MUST_BE_WRITABLE_DIRECTORIES.select(&:exist?)
-                                     .reject(&:writable?)
-  return if not_writable_dirs.empty?
-
-  <<~EOS
-    The following directories are not writable by your user:
-    #{not_writable_dirs.join("\n")}
-
-    You should change the ownership of these directories to your user.
-      sudo chown -R #{current_user} #{not_writable_dirs.join(" ")}
-
-    And make sure that your user has write permission.
-      chmod u+w #{not_writable_dirs.join(" ")}
-  EOS
-end
-
-
- -
-

- - #check_brew_git_originObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-518
-519
-520
-521
-
-
# File 'diagnostic.rb', line 518
-
-def check_brew_git_origin
-  repo = GitRepository.new(HOMEBREW_REPOSITORY)
-  examine_git_origin(repo, Homebrew::EnvConfig.brew_git_remote)
-end
-
-
- -
-

- - #check_broken_sdksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The CLT 10.x -> 11.x upgrade process on 10.14 contained a bug which broke the SDKs. -Notably, MacOSX10.14.sdk would indirectly symlink to MacOSX10.15.sdk. -This diagnostic was introduced to check for this and recommend a full reinstall.

- - -
-
-
- - -
- - - - -
-
-
-
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-
-
# File 'extend/os/mac/diagnostic.rb', line 429
-
-def check_broken_sdks
-  locator = MacOS.sdk_locator
-
-  return if locator.all_sdks.all? do |sdk|
-    path_version = sdk.path.basename.to_s[MacOS::SDK::VERSIONED_SDK_REGEX, 1]
-    next true if path_version.blank?
-
-    sdk.version == MacOSVersion.new(path_version).strip_patch
-  end
-
-  if locator.source == :clt
-    source = "Command Line Tools (CLT)"
-    path_to_remove = MacOS::CLT::PKG_PATH
-    installation_instructions = MacOS::CLT.installation_instructions
-  else
-    source = "Xcode"
-    path_to_remove = MacOS::Xcode.bundle_path
-    installation_instructions = MacOS::Xcode.installation_instructions
-  end
-
-  <<~EOS
-    The contents of the SDKs in your #{source} installation do not match the SDK folder names.
-    A clean reinstall of #{source} should fix this.
-
-    Remove the broken installation before reinstalling:
-      sudo rm -rf #{path_to_remove}
-
-    #{installation_instructions}
-  EOS
-end
-
-
- -
-

- - #check_cask_deprecated_disabledObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-646
-647
-648
-649
-650
-651
-652
-653
-654
-655
-656
-
-
# File 'diagnostic.rb', line 646
-
-def check_cask_deprecated_disabled
-  deprecated_or_disabled = Cask::Caskroom.casks.select(&:deprecated?)
-  deprecated_or_disabled += Cask::Caskroom.casks.select(&:disabled?)
-  return if deprecated_or_disabled.empty?
-
-  <<~EOS
-    Some installed casks are deprecated or disabled.
-    You should find replacements for the following casks:
-      #{deprecated_or_disabled.sort_by(&:token).uniq * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_cask_environment_variablesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-973
-974
-975
-976
-977
-978
-979
-980
-981
-982
-983
-984
-985
-986
-987
-988
-989
-990
-991
-992
-993
-994
-995
-996
-
-
# File 'diagnostic.rb', line 973
-
-def check_cask_environment_variables
-  environment_variables = %w[
-    RUBYLIB
-    RUBYOPT
-    RUBYPATH
-    RBENV_VERSION
-    CHRUBY_VERSION
-    GEM_HOME
-    GEM_PATH
-    BUNDLE_PATH
-    PATH
-    SHELL
-    HOMEBREW_CASK_OPTS
-  ]
-
-  locale_variables = ENV.keys.grep(/^(?:LC_\S+|LANG|LANGUAGE)\Z/).sort
-
-  add_info "Cask Environment Variables:", ((locale_variables + environment_variables).sort.each do |var|
-    next unless ENV.key?(var)
-
-    var = %Q(#{var}="#{ENV.fetch(var)}")
-    user_tilde(var)
-  end)
-end
-
-
- -
-

- - #check_cask_install_locationObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-917
-918
-919
-920
-921
-922
-923
-924
-
-
# File 'diagnostic.rb', line 917
-
-def check_cask_install_location
-  locations = Dir.glob(HOMEBREW_CELLAR.join("brew-cask", "*")).reverse
-  return if locations.empty?
-
-  locations.map do |l|
-    "Legacy install at #{l}. Run `brew uninstall --force brew-cask`."
-  end.join "\n"
-end
-
-
- -
-

- - #check_cask_load_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-965
-966
-967
-968
-969
-970
-971
-
-
# File 'diagnostic.rb', line 965
-
-def check_cask_load_path
-  paths = $LOAD_PATH.map { user_tilde(_1) }
-
-  add_info "$LOAD_PATHS", paths.presence || none_string
-
-  "$LOAD_PATH is empty" if paths.blank?
-end
-
-
- -
-

- - #check_cask_quarantine_supportObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1026
-1027
-1028
-1029
-1030
-1031
-1032
-1033
-1034
-1035
-1036
-1037
-
-
# File 'diagnostic.rb', line 1026
-
-def check_cask_quarantine_support
-  case Cask::Quarantine.check_quarantine_support
-  when :quarantine_available
-    nil
-  when :xattr_broken
-    "No Cask quarantine support available: there's no working version of `xattr` on this system."
-  when :no_swift
-    "No Cask quarantine support available: there's no available version of `swift` on this system."
-  else
-    "No Cask quarantine support available: unknown reason."
-  end
-end
-
-
- -
-

- - #check_cask_software_versionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-895
-896
-897
-898
-899
-900
-901
-902
-903
-904
-905
-906
-907
-908
-909
-910
-911
-912
-913
-914
-915
-
-
# File 'diagnostic.rb', line 895
-
-def check_cask_software_versions
-  add_info "Homebrew Version", HOMEBREW_VERSION
-  add_info "macOS", MacOS.full_version
-  add_info "SIP", begin
-    csrutil = "/usr/bin/csrutil"
-    if File.executable?(csrutil)
-      Open3.capture2(csrutil, "status")
-           .first
-           .gsub("This is an unsupported configuration, likely to break in " \
-                 "the future and leave your machine in an unknown state.", "")
-           .gsub("System Integrity Protection status: ", "")
-           .delete("\t.")
-           .capitalize
-           .strip
-    else
-      "N/A"
-    end
-  end
-
-  nil
-end
-
-
- -
-

- - #check_cask_staging_locationObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-926
-927
-928
-929
-930
-931
-932
-933
-934
-935
-936
-937
-938
-939
-940
-941
-
-
# File 'diagnostic.rb', line 926
-
-def check_cask_staging_location
-  # Skip this check when running CI since the staging path is not writable for security reasons
-  return if GitHub::Actions.env_set?
-
-  path = Cask::Caskroom.path
-
-  add_info "Homebrew Cask Staging Location", user_tilde(path.to_s)
-
-  return if !path.exist? || path.writable?
-
-  <<~EOS
-    The staging path #{user_tilde(path.to_s)} is not writable by the current user.
-    To fix, run:
-      sudo chown -R #{current_user} #{user_tilde(path.to_s)}
-  EOS
-end
-
-
- -
-

- - #check_cask_tapsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-943
-944
-945
-946
-947
-948
-949
-950
-951
-952
-953
-954
-955
-956
-957
-958
-959
-960
-961
-962
-963
-
-
# File 'diagnostic.rb', line 943
-
-def check_cask_taps
-  error_tap_paths = []
-
-  taps = (Tap.to_a + [CoreCaskTap.instance]).uniq
-
-  taps_info = taps.filter_map do |tap|
-    cask_count = begin
-      tap.cask_files.count
-    rescue
-      error_tap_paths << tap.path
-      0
-    end
-    next if cask_count.zero?
-
-    "#{tap.path} (#{Utils.pluralize("cask", cask_count, include_count: true)})"
-  end
-  add_info "Homebrew Cask Taps:", taps_info
-
-  taps_string = Utils.pluralize("tap", error_tap_paths.count)
-  "Unable to read from cask #{taps_string}: #{error_tap_paths.to_sentence}" if error_tap_paths.present?
-end
-
-
- -
-

- - #check_cask_xattrObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-998
-999
-1000
-1001
-1002
-1003
-1004
-1005
-1006
-1007
-1008
-1009
-1010
-1011
-1012
-1013
-1014
-1015
-1016
-1017
-1018
-1019
-1020
-1021
-1022
-1023
-1024
-
-
# File 'diagnostic.rb', line 998
-
-def check_cask_xattr
-  result = system_command "/usr/bin/xattr", args: ["-h"]
-
-  return if result.status.success?
-
-  if result.stderr.include? "ImportError: No module named pkg_resources"
-    result = Utils.popen_read "/usr/bin/python", "--version", err: :out
-
-    if result.include? "Python 2.7"
-      <<~EOS
-        Your Python installation has a broken version of setuptools.
-        To fix, reinstall macOS or run:
-          sudo /usr/bin/python -m pip install -I setuptools
-      EOS
-    else
-      <<~EOS
-        The system Python version is wrong.
-        To fix, run:
-          defaults write com.apple.versioner.python Version 2.7
-      EOS
-    end
-  elsif result.stderr.include? "pkg_resources.DistributionNotFound"
-    "Your Python installation is unable to find `xattr`."
-  else
-    "unknown xattr error: #{result.stderr.split("\n").last}"
-  end
-end
-
-
- -
-

- - #check_casktap_integrityObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-534
-535
-536
-537
-538
-539
-
-
# File 'diagnostic.rb', line 534
-
-def check_casktap_integrity
-  core_cask_tap = CoreCaskTap.instance
-  return unless core_cask_tap.installed?
-
-  broken_tap(core_cask_tap) || examine_git_origin(core_cask_tap.git_repository, core_cask_tap.remote)
-end
-
-
- -
-

- - #check_clt_minimum_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-189
-190
-191
-192
-193
-194
-195
-196
-
-
# File 'extend/os/mac/diagnostic.rb', line 189
-
-def check_clt_minimum_version
-  return unless MacOS::CLT.below_minimum_version?
-
-  <<~EOS
-    Your Command Line Tools are too outdated.
-    #{MacOS::CLT.update_instructions}
-  EOS
-end
-
-
- -
-

- - #check_clt_up_to_dateObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-
-
# File 'extend/os/mac/diagnostic.rb', line 161
-
-def check_clt_up_to_date
-  return unless MacOS::CLT.outdated?
-
-  # CI images are going to end up outdated so don't complain when
-  # `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
-  # repository. This only needs to support whatever CI providers
-  # Homebrew/brew is currently using.
-  return if GitHub::Actions.env_set?
-
-  <<~EOS
-    A newer Command Line Tools release is available.
-    #{MacOS::CLT.update_instructions}
-  EOS
-end
-
-
- -
-

- - #check_coretap_integrityObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-
-
# File 'diagnostic.rb', line 523
-
-def check_coretap_integrity
-  core_tap = CoreTap.instance
-  unless core_tap.installed?
-    return unless EnvConfig.no_install_from_api?
-
-    core_tap.ensure_installed!
-  end
-
-  broken_tap(core_tap) || examine_git_origin(core_tap.git_repository, Homebrew::EnvConfig.core_git_remote)
-end
-
-
- -
-

- - #check_deleted_formulaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-831
-832
-833
-834
-835
-836
-837
-838
-839
-840
-841
-842
-843
-844
-845
-846
-847
-848
-849
-850
-851
-852
-853
-854
-855
-856
-857
-858
-859
-860
-861
-862
-863
-
-
# File 'diagnostic.rb', line 831
-
-def check_deleted_formula
-  kegs = Keg.all
-
-  deleted_formulae = kegs.filter_map do |keg|
-    tap = keg.tab.tap
-    tap_keg_name = tap ? "#{tap}/#{keg.name}" : keg.name
-
-    loadable = [
-      Formulary::FromAPILoader,
-      Formulary::FromTapLoader,
-      Formulary::FromNameLoader,
-    ].any? do |loader_class|
-      loader = begin
-        loader_class.try_new(tap_keg_name, warn: false)
-      rescue TapFormulaAmbiguityError => e
-        e.loaders.first
-      end
-
-      loader.instance_of?(Formulary::FromTapLoader) ? loader.path.exist? : loader.present?
-    end
-
-    keg.name unless loadable
-  end.uniq
-
-  return if deleted_formulae.blank?
-
-  <<~EOS
-    Some installed kegs have no formulae!
-    This means they were either deleted or installed manually.
-    You should find replacements for the following formulae:
-      #{deleted_formulae.join("\n  ")}
-  EOS
-end
-
-
- -
-

- - #check_deprecated_caskroom_tapsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-
-
# File 'extend/os/mac/diagnostic.rb', line 387
-
-def check_deprecated_caskroom_taps
-  tapped_caskroom_taps = Tap.select { |t| t.user == "caskroom" || t.name == "phinze/cask" }
-                            .map(&:name)
-  return if tapped_caskroom_taps.empty?
-
-  <<~EOS
-    You have the following deprecated, cask taps tapped:
-      #{tapped_caskroom_taps.join("\n  ")}
-    Untap them with `brew untap`.
-  EOS
-end
-
-
- -
-

- - #check_deprecated_disabledObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-632
-633
-634
-635
-636
-637
-638
-639
-640
-641
-642
-643
-644
-
-
# File 'diagnostic.rb', line 632
-
-def check_deprecated_disabled
-  return unless HOMEBREW_CELLAR.exist?
-
-  deprecated_or_disabled = Formula.installed.select(&:deprecated?)
-  deprecated_or_disabled += Formula.installed.select(&:disabled?)
-  return if deprecated_or_disabled.empty?
-
-  <<~EOS
-    Some installed formulae are deprecated or disabled.
-    You should find replacements for the following formulae:
-      #{deprecated_or_disabled.sort_by(&:full_name).uniq * "\n  "}
-  EOS
-end
-
-
- -
-

- - #check_deprecated_official_tapsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-561
-562
-563
-564
-565
-566
-567
-568
-569
-570
-571
-
-
# File 'diagnostic.rb', line 561
-
-def check_deprecated_official_taps
-  tapped_deprecated_taps =
-    Tap.select(&:official?).map(&:repo) & DEPRECATED_OFFICIAL_TAPS
-  return if tapped_deprecated_taps.empty?
-
-  <<~EOS
-    You have the following deprecated, official taps tapped:
-      Homebrew/homebrew-#{tapped_deprecated_taps.join("\n  Homebrew/homebrew-")}
-    Untap them with `brew untap`.
-  EOS
-end
-
-
- -
-

- - #check_exist_directoriesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-
-
# File 'diagnostic.rb', line 344
-
-def check_exist_directories
-  return if HOMEBREW_PREFIX.writable?
-
-  not_exist_dirs = Keg::MUST_EXIST_DIRECTORIES.reject(&:exist?)
-  return if not_exist_dirs.empty?
-
-  <<~EOS
-    The following directories do not exist:
-    #{not_exist_dirs.join("\n")}
-
-    You should create these directories and change their ownership to your user.
-      sudo mkdir -p #{not_exist_dirs.join(" ")}
-      sudo chown -R #{current_user} #{not_exist_dirs.join(" ")}
-  EOS
-end
-
-
- -
-

- - #check_filesystem_case_sensitiveObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-
-
# File 'extend/os/mac/diagnostic.rb', line 256
-
-def check_filesystem_case_sensitive
-  dirs_to_check = [
-    HOMEBREW_PREFIX,
-    HOMEBREW_REPOSITORY,
-    HOMEBREW_CELLAR,
-    HOMEBREW_TEMP,
-  ]
-  case_sensitive_dirs = dirs_to_check.select do |dir|
-    # We select the dir as being case-sensitive if either the UPCASED or the
-    # downcased variant is missing.
-    # Of course, on a case-insensitive fs, both exist because the os reports so.
-    # In the rare situation when the user has indeed a downcased and an upcased
-    # dir (e.g. /TMP and /tmp) this check falsely thinks it is case-insensitive
-    # but we don't care because: 1. there is more than one dir checked, 2. the
-    # check is not vital and 3. we would have to touch files otherwise.
-    upcased = Pathname.new(dir.to_s.upcase)
-    downcased = Pathname.new(dir.to_s.downcase)
-    dir.exist? && !(upcased.exist? && downcased.exist?)
-  end
-  return if case_sensitive_dirs.empty?
-
-  volumes = Volumes.new
-  case_sensitive_vols = case_sensitive_dirs.map do |case_sensitive_dir|
-    volumes.get_mounts(case_sensitive_dir)
-  end
-  case_sensitive_vols.uniq!
-
-  <<~EOS
-    The filesystem on #{case_sensitive_vols.join(",")} appears to be case-sensitive.
-    The default macOS filesystem is case-insensitive. Please report any apparent problems.
-  EOS
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-
-
# File 'diagnostic.rb', line 315
-
-def check_for_broken_symlinks
-  broken_symlinks = []
-
-  Keg::MUST_EXIST_SUBDIRECTORIES.each do |d|
-    next unless d.directory?
-
-    d.find do |path|
-      broken_symlinks << path if path.symlink? && !path.resolved_path_exists?
-    end
-  end
-  return if broken_symlinks.empty?
-
-  inject_file_list broken_symlinks, <<~EOS
-    Broken symlinks were found. Remove them with `brew cleanup`:
-  EOS
-end
-
-
- -
-

- - #check_for_external_cmd_name_conflictObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-766
-767
-768
-769
-770
-771
-772
-773
-774
-775
-776
-777
-778
-779
-780
-781
-782
-783
-784
-785
-786
-787
-788
-789
-790
-791
-
-
# File 'diagnostic.rb', line 766
-
-def check_for_external_cmd_name_conflict
-  cmds = Tap.cmd_directories.flat_map { |p| Dir["#{p}/brew-*"] }.uniq
-  cmds = cmds.select { |cmd| File.file?(cmd) && File.executable?(cmd) }
-  cmd_map = {}
-  cmds.each do |cmd|
-    cmd_name = File.basename(cmd, ".rb")
-    cmd_map[cmd_name] ||= []
-    cmd_map[cmd_name] << cmd
-  end
-  cmd_map.reject! { |_cmd_name, cmd_paths| cmd_paths.size == 1 }
-  return if cmd_map.empty?
-
-  if ENV["CI"].present? && cmd_map.keys.length == 1 &&
-     cmd_map.keys.first == "brew-test-bot"
-    return
-  end
-
-  message = "You have external commands with conflicting names.\n"
-  cmd_map.each do |cmd_name, cmd_paths|
-    message += inject_file_list cmd_paths, <<~EOS
-      Found command `#{cmd_name}` in the following places:
-    EOS
-  end
-
-  message
-end
-
-
- -
-

- - #check_for_gettextObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-
-
# File 'extend/os/mac/diagnostic.rb', line 289
-
-def check_for_gettext
-  find_relative_paths("lib/libgettextlib.dylib",
-                      "lib/libintl.dylib",
-                      "include/libintl.h")
-  return if @found.empty?
-
-  # Our gettext formula will be caught by check_linked_keg_only_brews
-  gettext = begin
-    Formulary.factory("gettext")
-  rescue
-    nil
-  end
-
-  if gettext&.linked_keg&.directory?
-    allowlist = ["#{HOMEBREW_CELLAR}/gettext"]
-    if Hardware::CPU.physical_cpu_arm64?
-      allowlist += %W[
-        #{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}/Cellar/gettext
-        #{HOMEBREW_DEFAULT_PREFIX}/Cellar/gettext
-      ]
-    end
-
-    return if @found.all? do |path|
-      realpath = Pathname.new(path).realpath.to_s
-      allowlist.any? { |rack| realpath.start_with?(rack) }
-    end
-  end
-
-  inject_file_list @found, <<~EOS
-    gettext files detected at a system prefix.
-    These files can cause compilation and link failures, especially if they
-    are compiled with improper architectures. Consider removing these files:
-  EOS
-end
-
-
- -
-

- - #check_for_gitObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-
-
# File 'diagnostic.rb', line 489
-
-def check_for_git
-  return if Utils::Git.available?
-
-  <<~EOS
-    Git could not be found in your PATH.
-    Homebrew uses Git for several internal functions and some formulae use Git
-    checkouts instead of stable tarballs. You may want to install Git:
-      brew install git
-  EOS
-end
-
-
- -
-

- - #check_for_iconvObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-
-
# File 'extend/os/mac/diagnostic.rb', line 324
-
-def check_for_iconv
-  find_relative_paths("lib/libiconv.dylib", "include/iconv.h")
-  return if @found.empty?
-
-  libiconv = begin
-    Formulary.factory("libiconv")
-  rescue
-    nil
-  end
-  if libiconv&.linked_keg&.directory?
-    unless libiconv&.keg_only?
-      <<~EOS
-        A libiconv formula is installed and linked.
-        This will break stuff. For serious. Unlink it.
-      EOS
-    end
-  else
-    inject_file_list @found, <<~EOS
-      libiconv files detected at a system prefix other than /usr.
-      Homebrew doesn't provide a libiconv formula and expects to link against
-      the system version in /usr. libiconv in other prefixes can cause
-      compile or link failure, especially if compiled with improper
-      architectures. macOS itself never installs anything to /usr/local so
-      it was either installed by a user or some other third party software.
-
-      tl;dr: delete these files:
-    EOS
-  end
-end
-
-
- -
-

- - #check_for_installed_developer_toolsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-176
-177
-178
-179
-180
-181
-182
-183
-
-
# File 'diagnostic.rb', line 176
-
-def check_for_installed_developer_tools
-  return if DevelopmentTools.installed?
-
-  <<~EOS
-    No developer tools installed.
-    #{DevelopmentTools.installation_instructions}
-  EOS
-end
-
-
- -
-

- - #check_for_multiple_volumesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-
-
# File 'extend/os/mac/diagnostic.rb', line 354
-
-def check_for_multiple_volumes
-  return unless HOMEBREW_CELLAR.exist?
-
-  volumes = Volumes.new
-
-  # Find the volumes for the TMP folder & HOMEBREW_CELLAR
-  real_cellar = HOMEBREW_CELLAR.realpath
-  where_cellar = volumes.which real_cellar
-
-  begin
-    tmp = Pathname.new(Dir.mktmpdir("doctor", HOMEBREW_TEMP))
-    begin
-      real_tmp = tmp.realpath.parent
-      where_tmp = volumes.which real_tmp
-    ensure
-      Dir.delete tmp.to_s
-    end
-  rescue
-    return
-  end
-
-  return if where_cellar == where_tmp
-
-  <<~EOS
-    Your Cellar and TEMP directories are on different volumes.
-    macOS won't move relative symlinks across volumes unless the target file already
-    exists. Brews known to be affected by this are Git and Narwhal.
-
-    You should set the "HOMEBREW_TEMP" environment variable to a suitable
-    directory on the same volume as your Cellar.
-  EOS
-end
-
-
- -
-

- - #check_for_non_prefixed_coreutilsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-702
-703
-704
-705
-706
-707
-708
-709
-710
-711
-712
-713
-714
-
-
# File 'diagnostic.rb', line 702
-
-def check_for_non_prefixed_coreutils
-  coreutils = Formula["coreutils"]
-  return unless coreutils.any_version_installed?
-
-  gnubin = %W[#{coreutils.opt_libexec}/gnubin #{coreutils.libexec}/gnubin]
-  return unless paths.intersect?(gnubin)
-
-  <<~EOS
-    Putting non-prefixed coreutils in your path can cause GMP builds to fail.
-  EOS
-rescue FormulaUnavailableError
-  nil
-end
-
-
- -
-

- - #check_for_non_prefixed_findutilsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-
-
# File 'extend/os/mac/diagnostic.rb', line 93
-
-def check_for_non_prefixed_findutils
-  findutils = Formula["findutils"]
-  return unless findutils.any_version_installed?
-
-  gnubin = %W[#{findutils.opt_libexec}/gnubin #{findutils.libexec}/gnubin]
-  default_names = Tab.for_name("findutils").with? "default-names"
-  return if !default_names && !paths.intersect?(gnubin)
-
-  <<~EOS
-    Putting non-prefixed findutils in your path can cause python builds to fail.
-  EOS
-rescue FormulaUnavailableError
-  nil
-end
-
-
- -
-

- - #check_for_other_frameworksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-586
-587
-588
-589
-590
-591
-592
-593
-594
-595
-596
-597
-598
-599
-600
-601
-602
-603
-
-
# File 'diagnostic.rb', line 586
-
-def check_for_other_frameworks
-  # Other frameworks that are known to cause problems when present
-  frameworks_to_check = %w[
-    expat.framework
-    libexpat.framework
-    libcurl.framework
-  ]
-  frameworks_found = frameworks_to_check
-                     .map { |framework| "/Library/Frameworks/#{framework}" }
-                     .select { |framework| File.exist? framework }
-  return if frameworks_found.empty?
-
-  inject_file_list frameworks_found, <<~EOS
-    Some frameworks can be picked up by CMake's build system and will likely
-    cause the build to fail. To compile CMake, you may wish to move these
-    out of the way:
-  EOS
-end
-
-
- -
-

- - #check_for_pydistutils_cfg_in_homeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-716
-717
-718
-719
-720
-721
-722
-723
-724
-725
-
-
# File 'diagnostic.rb', line 716
-
-def check_for_pydistutils_cfg_in_home
-  return unless File.exist? "#{Dir.home}/.pydistutils.cfg"
-
-  <<~EOS
-    A '.pydistutils.cfg' file was found in $HOME, which may cause Python
-    builds to fail. See:
-      #{Formatter.url("https://bugs.python.org/issue6138")}
-      #{Formatter.url("https://bugs.python.org/issue4655")}
-  EOS
-end
-
-
- -
-

- - #check_for_stray_dylibsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-
-
# File 'diagnostic.rb', line 198
-
-def check_for_stray_dylibs
-  # Dylibs which are generally OK should be added to this list,
-  # with a short description of the software they come with.
-  allow_list = [
-    "libfuse.2.dylib", # MacFuse
-    "libfuse_ino64.2.dylib", # MacFuse
-    "libmacfuse_i32.2.dylib", # OSXFuse MacFuse compatibility layer
-    "libmacfuse_i64.2.dylib", # OSXFuse MacFuse compatibility layer
-    "libosxfuse_i32.2.dylib", # OSXFuse
-    "libosxfuse_i64.2.dylib", # OSXFuse
-    "libosxfuse.2.dylib", # OSXFuse
-    "libTrAPI.dylib", # TrAPI/Endpoint Security VPN
-    "libntfs-3g.*.dylib", # NTFS-3G
-    "libntfs.*.dylib", # NTFS-3G
-    "libublio.*.dylib", # NTFS-3G
-    "libUFSDNTFS.dylib", # Paragon NTFS
-    "libUFSDExtFS.dylib", # Paragon ExtFS
-    "libecomlodr.dylib", # Symantec Endpoint Protection
-    "libsymsea*.dylib", # Symantec Endpoint Protection
-    "sentinel.dylib", # SentinelOne
-    "sentinel-*.dylib", # SentinelOne
-  ]
-
-  __check_stray_files "/usr/local/lib", "*.dylib", allow_list, <<~EOS
-    Unbrewed dylibs were found in /usr/local/lib.
-    If you didn't put them there on purpose they could cause problems when
-    building Homebrew formulae and may need to be deleted.
-
-    Unexpected dylibs:
-  EOS
-end
-
-
- -
-

- - #check_for_stray_headersObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-
-
# File 'diagnostic.rb', line 296
-
-def check_for_stray_headers
-  allow_list = [
-    "fuse.h", # MacFuse
-    "fuse/**/*.h", # MacFuse
-    "macfuse/**/*.h", # OSXFuse MacFuse compatibility layer
-    "osxfuse/**/*.h", # OSXFuse
-    "ntfs/**/*.h", # NTFS-3G
-    "ntfs-3g/**/*.h", # NTFS-3G
-  ]
-
-  __check_stray_files "/usr/local/include", "**/*.h", allow_list, <<~EOS
-    Unbrewed header files were found in /usr/local/include.
-    If you didn't put them there on purpose they could cause problems when
-    building Homebrew formulae and may need to be deleted.
-
-    Unexpected header files:
-  EOS
-end
-
-
- -
-

- - #check_for_stray_lasObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-
-
# File 'diagnostic.rb', line 275
-
-def check_for_stray_las
-  allow_list = [
-    "libfuse.la", # MacFuse
-    "libfuse_ino64.la", # MacFuse
-    "libosxfuse_i32.la", # OSXFuse
-    "libosxfuse_i64.la", # OSXFuse
-    "libosxfuse.la", # OSXFuse
-    "libntfs-3g.la", # NTFS-3G
-    "libntfs.la", # NTFS-3G
-    "libublio.la", # NTFS-3G
-  ]
-
-  __check_stray_files "/usr/local/lib", "*.la", allow_list, <<~EOS
-    Unbrewed '.la' files were found in /usr/local/lib.
-    If you didn't put them there on purpose they could cause problems when
-    building Homebrew formulae and may need to be deleted.
-
-    Unexpected '.la' files:
-  EOS
-end
-
-
- -
-

- - #check_for_stray_pcsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-
-
# File 'diagnostic.rb', line 255
-
-def check_for_stray_pcs
-  # Package-config files which are generally OK should be added to this list,
-  # with a short description of the software they come with.
-  allow_list = [
-    "fuse.pc", # OSXFuse/MacFuse
-    "macfuse.pc", # OSXFuse MacFuse compatibility layer
-    "osxfuse.pc", # OSXFuse
-    "libntfs-3g.pc", # NTFS-3G
-    "libublio.pc", # NTFS-3G
-  ]
-
-  __check_stray_files "/usr/local/lib/pkgconfig", "*.pc", allow_list, <<~EOS
-    Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.
-    If you didn't put them there on purpose they could cause problems when
-    building Homebrew formulae and may need to be deleted.
-
-    Unexpected '.pc' files:
-  EOS
-end
-
-
- -
-

- - #check_for_stray_static_libsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-
-
# File 'diagnostic.rb', line 230
-
-def check_for_stray_static_libs
-  # Static libs which are generally OK should be added to this list,
-  # with a short description of the software they come with.
-  allow_list = [
-    "libntfs-3g.a", # NTFS-3G
-    "libntfs.a", # NTFS-3G
-    "libublio.a", # NTFS-3G
-    "libappfirewall.a", # Symantec Endpoint Protection
-    "libautoblock.a", # Symantec Endpoint Protection
-    "libautosetup.a", # Symantec Endpoint Protection
-    "libconnectionsclient.a", # Symantec Endpoint Protection
-    "liblocationawareness.a", # Symantec Endpoint Protection
-    "libpersonalfirewall.a", # Symantec Endpoint Protection
-    "libtrustedcomponents.a", # Symantec Endpoint Protection
-  ]
-
-  __check_stray_files "/usr/local/lib", "*.a", allow_list, <<~EOS
-    Unbrewed static libraries were found in /usr/local/lib.
-    If you didn't put them there on purpose they could cause problems when
-    building Homebrew formulae and may need to be deleted.
-
-    Unexpected static libraries:
-  EOS
-end
-
-
- -
-

- - #check_for_symlinked_cellarObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-
-
# File 'diagnostic.rb', line 455
-
-def check_for_symlinked_cellar
-  return unless HOMEBREW_CELLAR.exist?
-  return unless HOMEBREW_CELLAR.symlink?
-
-  <<~EOS
-    Symlinked Cellars can cause problems.
-    Your Homebrew Cellar is a symlink: #{HOMEBREW_CELLAR}
-                    which resolves to: #{HOMEBREW_CELLAR.realpath}
-
-    The recommended Homebrew installations are either:
-    (A) Have Cellar be a real directory inside of your HOMEBREW_PREFIX
-    (B) Symlink "bin/brew" into your prefix, but don't symlink "Cellar".
-
-    Older installations of Homebrew may have created a symlinked Cellar, but this can
-    cause problems when two formulae install to locations that are mapped on top of each
-    other during the linking step.
-  EOS
-end
-
-
- -
-

- - #check_for_tap_ruby_files_locationsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-793
-794
-795
-796
-797
-798
-799
-800
-801
-802
-803
-804
-805
-806
-807
-808
-809
-810
-811
-812
-813
-814
-815
-816
-817
-
-
# File 'diagnostic.rb', line 793
-
-def check_for_tap_ruby_files_locations
-  bad_tap_files = {}
-  Tap.installed.each do |tap|
-    unused_formula_dirs = tap.potential_formula_dirs - [tap.formula_dir]
-    unused_formula_dirs.each do |dir|
-      next unless dir.exist?
-
-      dir.children.each do |path|
-        next if path.extname != ".rb"
-
-        bad_tap_files[tap] ||= []
-        bad_tap_files[tap] << path
-      end
-    end
-  end
-  return if bad_tap_files.empty?
-
-  bad_tap_files.keys.map do |tap|
-    <<~EOS
-      Found Ruby file outside #{tap} tap formula directory.
-      (#{tap.formula_dir}):
-        #{bad_tap_files[tap].join("\n  ")}
-    EOS
-  end.join("\n")
-end
-
-
- -
-

- - #check_for_unlinked_but_not_keg_onlyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-745
-746
-747
-748
-749
-750
-751
-752
-753
-754
-755
-756
-757
-758
-759
-760
-761
-762
-763
-764
-
-
# File 'diagnostic.rb', line 745
-
-def check_for_unlinked_but_not_keg_only
-  unlinked = Formula.racks.reject do |rack|
-    if (HOMEBREW_LINKED_KEGS/rack.basename).directory?
-      true
-    else
-      begin
-        Formulary.from_rack(rack).keg_only?
-      rescue FormulaUnavailableError, TapFormulaAmbiguityError
-        false
-      end
-    end
-  end.map(&:basename)
-  return if unlinked.empty?
-
-  inject_file_list unlinked, <<~EOS
-    You have unlinked kegs in your Cellar.
-    Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
-    those kegs to fail to run properly once built. Run `brew link` on these:
-  EOS
-end
-
-
- -
-

- - #check_for_unnecessary_cask_tapObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-879
-880
-881
-882
-883
-884
-885
-886
-887
-888
-889
-890
-891
-892
-893
-
-
# File 'diagnostic.rb', line 879
-
-def check_for_unnecessary_cask_tap
-  return if Homebrew::EnvConfig.developer?
-  return if Homebrew::EnvConfig.no_install_from_api?
-  return if Homebrew::Settings.read("devcmdrun") == "true"
-
-  cask_tap = CoreCaskTap.instance
-  return unless cask_tap.installed?
-
-  <<~EOS
-    You have an unnecessary local Cask tap.
-    This can cause problems installing up-to-date casks.
-    Please remove it by running:
-      brew untap #{cask_tap.name}
-  EOS
-end
-
-
- -
-

- - #check_for_unnecessary_core_tapObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-865
-866
-867
-868
-869
-870
-871
-872
-873
-874
-875
-876
-877
-
-
# File 'diagnostic.rb', line 865
-
-def check_for_unnecessary_core_tap
-  return if Homebrew::EnvConfig.developer?
-  return if Homebrew::EnvConfig.no_install_from_api?
-  return if Homebrew::Settings.read("devcmdrun") == "true"
-  return unless CoreTap.instance.installed?
-
-  <<~EOS
-    You have an unnecessary local Core tap!
-    This can cause problems installing up-to-date formulae.
-    Please remove it by running:
-     brew untap #{CoreTap.instance.name}
-  EOS
-end
-
-
- -
-

- - #check_for_unreadable_installed_formulaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-727
-728
-729
-730
-731
-732
-733
-734
-735
-736
-737
-738
-739
-740
-741
-742
-743
-
-
# File 'diagnostic.rb', line 727
-
-def check_for_unreadable_installed_formula
-  formula_unavailable_exceptions = []
-  Formula.racks.each do |rack|
-    Formulary.from_rack(rack)
-  rescue FormulaUnreadableError, FormulaClassUnavailableError,
-         TapFormulaUnreadableError, TapFormulaClassUnavailableError => e
-    formula_unavailable_exceptions << e
-  rescue FormulaUnavailableError, TapFormulaAmbiguityError
-    nil
-  end
-  return if formula_unavailable_exceptions.empty?
-
-  <<~EOS
-    Some installed formulae are not readable:
-      #{formula_unavailable_exceptions.join("\n\n  ")}
-  EOS
-end
-
-
- -
-

- - #check_for_unsupported_macosObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
-
# File 'extend/os/mac/diagnostic.rb', line 108
-
-def check_for_unsupported_macos
-  return if Homebrew::EnvConfig.developer?
-  return if ENV["HOMEBREW_INTEGRATION_TEST"]
-
-  who = +"We"
-  what = if OS::Mac.version.prerelease?
-    "pre-release version"
-  elsif OS::Mac.version.outdated_release?
-    who << " (and Apple)"
-    "old version"
-  end
-  return if what.blank?
-
-  who.freeze
-
-  <<~EOS
-    You are using macOS #{MacOS.version}.
-    #{who} do not provide support for this #{what}.
-    #{please_create_pull_requests(what)}
-  EOS
-end
-
-
- -
-

- - #check_gcc_dependent_linkageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-
-
# File 'extend/os/linux/diagnostic.rb', line 143
-
-def check_gcc_dependent_linkage
-  gcc_dependents = Formula.installed.select do |formula|
-    next false unless formula.tap&.core_tap?
-
-    # FIXME: This includes formulae that have no runtime dependency on GCC.
-    formula.recursive_dependencies.map(&:name).include? "gcc"
-  rescue TapFormulaUnavailableError
-    false
-  end
-  return if gcc_dependents.empty?
-
-  badly_linked = gcc_dependents.select do |dependent|
-    keg = Keg.new(dependent.prefix)
-    keg.binary_executable_or_library_files.any? do |binary|
-      paths = binary.rpaths
-      versioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/\d+$}) }
-      unversioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/current$}) }
-
-      versioned_linkage && !unversioned_linkage
-    end
-  end
-  return if badly_linked.empty?
-
-  inject_file_list badly_linked, <<~EOS
-    Formulae which link to GCC through a versioned path were found. These formulae
-    are prone to breaking when GCC is updated. You should `brew reinstall` these formulae:
-  EOS
-end
-
-
- -
-

- - #check_git_newline_settingsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-515
-516
-
-
# File 'diagnostic.rb', line 500
-
-def check_git_newline_settings
-  return unless Utils::Git.available?
-
-  autocrlf = HOMEBREW_REPOSITORY.cd { `git config --get core.autocrlf`.chomp }
-  return if autocrlf != "true"
-
-  <<~EOS
-    Suspicious Git newline settings found.
-
-    The detected Git newline settings will cause checkout problems:
-      core.autocrlf = #{autocrlf}
-
-    If you are not routinely dealing with Windows-based projects,
-    consider removing these by running:
-      git config --global core.autocrlf input
-  EOS
-end
-
-
- -
-

- - #check_git_statusString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-659
-660
-661
-662
-663
-664
-665
-666
-667
-668
-669
-670
-671
-672
-673
-674
-675
-676
-677
-678
-679
-680
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-700
-
-
# File 'diagnostic.rb', line 659
-
-def check_git_status
-  return unless Utils::Git.available?
-
-  message = T.let(nil, T.nilable(String))
-
-  repos = {
-    "Homebrew/brew"          => HOMEBREW_REPOSITORY,
-    "Homebrew/homebrew-core" => CoreTap.instance.path,
-  }
-
-  OFFICIAL_CASK_TAPS.each do |tap|
-    cask_tap = Tap.fetch "homebrew", tap
-    repos[cask_tap.full_name] = cask_tap.path if cask_tap.installed?
-  end
-
-  repos.each do |name, path|
-    next unless path.exist?
-
-    status = path.cd do
-      `git status --untracked-files=all --porcelain 2>/dev/null`
-    end
-    next if status.blank?
-
-    message ||= ""
-    message += "\n" unless message.empty?
-    message += <<~EOS
-      You have uncommitted modifications to #{name}.
-      If this is a surprise to you, then you should stash these modifications.
-      Stashing returns Homebrew to a pristine state but can be undone
-      should you later need to do so for some reason.
-        cd #{path} && git stash -u && git clean -d -f
-    EOS
-
-    modified = status.split("\n")
-    message += inject_file_list modified, <<~EOS
-
-      Uncommitted files:
-    EOS
-  end
-
-  message
-end
-
-
- -
-

- - #check_git_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-
-
# File 'diagnostic.rb', line 474
-
-def check_git_version
-  minimum_version = ENV.fetch("HOMEBREW_MINIMUM_GIT_VERSION")
-  return unless Utils::Git.available?
-  return if Version.new(Utils::Git.version) >= Version.new(minimum_version)
-
-  git = Formula["git"]
-  git_upgrade_cmd = git.any_version_installed? ? "upgrade" : "install"
-  <<~EOS
-    An outdated version (#{Utils::Git.version}) of Git was detected in your PATH.
-    Git #{minimum_version} or newer is required for Homebrew.
-    Please upgrade:
-      brew #{git_upgrade_cmd} git
-  EOS
-end
-
-
- -
-

- - #check_glibc_minimum_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-
-
# File 'extend/os/linux/diagnostic.rb', line 96
-
-def check_glibc_minimum_version
-  return unless OS::Linux::Glibc.below_minimum_version?
-
-  <<~EOS
-    Your system glibc #{OS::Linux::Glibc.system_version} is too old.
-    We only support glibc #{OS::Linux::Glibc.minimum_version} or later.
-    #{please_create_pull_requests}
-    We recommend updating to a newer version via your distribution's
-    package manager, upgrading your distribution to the latest version,
-    or changing distributions.
-  EOS
-end
-
-
- -
-

- - #check_homebrew_prefixObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-819
-820
-821
-822
-823
-824
-825
-826
-827
-828
-829
-
-
# File 'diagnostic.rb', line 819
-
-def check_homebrew_prefix
-  return if Homebrew.default_prefix?
-
-  <<~EOS
-    Your Homebrew's prefix is not #{Homebrew::DEFAULT_PREFIX}.
-
-    Many of Homebrew's bottles (binary packages) can only be used with the default prefix.
-    Consider uninstalling Homebrew and reinstalling into the default prefix.
-    #{please_create_pull_requests}
-  EOS
-end
-
-
- -
-

- - #check_if_supported_sdk_availableObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-
-
# File 'extend/os/mac/diagnostic.rb', line 399
-
-def check_if_supported_sdk_available
-  return unless DevelopmentTools.installed?
-  return unless MacOS.sdk_root_needed?
-  return if MacOS.sdk
-
-  locator = MacOS.sdk_locator
-
-  source = if locator.source == :clt
-    return if MacOS::CLT.below_minimum_version? # Handled by other diagnostics.
-
-    update_instructions = MacOS::CLT.update_instructions
-    "Command Line Tools (CLT)"
-  else
-    return if MacOS::Xcode.below_minimum_version? # Handled by other diagnostics.
-
-    update_instructions = MacOS::Xcode.update_instructions
-    "Xcode"
-  end
-
-  <<~EOS
-    Your #{source} does not support macOS #{MacOS.version}.
-    It is either outdated or was modified.
-    Please update your #{source} or delete it if no updates are available.
-    #{update_instructions}
-  EOS
-end
-
-
- -
-

- - #check_if_xcode_needs_clt_installedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-198
-199
-200
-201
-202
-203
-204
-205
-
-
# File 'extend/os/mac/diagnostic.rb', line 198
-
-def check_if_xcode_needs_clt_installed
-  return unless MacOS::Xcode.needs_clt_installed?
-
-  <<~EOS
-    Xcode alone is not sufficient on #{MacOS.version.pretty_name}.
-    #{DevelopmentTools.installation_instructions}
-  EOS
-end
-
-
- -
-

- - #check_kernel_minimum_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-
-
# File 'extend/os/linux/diagnostic.rb', line 109
-
-def check_kernel_minimum_version
-  return unless OS::Linux::Kernel.below_minimum_version?
-
-  <<~EOS
-    Your Linux kernel #{OS.kernel_version} is too old.
-    We only support kernel #{OS::Linux::Kernel.minimum_version} or later.
-    You will be unable to use binary packages (bottles).
-    #{please_create_pull_requests}
-    We recommend updating to a newer version via your distribution's
-    package manager, upgrading your distribution to the latest version,
-    or changing distributions.
-  EOS
-end
-
-
- -
-

- - #check_linuxbrew_bottle_domainObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-133
-134
-135
-136
-137
-138
-139
-140
-141
-
-
# File 'extend/os/linux/diagnostic.rb', line 133
-
-def check_linuxbrew_bottle_domain
-  return unless Homebrew::EnvConfig.bottle_domain.include?("linuxbrew")
-
-  <<~EOS
-    Your HOMEBREW_BOTTLE_DOMAIN still contains "linuxbrew".
-    You must unset it (or adjust it to not contain linuxbrew
-    e.g. by using homebrew instead).
-  EOS
-end
-
-
- -
-

- - #check_linuxbrew_coreObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-123
-124
-125
-126
-127
-128
-129
-130
-131
-
-
# File 'extend/os/linux/diagnostic.rb', line 123
-
-def check_linuxbrew_core
-  return unless Homebrew::EnvConfig.no_install_from_api?
-  return unless CoreTap.instance.linuxbrew_core?
-
-  <<~EOS
-    Your Linux core repository is still linuxbrew-core.
-    You must `brew update` to update to homebrew-core.
-  EOS
-end
-
-
- -
-

- - #check_missing_depsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-614
-615
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-
-
# File 'diagnostic.rb', line 614
-
-def check_missing_deps
-  return unless HOMEBREW_CELLAR.exist?
-
-  missing = Set.new
-  Homebrew::Diagnostic.missing_deps(Formula.installed).each_value do |deps|
-    missing.merge(deps)
-  end
-  return if missing.empty?
-
-  <<~EOS
-    Some installed formulae are missing dependencies.
-    You should `brew install` the missing dependencies:
-      brew install #{missing.sort_by(&:full_name) * " "}
-
-    Run `brew missing` for more details.
-  EOS
-end
-
-
- -
-

- - #check_multiple_cellarsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-
-
# File 'diagnostic.rb', line 378
-
-def check_multiple_cellars
-  return if HOMEBREW_PREFIX.to_s == HOMEBREW_REPOSITORY.to_s
-  return unless (HOMEBREW_REPOSITORY/"Cellar").exist?
-  return unless (HOMEBREW_PREFIX/"Cellar").exist?
-
-  <<~EOS
-    You have multiple Cellars.
-    You should delete #{HOMEBREW_REPOSITORY}/Cellar:
-      rm -rf #{HOMEBREW_REPOSITORY}/Cellar
-  EOS
-end
-
-
- -
-

- - #check_supported_architectureObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-93
-94
-
-
# File 'extend/os/linux/diagnostic.rb', line 86
-
-def check_supported_architecture
-  return if Hardware::CPU.arch == :x86_64
-
-  <<~EOS
-    Your CPU architecture (#{Hardware::CPU.arch}) is not supported. We only support
-    x86_64 CPU architectures. You will be unable to use binary packages (bottles).
-    #{please_create_pull_requests}
-  EOS
-end
-
-
- -
-

- - #check_tap_git_branchString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-
-
# File 'diagnostic.rb', line 542
-
-def check_tap_git_branch
-  return if ENV["CI"]
-  return unless Utils::Git.available?
-
-  commands = Tap.installed.filter_map do |tap|
-    next if tap.git_repository.default_origin_branch?
-
-    "git -C $(brew --repo #{tap.name}) checkout #{tap.git_repository.origin_branch_name}"
-  end
-
-  return if commands.blank?
-
-  <<~EOS
-    Some taps are not on the default git origin branch and may not receive
-    updates. If this is a surprise to you, check out the default branch with:
-      #{commands.join("\n  ")}
-  EOS
-end
-
-
- -
-

- - #check_tmpdirObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-605
-606
-607
-608
-609
-610
-611
-612
-
-
# File 'diagnostic.rb', line 605
-
-def check_tmpdir
-  tmpdir = ENV.fetch("TMPDIR", nil)
-  return if tmpdir.nil? || File.directory?(tmpdir)
-
-  <<~EOS
-    TMPDIR #{tmpdir.inspect} doesn't exist.
-  EOS
-end
-
-
- -
-

- - #check_tmpdir_executableObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'extend/os/linux/diagnostic.rb', line 44
-
-def check_tmpdir_executable
-  f = Tempfile.new(%w[homebrew_check_tmpdir_executable .sh], HOMEBREW_TEMP)
-  f.write "#!/bin/sh\n"
-  f.chmod 0700
-  f.close
-  return if system T.must(f.path)
-
-  <<~EOS
-    The directory #{HOMEBREW_TEMP} does not permit executing
-    programs. It is likely mounted as "noexec". Please set HOMEBREW_TEMP
-    in your #{Utils::Shell.profile} to a different directory, for example:
-      export HOMEBREW_TEMP=~/tmp
-      echo 'export HOMEBREW_TEMP=~/tmp' >> #{Utils::Shell.profile}
-  EOS
-ensure
-  f&.unlink
-end
-
-
- -
-

- - #check_tmpdir_sticky_bitObject - - - - Also known as: - generic_check_tmpdir_sticky_bit - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-
-
# File 'extend/os/linux/diagnostic.rb', line 31
-
-def check_tmpdir_sticky_bit
-  message = generic_check_tmpdir_sticky_bit
-  return if message.nil?
-
-  message + <<~EOS
-    If you don't have administrative privileges on this machine,
-    create a directory and set the HOMEBREW_TEMP environment variable,
-    for example:
-      install -d -m 1755 ~/tmp
-      #{Utils::Shell.set_variable_in_profile("HOMEBREW_TEMP", "~/tmp")}
-  EOS
-end
-
-
- -
-

- - #check_umask_not_zeroObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-
-
# File 'extend/os/linux/diagnostic.rb', line 75
-
-def check_umask_not_zero
-  return unless File.umask.zero?
-
-  <<~EOS
-    umask is currently set to 000. Directories created by Homebrew cannot
-    be world-writable. This issue can be resolved by adding "umask 002" to
-    your #{Utils::Shell.profile}:
-      echo 'umask 002' >> #{Utils::Shell.profile}
-  EOS
-end
-
-
- -
-

- - #check_user_path_1Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-
-
# File 'diagnostic.rb', line 390
-
-def check_user_path_1
-  @seen_prefix_bin = false
-  @seen_prefix_sbin = false
-
-  message = ""
-
-  paths.each do |p|
-    case p
-    when "/usr/bin"
-      unless @seen_prefix_bin
-        # only show the doctor message if there are any conflicts
-        # rationale: a default install should not trigger any brew doctor messages
-        conflicts = Dir["#{HOMEBREW_PREFIX}/bin/*"]
-                    .map { |fn| File.basename fn }
-                    .select { |bn| File.exist? "/usr/bin/#{bn}" }
-
-        unless conflicts.empty?
-          message = inject_file_list conflicts, <<~EOS
-            /usr/bin occurs before #{HOMEBREW_PREFIX}/bin in your PATH.
-            This means that system-provided programs will be used instead of those
-            provided by Homebrew. Consider setting your PATH so that
-            #{HOMEBREW_PREFIX}/bin occurs before /usr/bin. Here is a one-liner:
-              #{Utils::Shell.prepend_path_in_profile("#{HOMEBREW_PREFIX}/bin")}
-
-            The following tools exist at both paths:
-          EOS
-        end
-      end
-    when "#{HOMEBREW_PREFIX}/bin"
-      @seen_prefix_bin = true
-    when "#{HOMEBREW_PREFIX}/sbin"
-      @seen_prefix_sbin = true
-    end
-  end
-
-  message unless message.empty?
-end
-
-
- -
-

- - #check_user_path_2Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-428
-429
-430
-431
-432
-433
-434
-435
-436
-
-
# File 'diagnostic.rb', line 428
-
-def check_user_path_2
-  return if @seen_prefix_bin
-
-  <<~EOS
-    Homebrew's "bin" was not found in your PATH.
-    Consider setting your PATH for example like so:
-      #{Utils::Shell.prepend_path_in_profile("#{HOMEBREW_PREFIX}/bin")}
-  EOS
-end
-
-
- -
-

- - #check_user_path_3Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-
-
# File 'diagnostic.rb', line 438
-
-def check_user_path_3
-  return if @seen_prefix_sbin
-
-  # Don't complain about sbin not being in the path if it doesn't exist
-  sbin = HOMEBREW_PREFIX/"sbin"
-  return unless sbin.directory?
-  return if sbin.children.empty?
-  return if sbin.children.one? && sbin.children.first.basename.to_s == ".keepme"
-
-  <<~EOS
-    Homebrew's "sbin" was not found in your PATH but you have installed
-    formulae that put executables in #{HOMEBREW_PREFIX}/sbin.
-    Consider setting your PATH for example like so:
-      #{Utils::Shell.prepend_path_in_profile("#{HOMEBREW_PREFIX}/sbin")}
-  EOS
-end
-
-
- -
-

- - #check_xcode_license_approvedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-
-
# File 'extend/os/mac/diagnostic.rb', line 243
-
-def check_xcode_license_approved
-  # If the user installs Xcode-only, they have to approve the
-  # license or no "xc*" tool will work.
-  return unless `/usr/bin/xcrun clang 2>&1`.include?("license")
-  return if $CHILD_STATUS.success?
-
-  <<~EOS
-    You have not agreed to the Xcode license.
-    Agree to the license by opening Xcode.app or running:
-      sudo xcodebuild -license
-  EOS
-end
-
-
- -
-

- - #check_xcode_minimum_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
-
# File 'extend/os/mac/diagnostic.rb', line 176
-
-def check_xcode_minimum_version
-  return unless MacOS::Xcode.below_minimum_version?
-
-  xcode = MacOS::Xcode.version.to_s
-  xcode += " => #{MacOS::Xcode.prefix}" unless MacOS::Xcode.default_prefix?
-
-  <<~EOS
-    Your Xcode (#{xcode}) at #{MacOS::Xcode.bundle_path} is too outdated.
-    Please update to Xcode #{MacOS::Xcode.latest_version} (or delete it).
-    #{MacOS::Xcode.update_instructions}
-  EOS
-end
-
-
- -
-

- - #check_xcode_prefixObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-
-
# File 'extend/os/mac/diagnostic.rb', line 207
-
-def check_xcode_prefix
-  prefix = MacOS::Xcode.prefix
-  return if prefix.nil?
-  return unless prefix.to_s.include?(" ")
-
-  <<~EOS
-    Xcode is installed to a directory with a space in the name.
-    This will cause some formulae to fail to build.
-  EOS
-end
-
-
- -
-

- - #check_xcode_prefix_existsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-
-
# File 'extend/os/mac/diagnostic.rb', line 218
-
-def check_xcode_prefix_exists
-  prefix = MacOS::Xcode.prefix
-  return if prefix.nil? || prefix.exist?
-
-  <<~EOS
-    The directory Xcode is reportedly installed to doesn't exist:
-      #{prefix}
-    You may need to `xcode-select` the proper path if you have moved Xcode.
-  EOS
-end
-
-
- -
-

- - #check_xcode_select_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-
-
# File 'extend/os/mac/diagnostic.rb', line 229
-
-def check_xcode_select_path
-  return if MacOS::CLT.installed?
-  return unless MacOS::Xcode.installed?
-  return if File.file?("#{MacOS.active_developer_dir}/usr/bin/xcodebuild")
-
-  path = MacOS::Xcode.bundle_path
-  path = "/Developer" if path.nil? || !path.directory?
-  <<~EOS
-    Your Xcode is configured with an invalid path.
-    You should change it to the correct path:
-      sudo xcode-select --switch #{path}
-  EOS
-end
-
-
- -
-

- - #check_xcode_up_to_dateObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-
-
# File 'extend/os/mac/diagnostic.rb', line 130
-
-def check_xcode_up_to_date
-  return unless MacOS::Xcode.outdated?
-
-  # CI images are going to end up outdated so don't complain when
-  # `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
-  # repository. This only needs to support whatever CI providers
-  # Homebrew/brew is currently using.
-  return if GitHub::Actions.env_set?
-
-  # With fake El Capitan for Portable Ruby, we are intentionally not using Xcode 8.
-  # This is because we are not using the CLT and Xcode 8 has the 10.12 SDK.
-  return if ENV["HOMEBREW_FAKE_MACOS"]
-
-  message = <<~EOS
-    Your Xcode (#{MacOS::Xcode.version}) is outdated.
-    Please update to Xcode #{MacOS::Xcode.latest_version} (or delete it).
-    #{MacOS::Xcode.update_instructions}
-  EOS
-
-  if OS::Mac.version.prerelease?
-    current_path = Utils.popen_read("/usr/bin/xcode-select", "-p")
-    message += <<~EOS
-      If #{MacOS::Xcode.latest_version} is installed, you may need to:
-        sudo xcode-select --switch /Applications/Xcode.app
-      Current developer directory is:
-        #{current_path}
-    EOS
-  end
-  message
-end
-
-
- -
-

- - #check_xdg_data_dirsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# File 'extend/os/linux/diagnostic.rb', line 62
-
-def check_xdg_data_dirs
-  xdg_data_dirs = ENV.fetch("XDG_DATA_DIRS", nil)
-  return if xdg_data_dirs.blank? || xdg_data_dirs.split("/").include?(HOMEBREW_PREFIX/"share")
-
-  <<~EOS
-    Homebrew's share was not found in your XDG_DATA_DIRS but you have
-    this variable set to include other locations.
-    Some programs like `vapigen` may not work correctly.
-    Consider adding Homebrew's share directory to XDG_DATA_DIRS like so:
-      echo 'export XDG_DATA_DIRS="#{HOMEBREW_PREFIX}/share:$XDG_DATA_DIRS"' >> #{Utils::Shell.profile}
-  EOS
-end
-
-
- -
-

- - #current_userObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1047
-1048
-1049
-
-
# File 'diagnostic.rb', line 1047
-
-def current_user
-  ENV.fetch("USER", "$(whoami)")
-end
-
-
- -
-

- - #examine_git_origin(repository_path, desired_origin) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - repository_path - - - (GitRepository) - - - -
  • - -
  • - - desired_origin - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-
-
# File 'diagnostic.rb', line 129
-
-def examine_git_origin(repository_path, desired_origin)
-  return if !Utils::Git.available? || !repository_path.git_repository?
-
-  current_origin = repository_path.origin_url
-
-  if current_origin.nil?
-    <<~EOS
-      Missing #{desired_origin} git origin remote.
-
-      Without a correctly configured origin, Homebrew won't update
-      properly. You can solve this by adding the remote:
-        git -C "#{repository_path}" remote add origin #{Formatter.url(desired_origin)}
-    EOS
-  elsif !current_origin.match?(%r{#{desired_origin}(\.git|/)?$}i)
-    <<~EOS
-      Suspicious #{desired_origin} git origin remote found.
-      The current git origin is:
-        #{current_origin}
-
-      With a non-standard origin, Homebrew won't update properly.
-      You can solve this by setting the origin remote:
-        git -C "#{repository_path}" remote set-url origin #{Formatter.url(desired_origin)}
-    EOS
-  end
-end
-
-
- -
-

- - #fatal_build_from_source_checksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'extend/os/mac/diagnostic.rb', line 60
-
-def fatal_build_from_source_checks
-  %w[
-    check_xcode_license_approved
-    check_xcode_minimum_version
-    check_clt_minimum_version
-    check_if_xcode_needs_clt_installed
-    check_if_supported_sdk_available
-    check_broken_sdks
-  ].freeze
-end
-
-
- -
-

- - #fatal_preinstall_checksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'diagnostic.rb', line 86
-
-def fatal_preinstall_checks
-  checks = %w[
-    check_access_directories
-  ]
-
-  # We need the developer tools for `codesign`.
-  checks << "check_for_installed_developer_tools" if Hardware::CPU.arm?
-
-  checks.freeze
-end
-
-
- -
-

- - #fatal_setup_build_environment_checksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-
-
# File 'extend/os/mac/diagnostic.rb', line 71
-
-def fatal_setup_build_environment_checks
-  %w[
-    check_xcode_minimum_version
-    check_clt_minimum_version
-    check_if_supported_sdk_available
-  ].freeze
-end
-
-
- -
-

- - #find_relative_paths(*relative_paths) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Finds files in HOMEBREW_PREFIX and /usr/local. -Specify paths relative to a prefix, e.g. "include/foo.h". -Sets @found for your convenience.

- - -
-
-
- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-
-
# File 'diagnostic.rb', line 60
-
-def find_relative_paths(*relative_paths)
-  @found = [HOMEBREW_PREFIX, "/usr/local"].uniq.reduce([]) do |found, prefix|
-    found + relative_paths.map { |f| File.join(prefix, f) }.select { |f| File.exist? f }
-  end
-end
-
-
- -
-

- - #inject_file_list(list, string) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - list - - - (Array<String>) - - - -
  • - -
  • - - string - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-67
-68
-69
-70
-
-
# File 'diagnostic.rb', line 67
-
-def inject_file_list(list, string)
-  list.reduce(string.dup) { |acc, elem| acc << "  #{elem}\n" }
-      .freeze
-end
-
-
- -
-

- - #none_stringString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-
-
# File 'diagnostic.rb', line 77
-
-def none_string
-  "<NONE>"
-end
-
-
- -
-

- - #please_create_pull_requests(what = "unsupported configuration") ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-
-
# File 'diagnostic.rb', line 114
-
-def please_create_pull_requests(what = "unsupported configuration")
-  <<~EOS
-    It is expected behaviour that some formulae will fail to build in this #{what}.
-    It is expected behaviour that Homebrew will be buggy and slow.
-    Do not create any issues about this on Homebrew's GitHub repositories.
-    Do not create any issues even if you think this message is unrelated.
-    Any opened issues will be immediately closed without response.
-    Do not ask for help from Homebrew or its maintainers on social media.
-    You may ask for help in Homebrew's discussions but are unlikely to receive a response.
-    Try to figure out the problem yourself and submit a fix as a pull request.
-    We will review it but may or may not accept it.
-  EOS
-end
-
-
- -
-

- - #supported_configuration_checksObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-79
-80
-81
-82
-83
-
-
# File 'extend/os/mac/diagnostic.rb', line 79
-
-def supported_configuration_checks
-  %w[
-    check_for_unsupported_macos
-  ].freeze
-end
-
-
- -
-

- - #user_tilde(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-72
-73
-74
-
-
# File 'diagnostic.rb', line 72
-
-def user_tilde(path)
-  path.gsub(Dir.home, "~")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Diagnostic/Volumes.html b/docs/Homebrew/Diagnostic/Volumes.html deleted file mode 100644 index e7cc0844f..000000000 --- a/docs/Homebrew/Diagnostic/Volumes.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - Class: Homebrew::Diagnostic::Volumes - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Diagnostic::Volumes - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/mac/diagnostic.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initializeVolumes - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Volumes.

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'extend/os/mac/diagnostic.rb', line 7
-
-def initialize
-  @volumes = get_mounts
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #get_mounts(path = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'extend/os/mac/diagnostic.rb', line 24
-
-def get_mounts(path = nil)
-  vols = []
-  # get the volume of path, if path is nil returns all volumes
-
-  args = %w[/bin/df -P]
-  args << path if path
-
-  Utils.popen_read(*args) do |io|
-    io.each_line do |line|
-      case line.chomp
-        # regex matches: /dev/disk0s2   489562928 440803616  48247312    91%    /
-      when /^.+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]{1,3}%\s+(.+)/
-        vols << Regexp.last_match(1)
-      end
-    end
-  end
-  vols
-end
-
-
- -
-

- - #which(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'extend/os/mac/diagnostic.rb', line 11
-
-def which(path)
-  vols = get_mounts path
-
-  # no volume found
-  return -1 if vols.empty?
-
-  vol_index = @volumes.index(vols[0])
-  # volume not found in volume list
-  return -1 if vol_index.nil?
-
-  vol_index
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/EnvConfig.html b/docs/Homebrew/EnvConfig.html deleted file mode 100644 index b3f08a2ad..000000000 --- a/docs/Homebrew/EnvConfig.html +++ /dev/null @@ -1,8075 +0,0 @@ - - - - - - - Module: Homebrew::EnvConfig - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::EnvConfig - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
env_config.rb,
- sorbet/rbi/dsl/homebrew/env_config.rbi
-
-
- -
- -

Overview

-
-

- This module is part of an internal API. - This module may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for querying Homebrew-specific environment variables.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
ENVS = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  HOMEBREW_ALLOWED_TAPS:                     {
-    description: "A space-separated list of taps. Homebrew will refuse to install a " \
-                 "formula unless it and all of its dependencies are in an official tap " \
-                 "or in a tap on this list.",
-  },
-  HOMEBREW_API_AUTO_UPDATE_SECS:             {
-    description: "Check Homebrew's API for new formulae or cask data every " \
-                 "`HOMEBREW_API_AUTO_UPDATE_SECS` seconds. Alternatively, disable API auto-update " \
-                 "checks entirely with `HOMEBREW_NO_AUTO_UPDATE`.",
-    default:     450,
-  },
-  HOMEBREW_API_DOMAIN:                       {
-    description:  "Use this URL as the download mirror for Homebrew JSON API. " \
-                  "If metadata files at that URL are temporarily unavailable, " \
-                  "the default API domain will be used as a fallback mirror.",
-    default_text: "`https://formulae.brew.sh/api`.",
-    default:      HOMEBREW_API_DEFAULT_DOMAIN,
-  },
-  HOMEBREW_ARCH:                             {
-    description: "Linux only: Pass this value to a type name representing the compiler's `-march` option.",
-    default:     "native",
-  },
-  HOMEBREW_ARTIFACT_DOMAIN:                  {
-    description: "Prefix all download URLs, including those for bottles, with this value. " \
-                 "For example, `HOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080` will cause a " \
-                 "formula with the URL `https://example.com/foo.tar.gz` to instead download from " \
-                 "`http://localhost:8080/https://example.com/foo.tar.gz`. " \
-                 "Bottle URLs however, have their domain replaced with this prefix. " \
-                 "This results in e.g. " \
-                 "`https://ghcr.io/v2/homebrew/core/gettext/manifests/0.21` " \
-                 "to instead be downloaded from " \
-                 "`http://localhost:8080/v2/homebrew/core/gettext/manifests/0.21`",
-  },
-  HOMEBREW_ARTIFACT_DOMAIN_NO_FALLBACK:      {
-    description: "If `HOMEBREW_ARTIFACT_DOMAIN` and `HOMEBREW_ARTIFACT_DOMAIN_NO_FALLBACK` are both set, " \
-                 "if the request to `HOMEBREW_ARTIFACT_DOMAIN` fails then it Homebrew will error rather than " \
-                 "trying any other/default URLs.",
-    boolean:     true,
-  },
-  HOMEBREW_AUTO_UPDATE_SECS:                 {
-    description:  "Run `brew update` once every `HOMEBREW_AUTO_UPDATE_SECS` seconds before some commands, " \
-                  "e.g. `brew install`, `brew upgrade` and `brew tap`. Alternatively, " \
-                  "disable auto-update entirely with `HOMEBREW_NO_AUTO_UPDATE`.",
-    default_text: "`86400` (24 hours), `3600` (1 hour) if a developer command has been run " \
-                  "or `300` (5 minutes) if `HOMEBREW_NO_INSTALL_FROM_API` is set.",
-  },
-  HOMEBREW_BAT:                              {
-    description: "If set, use `bat` for the `brew cat` command.",
-    boolean:     true,
-  },
-  HOMEBREW_BAT_CONFIG_PATH:                  {
-    description:  "Use this as the `bat` configuration file.",
-    default_text: "`$BAT_CONFIG_PATH`.",
-  },
-  HOMEBREW_BAT_THEME:                        {
-    description:  "Use this as the `bat` theme for syntax highlighting.",
-    default_text: "`$BAT_THEME`.",
-  },
-  HOMEBREW_BOOTSNAP:                         {
-    description: "If set, use Bootsnap to speed up repeated `brew` calls. " \
-                 "A no-op when using Homebrew's vendored, relocatable Ruby on macOS (as it doesn't work).",
-    boolean:     true,
-  },
-  HOMEBREW_BOTTLE_DOMAIN:                    {
-    description:  "Use this URL as the download mirror for bottles. " \
-                  "If bottles at that URL are temporarily unavailable, " \
-                  "the default bottle domain will be used as a fallback mirror. " \
-                  "For example, `HOMEBREW_BOTTLE_DOMAIN=http://localhost:8080` will cause all bottles to " \
-                  "download from the prefix `http://localhost:8080/`. " \
-                  "If bottles are not available at `HOMEBREW_BOTTLE_DOMAIN` " \
-                  "they will be downloaded from the default bottle domain.",
-    default_text: "`https://ghcr.io/v2/homebrew/core`.",
-    default:      HOMEBREW_BOTTLE_DEFAULT_DOMAIN,
-  },
-  HOMEBREW_BREW_GIT_REMOTE:                  {
-    description: "Use this URL as the Homebrew/brew `git`(1) remote.",
-    default:     HOMEBREW_BREW_DEFAULT_GIT_REMOTE,
-  },
-  HOMEBREW_BROWSER:                          {
-    description:  "Use this as the browser when opening project homepages.",
-    default_text: "`$BROWSER` or the OS's default browser.",
-  },
-  HOMEBREW_BUNDLE_USER_CACHE:                {
-    description: "If set, use this directory as the `bundle`(1) user cache.",
-  },
-  HOMEBREW_CACHE:                            {
-    description:  "Use this directory as the download cache.",
-    default_text: "macOS: `$HOME/Library/Caches/Homebrew`, " \
-                  "Linux: `$XDG_CACHE_HOME/Homebrew` or `$HOME/.cache/Homebrew`.",
-    default:      HOMEBREW_DEFAULT_CACHE,
-  },
-  HOMEBREW_CASK_OPTS:                        {
-    description: "Append these options to all `cask` commands. All `--*dir` options, " \
-                 "`--language`, `--require-sha`, `--no-quarantine` and `--no-binaries` are supported. " \
-                 "For example, you might add something like the following to your " \
-                 "`~/.profile`, `~/.bash_profile`, or `~/.zshenv`:" \
-                 "\n\n    `export HOMEBREW_CASK_OPTS=\"--appdir=~/Applications --fontdir=/Library/Fonts\"`",
-  },
-  HOMEBREW_CLEANUP_MAX_AGE_DAYS:             {
-    description: "Cleanup all cached files older than this many days.",
-    default:     120,
-  },
-  HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:       {
-    description: "If set, `brew install`, `brew upgrade` and `brew reinstall` will cleanup all formulae " \
-                 "when this number of days has passed.",
-    default:     30,
-  },
-  HOMEBREW_COLOR:                            {
-    description: "If set, force colour output on non-TTY outputs.",
-    boolean:     true,
-  },
-  HOMEBREW_CORE_GIT_REMOTE:                  {
-    description:  "Use this URL as the Homebrew/homebrew-core `git`(1) remote.",
-    default_text: "`https://github.com/Homebrew/homebrew-core`.",
-    default:      HOMEBREW_CORE_DEFAULT_GIT_REMOTE,
-  },
-  HOMEBREW_CURLRC:                           {
-    description: "If set to an absolute path (i.e. beginning with `/`), pass it with `--config` when invoking " \
-                 "`curl`(1). " \
-                 "If set but _not_ a valid path, do not pass `--disable`, which disables the " \
-                 "use of `.curlrc`.",
-  },
-  HOMEBREW_CURL_PATH:                        {
-    description: "Linux only: Set this value to a new enough `curl` executable for Homebrew to use.",
-    default:     "curl",
-  },
-  HOMEBREW_CURL_RETRIES:                     {
-    description: "Pass the given retry count to `--retry` when invoking `curl`(1).",
-    default:     3,
-  },
-  HOMEBREW_CURL_VERBOSE:                     {
-    description: "If set, pass `--verbose` when invoking `curl`(1).",
-    boolean:     true,
-  },
-  HOMEBREW_DEBUG:                            {
-    description: "If set, always assume `--debug` when running commands.",
-    boolean:     true,
-  },
-  HOMEBREW_DEVELOPER:                        {
-    description: "If set, tweak behaviour to be more relevant for Homebrew developers (active or " \
-                 "budding) by e.g. turning warnings into errors.",
-    boolean:     true,
-  },
-  HOMEBREW_DISABLE_LOAD_FORMULA:             {
-    description: "If set, refuse to load formulae. This is useful when formulae are not trusted (such " \
-                 "as in pull requests).",
-    boolean:     true,
-  },
-  HOMEBREW_DISPLAY:                          {
-    description:  "Use this X11 display when opening a page in a browser, for example with " \
-                  "`brew home`. Primarily useful on Linux.",
-    default_text: "`$DISPLAY`.",
-  },
-  HOMEBREW_DISPLAY_INSTALL_TIMES:            {
-    description: "If set, print install times for each formula at the end of the run.",
-    boolean:     true,
-  },
-  HOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN: {
-    description: "Use this base64 encoded username and password for authenticating with a Docker registry " \
-                 "proxying GitHub Packages. If `HOMEBREW_DOCKER_REGISTRY_TOKEN` is set, it will be used instead.",
-  },
-  HOMEBREW_DOCKER_REGISTRY_TOKEN:            {
-    description: "Use this bearer token for authenticating with a Docker registry proxying GitHub Packages. " \
-                 "Preferred over `HOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN`.",
-  },
-  HOMEBREW_EDITOR:                           {
-    description:  "Use this editor when editing a single formula, or several formulae in the " \
-                  "same directory." \
-                  "\n\n    *Note:* `brew edit` will open all of Homebrew as discontinuous files " \
-                  "and directories. Visual Studio Code can handle this correctly in project mode, but many " \
-                  "editors will do strange things in this case.",
-    default_text: "`$EDITOR` or `$VISUAL`.",
-  },
-  HOMEBREW_EVAL_ALL:                         {
-    description: "If set, `brew` commands evaluate all formulae and casks, executing their arbitrary code, by " \
-                 "default without requiring `--eval-all`. Required to cache formula and cask descriptions.",
-    boolean:     true,
-  },
-  HOMEBREW_FAIL_LOG_LINES:                   {
-    description: "Output this many lines of output on formula `system` failures.",
-    default:     15,
-  },
-  HOMEBREW_FORBIDDEN_CASKS:                  {
-    description: "A space-separated list of casks. Homebrew will refuse to install a " \
-                 "cask if it or any of its dependencies is on this list.",
-  },
-  HOMEBREW_FORBIDDEN_FORMULAE:               {
-    description: "A space-separated list of formulae. Homebrew will refuse to install a " \
-                 "formula or cask if it or any of its dependencies is on this list.",
-  },
-  HOMEBREW_FORBIDDEN_LICENSES:               {
-    description: "A space-separated list of licenses. Homebrew will refuse to install a " \
-                 "formula if it or any of its dependencies has a license on this list.",
-  },
-  HOMEBREW_FORBIDDEN_OWNER:                  {
-    description: "The person who has set any `HOMEBREW_FORBIDDEN_*` variables.",
-    default:     "you",
-  },
-  HOMEBREW_FORBIDDEN_OWNER_CONTACT:          {
-    description: "How to contact the `HOMEBREW_FORBIDDEN_OWNER`, if set and necessary.",
-  },
-  HOMEBREW_FORBIDDEN_TAPS:                   {
-    description: "A space-separated list of taps. Homebrew will refuse to install a " \
-                 "formula if it or any of its dependencies is in a tap on this list.",
-  },
-  HOMEBREW_FORCE_BREWED_CA_CERTIFICATES:     {
-    description: "If set, always use a Homebrew-installed `ca-certificates` rather than the system version. " \
-                 "Automatically set if the system version is too old.",
-    boolean:     true,
-  },
-  HOMEBREW_FORCE_BREWED_CURL:                {
-    description: "If set, always use a Homebrew-installed `curl`(1) rather than the system version. " \
-                 "Automatically set if the system version of `curl` is too old.",
-    boolean:     true,
-  },
-  HOMEBREW_FORCE_BREWED_GIT:                 {
-    description: "If set, always use a Homebrew-installed `git`(1) rather than the system version. " \
-                 "Automatically set if the system version of `git` is too old.",
-    boolean:     true,
-  },
-  HOMEBREW_FORCE_VENDOR_RUBY:                {
-    description: "If set, always use Homebrew's vendored, relocatable Ruby version even if the system version " \
-                 "of Ruby is new enough.",
-    boolean:     true,
-  },
-  HOMEBREW_FORMULA_BUILD_NETWORK:            {
-    description: "If set, controls network access to the sandbox for formulae builds. Overrides any " \
-                 "controls set through DSL usage inside formulae. Must be `allow` or `deny`. If no value is " \
-                 "set through this environment variable or DSL usage, the default behavior is `allow`.",
-  },
-  HOMEBREW_FORMULA_POSTINSTALL_NETWORK:      {
-    description: "If set, controls network access to the sandbox for formulae postinstall. Overrides any " \
-                 "controls set through DSL usage inside formulae. Must be `allow` or `deny`. If no value is " \
-                 "set through this environment variable or DSL usage, the default behavior is `allow`.",
-  },
-  HOMEBREW_FORMULA_TEST_NETWORK:             {
-    description: "If set, controls network access to the sandbox for formulae test. Overrides any " \
-                 "controls set through DSL usage inside formulae. Must be `allow` or `deny`. If no value is " \
-                 "set through this environment variable or DSL usage, the default behavior is `allow`.",
-  },
-  HOMEBREW_GITHUB_API_TOKEN:                 {
-    description: "Use this personal access token for the GitHub API, for features such as " \
-                 "`brew search`. You can create one at <https://github.com/settings/tokens>. If set, " \
-                 "GitHub will allow you a greater number of API requests. For more information, see: " \
-                 "<https://docs.github.com/en/rest/overview/rate-limits-for-the-rest-api>" \
-                 "\n\n    *Note:* Homebrew doesn't require permissions for any of the scopes, but some " \
-                 "developer commands may require additional permissions.",
-  },
-  HOMEBREW_GITHUB_PACKAGES_TOKEN:            {
-    description: "Use this GitHub personal access token when accessing the GitHub Packages Registry " \
-                 "(where bottles may be stored).",
-  },
-  HOMEBREW_GITHUB_PACKAGES_USER:             {
-    description: "Use this username when accessing the GitHub Packages Registry (where bottles may be stored).",
-  },
-  HOMEBREW_GIT_EMAIL:                        {
-    description: "Set the Git author and committer email to this value.",
-  },
-  HOMEBREW_GIT_NAME:                         {
-    description: "Set the Git author and committer name to this value.",
-  },
-  HOMEBREW_GIT_PATH:                         {
-    description: "Linux only: Set this value to a new enough `git` executable for Homebrew to use.",
-    default:     "git",
-  },
-  HOMEBREW_INSTALL_BADGE:                    {
-    description:  "Print this text before the installation summary of each successful build.",
-    default_text: 'The "Beer Mug" emoji.',
-    default:      "🍺",
-  },
-  HOMEBREW_LIVECHECK_WATCHLIST:              {
-    description:  "Consult this file for the list of formulae to check by default when no formula argument " \
-                  "is passed to `brew livecheck`.",
-    default_text: "`$XDG_CONFIG_HOME/homebrew/livecheck_watchlist.txt` if `$XDG_CONFIG_HOME` is set " \
-                  "or `$HOME/.homebrew/livecheck_watchlist.txt` otherwise.",
-    default:      "#{ENV.fetch("HOMEBREW_USER_CONFIG_HOME")}/livecheck_watchlist.txt",
-  },
-  HOMEBREW_LOGS:                             {
-    description:  "Use this directory to store log files.",
-    default_text: "macOS: `$HOME/Library/Logs/Homebrew`, " \
-                  "Linux: `$XDG_CACHE_HOME/Homebrew/Logs` or `$HOME/.cache/Homebrew/Logs`.",
-    default:      HOMEBREW_DEFAULT_LOGS,
-  },
-  HOMEBREW_MAKE_JOBS:                        {
-    description:  "Use this value as the number of parallel jobs to run when building with `make`(1).",
-    default_text: "The number of available CPU cores.",
-    default:      lambda {
-      require "os"
-      require "hardware"
-      Hardware::CPU.cores
-    },
-  },
-  HOMEBREW_NO_ANALYTICS:                     {
-    description: "If set, do not send analytics. Google Analytics were destroyed. " \
-                 "For more information, see: <https://docs.brew.sh/Analytics>",
-    boolean:     true,
-  },
-  HOMEBREW_NO_AUTOREMOVE:                    {
-    description: "If set, calls to `brew cleanup` and `brew uninstall` will not automatically " \
-                 "remove unused formula dependents.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_AUTO_UPDATE:                   {
-    description: "If set, do not automatically update before running some commands, e.g. " \
-                 "`brew install`, `brew upgrade` and `brew tap`. Preferably, " \
-                 "run this less often by setting `HOMEBREW_AUTO_UPDATE_SECS` to a value higher than the " \
-                 "default. Note that setting this and e.g. tapping new taps may result in a broken  " \
-                 "configuration. Please ensure you always run `brew update` before reporting any issues.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_BOOTSNAP:                      {
-    description: "If set, do not use Bootsnap to speed up repeated `brew` calls.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_CLEANUP_FORMULAE:              {
-    description: "A comma-separated list of formulae. Homebrew will refuse to clean up " \
-                 "or autoremove a formula if it appears on this list.",
-  },
-  HOMEBREW_NO_COLOR:                         {
-    description:  "If set, do not print text with colour added.",
-    default_text: "`$NO_COLOR`.",
-    boolean:      true,
-  },
-  HOMEBREW_NO_EMOJI:                         {
-    description: "If set, do not print `HOMEBREW_INSTALL_BADGE` on a successful build.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_ENV_HINTS:                     {
-    description: "If set, do not print any hints about changing Homebrew's behaviour with environment variables.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_GITHUB_API:                    {
-    description: "If set, do not use the GitHub API, e.g. for searches or fetching relevant issues " \
-                 "after a failed install.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_INSECURE_REDIRECT:             {
-    description: "If set, forbid redirects from secure HTTPS to insecure HTTP." \
-                 "\n\n    *Note:* while ensuring your downloads are fully secure, this is likely to cause " \
-                 "from-source SourceForge, some GNU & GNOME-hosted formulae to fail to download.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK:    {
-    description: "If set, do not check for broken linkage of dependents or outdated dependents after " \
-                 "installing, upgrading or reinstalling formulae. This will result in fewer dependents " \
-                 "(and their dependencies) being upgraded or reinstalled but may result in more breakage " \
-                 "from running `brew install` <formula> or `brew upgrade` <formula>.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_INSTALL_CLEANUP:               {
-    description: "If set, `brew install`, `brew upgrade` and `brew reinstall` will never automatically " \
-                 "cleanup installed/upgraded/reinstalled formulae or all formulae every " \
-                 "`HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS` days. Alternatively, `HOMEBREW_NO_CLEANUP_FORMULAE` " \
-                 "allows specifying specific formulae to not clean up.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_INSTALL_FROM_API:              {
-    description: "If set, do not install formulae and casks in homebrew/core and homebrew/cask taps using " \
-                 "Homebrew's API and instead use (large, slow) local checkouts of these repositories.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_INSTALL_UPGRADE:               {
-    description: "If set, `brew install` <formula|cask> will not upgrade <formula|cask> if it is installed but " \
-                 "outdated.",
-    boolean:     true,
-  },
-  HOMEBREW_NO_UPDATE_REPORT_NEW:             {
-    description: "If set, `brew update` will not show the list of newly added formulae/casks.",
-    boolean:     true,
-  },
-  HOMEBREW_PIP_INDEX_URL:                    {
-    description:  "If set, `brew install` <formula> will use this URL to download PyPI package resources.",
-    default_text: "`https://pypi.org/simple`.",
-  },
-  HOMEBREW_PRY:                              {
-    description: "If set, use Pry for the `brew irb` command.",
-    boolean:     true,
-  },
-  HOMEBREW_SIMULATE_MACOS_ON_LINUX:          {
-    description: "If set, running Homebrew on Linux will simulate certain macOS code paths. This is useful " \
-                 "when auditing macOS formulae while on Linux.",
-    boolean:     true,
-  },
-  HOMEBREW_SKIP_OR_LATER_BOTTLES:            {
-    description: "If set along with `HOMEBREW_DEVELOPER`, do not use bottles from older versions " \
-                 "of macOS. This is useful in development on new macOS versions.",
-    boolean:     true,
-  },
-  HOMEBREW_SORBET_RUNTIME:                   {
-    description: "If set, enable runtime typechecking using Sorbet. " \
-                 "Set by default for `HOMEBREW_DEVELOPER` or when running some developer commands.",
-    boolean:     true,
-  },
-  HOMEBREW_SSH_CONFIG_PATH:                  {
-    description:  "If set, Homebrew will use the given config file instead of `~/.ssh/config` when fetching " \
-                  "Git repositories over SSH.",
-    default_text: "`$HOME/.ssh/config`",
-  },
-  HOMEBREW_SUDO_THROUGH_SUDO_USER:           {
-    description: "If set, Homebrew will use the `SUDO_USER` environment variable to define the user to " \
-                 "`sudo`(8) through when running `sudo`(8).",
-    boolean:     true,
-  },
-  HOMEBREW_SVN:                              {
-    description:  "Use this as the `svn`(1) binary.",
-    default_text: "A Homebrew-built Subversion (if installed), or the system-provided binary.",
-  },
-  HOMEBREW_SYSTEM_ENV_TAKES_PRIORITY:        {
-    description: "If set in Homebrew's system-wide environment file (`/etc/homebrew/brew.env`), " \
-                 "the system-wide environment file will be loaded last to override any prefix or user settings.",
-    boolean:     true,
-  },
-  HOMEBREW_TEMP:                             {
-    description:  "Use this path as the temporary directory for building packages. Changing " \
-                  "this may be needed if your system temporary directory and Homebrew prefix are on " \
-                  "different volumes, as macOS has trouble moving symlinks across volumes when the target " \
-                  "does not yet exist. This issue typically occurs when using FileVault or custom SSD " \
-                  "configurations.",
-    default_text: "macOS: `/private/tmp`, Linux: `/tmp`.",
-    default:      HOMEBREW_DEFAULT_TEMP,
-  },
-  HOMEBREW_UPDATE_TO_TAG:                    {
-    description: "If set, always use the latest stable tag (even if developer commands " \
-                 "have been run).",
-    boolean:     true,
-  },
-  HOMEBREW_UPGRADE_GREEDY:                   {
-    description: "If set, pass `--greedy` to all cask upgrade commands.",
-    boolean:     true,
-  },
-  HOMEBREW_VERBOSE:                          {
-    description: "If set, always assume `--verbose` when running commands.",
-    boolean:     true,
-  },
-  HOMEBREW_VERBOSE_USING_DOTS:               {
-    description: "If set, verbose output will print a `.` no more than once a minute. This can be " \
-                 "useful to avoid long-running Homebrew commands being killed due to no output.",
-    boolean:     true,
-  },
-  HOMEBREW_VERIFY_ATTESTATIONS:              {
-    description: "If set, Homebrew will use the `gh` tool to verify cryptographic attestations " \
-                 "of build provenance for bottles from homebrew-core.",
-    boolean:     true,
-  },
-  SUDO_ASKPASS:                              {
-    description: "If set, pass the `-A` option when calling `sudo`(8).",
-  },
-  all_proxy:                                 {
-    description: "Use this SOCKS5 proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
-  },
-  ftp_proxy:                                 {
-    description: "Use this FTP proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
-  },
-  http_proxy:                                {
-    description: "Use this HTTP proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
-  },
-  https_proxy:                               {
-    description: "Use this HTTPS proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
-  },
-  no_proxy:                                  {
-    description: "A comma-separated list of hostnames and domain names excluded " \
-                 "from proxying by `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
-  },
-}.freeze
- -
CUSTOM_IMPLEMENTATIONS = -
-
-

- This constant is part of an internal API. - This constant may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Set.new([
-  :HOMEBREW_MAKE_JOBS,
-  :HOMEBREW_CASK_OPTS,
-]).freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .all_proxy::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-11
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 11
-
-def all_proxy; end
-
-
- -
-

- - .allowed_taps::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-14
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 14
-
-def allowed_taps; end
-
-
- -
-

- - .api_auto_update_secsInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 17
-
-def api_auto_update_secs; end
-
-
- -
-

- - .api_domainString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 20
-
-def api_domain; end
-
-
- -
-

- - .archString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 23
-
-def arch; end
-
-
- -
-

- - .artifact_domain::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-26
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 26
-
-def artifact_domain; end
-
-
- -
-

- - .artifact_domain_no_fallback?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 29
-
-def artifact_domain_no_fallback?; end
-
-
- -
-

- - .auto_update_secs::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-32
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 32
-
-def auto_update_secs; end
-
-
- -
-

- - .automatically_set_no_install_from_api?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-556
-557
-558
-
-
# File 'env_config.rb', line 556
-
-def automatically_set_no_install_from_api?
-  ENV["HOMEBREW_AUTOMATICALLY_SET_NO_INSTALL_FROM_API"].present?
-end
-
-
- -
-

- - .bat?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 35
-
-def bat?; end
-
-
- -
-

- - .bat_config_path::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-38
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 38
-
-def bat_config_path; end
-
-
- -
-

- - .bat_theme::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-41
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 41
-
-def bat_theme; end
-
-
- -
-

- - .bootsnap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-44
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 44
-
-def bootsnap?; end
-
-
- -
-

- - .bottle_domainString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 47
-
-def bottle_domain; end
-
-
- -
-

- - .brew_git_remoteString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 50
-
-def brew_git_remote; end
-
-
- -
-

- - .browser::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-53
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 53
-
-def browser; end
-
-
- -
-

- - .bundle_user_cache::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-56
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 56
-
-def bundle_user_cache; end
-
-
- -
-

- - .cacheString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 59
-
-def cache; end
-
-
- -
-

- - .cask_optsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-526
-527
-528
-
-
# File 'env_config.rb', line 526
-
-def cask_opts
-  Shellwords.shellsplit(ENV.fetch("HOMEBREW_CASK_OPTS", ""))
-end
-
-
- -
-

- - .cask_opts_binaries?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-531
-532
-533
-534
-535
-536
-537
-538
-
-
# File 'env_config.rb', line 531
-
-def cask_opts_binaries?
-  cask_opts.reverse_each do |opt|
-    return true if opt == "--binaries"
-    return false if opt == "--no-binaries"
-  end
-
-  true
-end
-
-
- -
-

- - .cask_opts_quarantine?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-541
-542
-543
-544
-545
-546
-547
-548
-
-
# File 'env_config.rb', line 541
-
-def cask_opts_quarantine?
-  cask_opts.reverse_each do |opt|
-    return true if opt == "--quarantine"
-    return false if opt == "--no-quarantine"
-  end
-
-  true
-end
-
-
- -
-

- - .cask_opts_require_sha?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-551
-552
-553
-
-
# File 'env_config.rb', line 551
-
-def cask_opts_require_sha?
-  cask_opts.include?("--require-sha")
-end
-
-
- -
-

- - .cleanup_max_age_daysInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-62
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 62
-
-def cleanup_max_age_days; end
-
-
- -
-

- - .cleanup_periodic_full_daysInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-65
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 65
-
-def cleanup_periodic_full_days; end
-
-
- -
-

- - .color?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-68
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 68
-
-def color?; end
-
-
- -
-

- - .core_git_remoteString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-71
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 71
-
-def core_git_remote; end
-
-
- -
-

- - .curl_pathString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-74
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 74
-
-def curl_path; end
-
-
- -
-

- - .curl_retriesInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 77
-
-def curl_retries; end
-
-
- -
-

- - .curl_verbose?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-80
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 80
-
-def curl_verbose?; end
-
-
- -
-

- - .curlrc::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-83
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 83
-
-def curlrc; end
-
-
- -
-

- - .debug?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-86
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 86
-
-def debug?; end
-
-
- -
-

- - .developer?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 89
-
-def developer?; end
-
-
- -
-

- - .disable_load_formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-92
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 92
-
-def disable_load_formula?; end
-
-
- -
-

- - .display::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-95
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 95
-
-def display; end
-
-
- -
-

- - .display_install_times?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-98
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 98
-
-def display_install_times?; end
-
-
- -
-

- - .docker_registry_basic_auth_token::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-101
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 101
-
-def docker_registry_basic_auth_token; end
-
-
- -
-

- - .docker_registry_token::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-104
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 104
-
-def docker_registry_token; end
-
-
- -
-

- - .editor::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-107
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 107
-
-def editor; end
-
-
- -
-

- - .env_method_name(env, hash) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - env - - - (Symbol) - - - -
  • - -
  • - - hash - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-478
-479
-480
-481
-482
-483
-484
-
-
# File 'env_config.rb', line 478
-
-def env_method_name(env, hash)
-  method_name = env.to_s
-                   .sub(/^HOMEBREW_/, "")
-                   .downcase
-  method_name = "#{method_name}?" if hash[:boolean]
-  method_name
-end
-
-
- -
-

- - .eval_all?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-110
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 110
-
-def eval_all?; end
-
-
- -
-

- - .fail_log_linesInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-113
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 113
-
-def fail_log_lines; end
-
-
- -
-

- - .forbidden_casks::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-116
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 116
-
-def forbidden_casks; end
-
-
- -
-

- - .forbidden_formulae::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-119
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 119
-
-def forbidden_formulae; end
-
-
- -
-

- - .forbidden_licenses::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-122
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 122
-
-def forbidden_licenses; end
-
-
- -
-

- - .forbidden_ownerString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 125
-
-def forbidden_owner; end
-
-
- -
-

- - .forbidden_owner_contact::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-128
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 128
-
-def forbidden_owner_contact; end
-
-
- -
-

- - .forbidden_taps::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-131
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 131
-
-def forbidden_taps; end
-
-
- -
-

- - .force_brewed_ca_certificates?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-134
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 134
-
-def force_brewed_ca_certificates?; end
-
-
- -
-

- - .force_brewed_curl?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-137
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 137
-
-def force_brewed_curl?; end
-
-
- -
-

- - .force_brewed_git?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-140
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 140
-
-def force_brewed_git?; end
-
-
- -
-

- - .force_vendor_ruby?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-143
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 143
-
-def force_vendor_ruby?; end
-
-
- -
-

- - .formula_build_network::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-146
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 146
-
-def formula_build_network; end
-
-
- -
-

- - .formula_postinstall_network::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-149
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 149
-
-def formula_postinstall_network; end
-
-
- -
-

- - .formula_test_network::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-152
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 152
-
-def formula_test_network; end
-
-
- -
-

- - .ftp_proxy::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-155
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 155
-
-def ftp_proxy; end
-
-
- -
-

- - .git_email::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-158
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 158
-
-def git_email; end
-
-
- -
-

- - .git_name::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-161
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 161
-
-def git_name; end
-
-
- -
-

- - .git_pathString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-164
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 164
-
-def git_path; end
-
-
- -
-

- - .github_api_token::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-167
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 167
-
-def github_api_token; end
-
-
- -
-

- - .github_packages_token::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-170
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 170
-
-def github_packages_token; end
-
-
- -
-

- - .github_packages_user::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-173
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 173
-
-def github_packages_user; end
-
-
- -
-

- - .http_proxy::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-176
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 176
-
-def http_proxy; end
-
-
- -
-

- - .https_proxy::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-179
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 179
-
-def https_proxy; end
-
-
- -
-

- - .install_badgeString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-182
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 182
-
-def install_badge; end
-
-
- -
-

- - .livecheck_watchlistString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-185
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 185
-
-def livecheck_watchlist; end
-
-
- -
-

- - .logsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-188
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 188
-
-def logs; end
-
-
- -
-

- - .make_jobsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Needs a custom implementation.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-515
-516
-517
-518
-519
-520
-521
-522
-523
-
-
# File 'env_config.rb', line 515
-
-def make_jobs
-  jobs = ENV["HOMEBREW_MAKE_JOBS"].to_i
-  return jobs.to_s if jobs.positive?
-
-  ENVS.fetch(:HOMEBREW_MAKE_JOBS)
-      .fetch(:default)
-      .call
-      .to_s
-end
-
-
- -
-

- - .no_analytics?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-191
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 191
-
-def no_analytics?; end
-
-
- -
-

- - .no_auto_update?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-194
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 194
-
-def no_auto_update?; end
-
-
- -
-

- - .no_autoremove?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-197
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 197
-
-def no_autoremove?; end
-
-
- -
-

- - .no_bootsnap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-200
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 200
-
-def no_bootsnap?; end
-
-
- -
-

- - .no_cleanup_formulae::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-203
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 203
-
-def no_cleanup_formulae; end
-
-
- -
-

- - .no_color?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-206
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 206
-
-def no_color?; end
-
-
- -
-

- - .no_emoji?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-209
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 209
-
-def no_emoji?; end
-
-
- -
-

- - .no_env_hints?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-212
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 212
-
-def no_env_hints?; end
-
-
- -
-

- - .no_github_api?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-215
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 215
-
-def no_github_api?; end
-
-
- -
-

- - .no_insecure_redirect?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-218
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 218
-
-def no_insecure_redirect?; end
-
-
- -
-

- - .no_install_cleanup?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-221
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 221
-
-def no_install_cleanup?; end
-
-
- -
-

- - .no_install_from_api?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-224
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 224
-
-def no_install_from_api?; end
-
-
- -
-

- - .no_install_upgrade?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-227
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 227
-
-def no_install_upgrade?; end
-
-
- -
-

- - .no_installed_dependents_check?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-230
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 230
-
-def no_installed_dependents_check?; end
-
-
- -
-

- - .no_proxy::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-233
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 233
-
-def no_proxy; end
-
-
- -
-

- - .no_update_report_new?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-236
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 236
-
-def no_update_report_new?; end
-
-
- -
-

- - .pip_index_url::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-239
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 239
-
-def pip_index_url; end
-
-
- -
-

- - .pry?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-242
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 242
-
-def pry?; end
-
-
- -
-

- - .simulate_macos_on_linux?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-245
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 245
-
-def simulate_macos_on_linux?; end
-
-
- -
-

- - .skip_or_later_bottles?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-248
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 248
-
-def skip_or_later_bottles?; end
-
-
- -
-

- - .sorbet_runtime?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-251
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 251
-
-def sorbet_runtime?; end
-
-
- -
-

- - .ssh_config_path::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-254
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 254
-
-def ssh_config_path; end
-
-
- -
-

- - .sudo_askpass::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-257
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 257
-
-def sudo_askpass; end
-
-
- -
-

- - .sudo_through_sudo_user?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-260
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 260
-
-def sudo_through_sudo_user?; end
-
-
- -
-

- - .svn::String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-263
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 263
-
-def svn; end
-
-
- -
-

- - .system_env_takes_priority?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-266
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 266
-
-def system_env_takes_priority?; end
-
-
- -
-

- - .tempString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-269
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 269
-
-def temp; end
-
-
- -
-

- - .update_to_tag?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-272
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 272
-
-def update_to_tag?; end
-
-
- -
-

- - .upgrade_greedy?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-275
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 275
-
-def upgrade_greedy?; end
-
-
- -
-

- - .verbose?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-278
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 278
-
-def verbose?; end
-
-
- -
-

- - .verbose_using_dots?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-281
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 281
-
-def verbose_using_dots?; end
-
-
- -
-

- - .verify_attestations?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-284
-
-
# File 'sorbet/rbi/dsl/homebrew/env_config.rbi', line 284
-
-def verify_attestations?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Fetch.html b/docs/Homebrew/Fetch.html deleted file mode 100644 index 73936a3ee..000000000 --- a/docs/Homebrew/Fetch.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - Module: Homebrew::Fetch - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Fetch - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Cmd::Cache, Cmd::FetchCmd
-
- - - -
-
Defined in:
-
fetch.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #fetch_bottle?(formula, force_bottle:, bottle_tag:, build_from_source_formulae:, os:, arch:) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - force_bottle - - - (Boolean) - - - -
  • - -
  • - - bottle_tag - - - (Symbol, nil) - - - -
  • - -
  • - - build_from_source_formulae - - - (Array<String>) - - - -
  • - -
  • - - os - - - (Symbol, nil) - - - -
  • - -
  • - - arch - - - (Symbol, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'fetch.rb', line 16
-
-def fetch_bottle?(formula, force_bottle:, bottle_tag:, build_from_source_formulae:, os:, arch:)
-  bottle = formula.bottle
-
-  return true if force_bottle && bottle.present?
-  if os.present?
-    return true
-  elsif ENV["HOMEBREW_TEST_GENERIC_OS"].present?
-    # `:generic` bottles don't exist and `--os` flag is not specified.
-    return false
-  end
-  return true if arch.present?
-  return true if bottle_tag.present? && formula.bottled?(bottle_tag)
-
-  bottle.present? &&
-    formula.pour_bottle? &&
-    build_from_source_formulae.exclude?(formula.full_name) &&
-    bottle.compatible_locations?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/FormulaAuditor.html b/docs/Homebrew/FormulaAuditor.html deleted file mode 100644 index 496f3149f..000000000 --- a/docs/Homebrew/FormulaAuditor.html +++ /dev/null @@ -1,4431 +0,0 @@ - - - - - - - Class: Homebrew::FormulaAuditor - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::FormulaAuditor - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
FormulaCellarChecks, Utils::Curl
-
- - - - - - -
-
Defined in:
-
formula_auditor.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Auditor for checking common violations in Formulae.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PERMITTED_LICENSE_MISMATCHES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  "AGPL-3.0" => ["AGPL-3.0-only", "AGPL-3.0-or-later"],
-  "GPL-2.0"  => ["GPL-2.0-only",  "GPL-2.0-or-later"],
-  "GPL-3.0"  => ["GPL-3.0-only",  "GPL-3.0-or-later"],
-  "LGPL-2.1" => ["LGPL-2.1-only", "LGPL-2.1-or-later"],
-  "LGPL-3.0" => ["LGPL-3.0-only", "LGPL-3.0-or-later"],
-}.freeze
- -
RELICENSED_FORMULAE_VERSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  "boundary"           => "0.14",
-  "consul"             => "1.17",
-  "elasticsearch"      => "7.11",
-  "kibana"             => "7.11",
-  "nomad"              => "1.7",
-  "packer"             => "1.10",
-  "redis"              => "7.4",
-  "terraform"          => "1.6",
-  "vagrant"            => "2.4",
-  "vagrant-completion" => "2.4",
-  "vault"              => "1.15",
-  "waypoint"           => "0.12",
-}.freeze
- -
- - - - - - -

Constants included - from FormulaCellarChecks

-

FormulaCellarChecks::VALID_LIBRARY_EXTENSIONS

- - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from FormulaCellarChecks

-

#audit_installed, #check_binary_arches, #check_cpuid_instruction, #check_easy_install_pth, #check_elisp_dirname, #check_elisp_root, #check_env_path, #check_flat_namespace, #check_generic_executables, #check_infopages, #check_jars, #check_linkage, #check_manpages, #check_non_executables, #check_non_libraries, #check_openssl_links, #check_plist, #check_python_framework_links, #check_python_packages, #check_python_symlinks, #check_service_command, #check_shadowed_headers, #check_shim_references, #valid_library_extension?

- -
-

Constructor Details

- -
-

- - #initialize(formula, options = {}) ⇒ FormulaAuditor - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of FormulaAuditor.

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'formula_auditor.rb', line 17
-
-def initialize(formula, options = {})
-  @formula = formula
-  @versioned_formula = formula.versioned_formula?
-  @new_formula_inclusive = options[:new_formula]
-  @new_formula = options[:new_formula] && !@versioned_formula
-  @strict = options[:strict]
-  @online = options[:online]
-  @git = options[:git]
-  @display_cop_names = options[:display_cop_names]
-  @only = options[:only]
-  @except = options[:except]
-  # Accept precomputed style offense results, for efficiency
-  @style_offenses = options[:style_offenses]
-  # Allow the formula tap to be set as homebrew/core, for testing purposes
-  @core_tap = formula.tap&.core_tap? || options[:core_tap]
-  @problems = []
-  @new_formula_problems = []
-  @text = formula.path.open("rb", &:read)
-  @specs = %w[stable head].filter_map { |s| formula.send(s) }
-  @spdx_license_data = options[:spdx_license_data]
-  @spdx_exception_data = options[:spdx_exception_data]
-  @tap_audit = options[:tap_audit]
-  @previous_committed = {}
-  @newest_committed = {}
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #formulaObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'formula_auditor.rb', line 15
-
-def formula
-  @formula
-end
-
-
- - - -
-

- - #new_formula_problemsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'formula_auditor.rb', line 15
-
-def new_formula_problems
-  @new_formula_problems
-end
-
-
- - - -
-

- - #problemsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'formula_auditor.rb', line 15
-
-def problems
-  @problems
-end
-
-
- - - -
-

- - #textObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'formula_auditor.rb', line 15
-
-def text
-  @text
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .aliasesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-137
-138
-139
-140
-
-
# File 'formula_auditor.rb', line 137
-
-def self.aliases
-  # core aliases + tap alias names + tap alias full name
-  @aliases ||= Formula.aliases + Formula.tap_aliases
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #auditObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-947
-948
-949
-950
-951
-952
-953
-954
-955
-956
-957
-958
-
-
# File 'formula_auditor.rb', line 947
-
-def audit
-  only_audits = @only
-  except_audits = @except
-
-  methods.map(&:to_s).grep(/^audit_/).each do |audit_method_name|
-    name = audit_method_name.delete_prefix("audit_")
-    next if only_audits&.exclude?(name)
-    next if except_audits&.include?(name)
-
-    send(audit_method_name)
-  end
-end
-
-
- -
-

- - #audit_bitbucket_repositoryObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-661
-662
-663
-664
-665
-666
-667
-668
-669
-
-
# File 'formula_auditor.rb', line 661
-
-def audit_bitbucket_repository
-  user, repo = get_repo_data(%r{https?://bitbucket\.org/([^/]+)/([^/]+)/?.*}) if @new_formula
-  return if user.blank?
-
-  warning = SharedAudits.bitbucket(user, repo)
-  return if warning.nil?
-
-  new_formula_problem warning
-end
-
-
- -
-

- - #audit_bottle_specObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-558
-559
-560
-561
-562
-563
-564
-565
-566
-
-
# File 'formula_auditor.rb', line 558
-
-def audit_bottle_spec
-  # special case: new versioned formulae should be audited
-  return unless @new_formula_inclusive
-  return unless @core_tap
-
-  return unless formula.bottle_defined?
-
-  new_formula_problem "New formulae in homebrew/core should not have a `bottle do` block"
-end
-
-
- -
-

- - #audit_conflictsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-
-
# File 'formula_auditor.rb', line 415
-
-def audit_conflicts
-  tap = formula.tap
-  formula.conflicts.each do |conflict|
-    conflicting_formula = Formulary.factory(conflict.name)
-    next if tap != conflicting_formula.tap
-
-    problem "Formula should not conflict with itself" if formula == conflicting_formula
-
-    if T.must(tap).formula_renames.key?(conflict.name) || T.must(tap).aliases.include?(conflict.name)
-      problem "Formula conflict should be declared using " \
-              "canonical name (#{conflicting_formula.name}) instead of #{conflict.name}"
-    end
-
-    reverse_conflict_found = T.let(false, T::Boolean)
-    conflicting_formula.conflicts.each do |reverse_conflict|
-      reverse_conflict_formula = Formulary.factory(reverse_conflict.name)
-      if T.must(tap).formula_renames.key?(reverse_conflict.name) ||
-         T.must(tap).aliases.include?(reverse_conflict.name)
-        problem "Formula #{conflicting_formula.name} conflict should be declared using " \
-                "canonical name (#{reverse_conflict_formula.name}) instead of #{reverse_conflict.name}"
-      end
-
-      reverse_conflict_found ||= reverse_conflict_formula == formula
-    end
-    unless reverse_conflict_found
-      problem "Formula #{conflicting_formula.name} should also have a conflict declared with #{formula.name}"
-    end
-  rescue TapFormulaUnavailableError
-    # Don't complain about missing cross-tap conflicts.
-    next
-  rescue FormulaUnavailableError
-    problem "Can't find conflicting formula #{conflict.name.inspect}."
-  rescue TapFormulaAmbiguityError
-    problem "Ambiguous conflicting formula #{conflict.name.inspect}."
-  end
-end
-
-
- -
-

- - #audit_depsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-
-
# File 'formula_auditor.rb', line 258
-
-def audit_deps
-  @specs.each do |spec|
-    # Check for things we don't like to depend on.
-    # We allow non-Homebrew installs whenever possible.
-    spec.declared_deps.each do |dep|
-      begin
-        dep_f = dep.to_formula
-      rescue TapFormulaUnavailableError
-        # Don't complain about missing cross-tap dependencies
-        next
-      rescue FormulaUnavailableError
-        problem "Can't find dependency '#{dep.name}'."
-        next
-      rescue TapFormulaAmbiguityError
-        problem "Ambiguous dependency '#{dep.name}'."
-        next
-      end
-
-      if dep_f.oldnames.include?(dep.name.split("/").last)
-        problem "Dependency '#{dep.name}' was renamed; use new name '#{dep_f.name}'."
-      end
-
-      if @core_tap &&
-         @new_formula &&
-         !dep.uses_from_macos? &&
-         dep_f.keg_only? &&
-         dep_f.keg_only_reason.provided_by_macos? &&
-         dep_f.keg_only_reason.applicable? &&
-         formula.requirements.none?(LinuxRequirement) &&
-         !formula.tap&.audit_exception(:provided_by_macos_depends_on_allowlist, dep.name)
-        new_formula_problem(
-          "Dependency '#{dep.name}' is provided by macOS; " \
-          "please replace 'depends_on' with 'uses_from_macos'.",
-        )
-      end
-
-      dep.options.each do |opt|
-        next if @core_tap
-        next if dep_f.option_defined?(opt)
-        next if dep_f.requirements.find do |r|
-          if r.recommended?
-            opt.name == "with-#{r.name}"
-          elsif r.optional?
-            opt.name == "without-#{r.name}"
-          end
-        end
-
-        problem "Dependency '#{dep}' does not define option #{opt.name.inspect}"
-      end
-
-      problem "Don't use 'git' as a dependency (it's always available)" if @new_formula && dep.name == "git"
-
-      problem "Dependency '#{dep.name}' is marked as :run. Remove :run; it is a no-op." if dep.tags.include?(:run)
-
-      next unless @core_tap
-
-      if dep_f.tap.nil?
-        problem <<~EOS
-          Dependency '#{dep.name}' does not exist in any tap.
-        EOS
-      elsif !dep_f.tap.core_tap?
-        problem <<~EOS
-          Dependency '#{dep.name}' is not in homebrew/core. Formulae in homebrew/core
-          should not have dependencies in external taps.
-        EOS
-      end
-
-      if dep_f.deprecated? && !formula.deprecated? && !formula.disabled?
-        problem <<~EOS
-          Dependency '#{dep.name}' is deprecated but has un-deprecated dependents. Either
-          un-deprecate '#{dep.name}' or deprecate it and all of its dependents.
-        EOS
-      end
-
-      if dep_f.disabled? && !formula.disabled?
-        problem <<~EOS
-          Dependency '#{dep.name}' is disabled but has un-disabled dependents. Either
-          un-disable '#{dep.name}' or disable it and all of its dependents.
-        EOS
-      end
-
-      # we want to allow uses_from_macos for aliases but not bare dependencies
-      if self.class.aliases.include?(dep.name) && !dep.uses_from_macos?
-        problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'."
-      end
-
-      if dep.tags.include?(:recommended) || dep.tags.include?(:optional)
-        problem "Formulae in homebrew/core should not have optional or recommended dependencies"
-      end
-    end
-
-    next unless @core_tap
-
-    if spec.requirements.map(&:recommended?).any? || spec.requirements.map(&:optional?).any?
-      problem "Formulae in homebrew/core should not have optional or recommended requirements"
-    end
-  end
-
-  return unless @core_tap
-  return if formula.tap&.audit_exception :versioned_dependencies_conflicts_allowlist, formula.name
-
-  # The number of conflicts on Linux is absurd.
-  # TODO: remove this and check these there too.
-  return if Homebrew::SimulateSystem.simulating_or_running_on_linux?
-
-  # Skip the versioned dependencies conflict audit for *-staging branches.
-  # This will allow us to migrate dependents of formulae like Python or OpenSSL
-  # gradually over separate PRs which target a *-staging branch. See:
-  #   https://github.com/Homebrew/homebrew-core/pull/134260
-  ignore_formula_conflict, staging_formula =
-    if @tap_audit && (github_event_path = ENV.fetch("GITHUB_EVENT_PATH", nil)).present?
-      event_payload = JSON.parse(File.read(github_event_path))
-      base_info = event_payload.dig("pull_request", "base").to_h # handle `nil`
-
-      # We need to read the head ref from `GITHUB_EVENT_PATH` because
-      # `git branch --show-current` returns `master` on PR branches.
-      staging_branch = base_info["ref"]&.end_with?("-staging")
-      homebrew_owned_repo = base_info.dig("repo", "owner", "login") == "Homebrew"
-      homebrew_core_pr = base_info.dig("repo", "name") == "homebrew-core"
-      # Support staging branches named `formula-staging` or `formula@version-staging`.
-      base_formula = base_info["ref"]&.split(/-|@/, 2)&.first
-
-      [staging_branch && homebrew_owned_repo && homebrew_core_pr, base_formula]
-    end
-
-  recursive_runtime_formulae = formula.runtime_formula_dependencies(undeclared: false)
-  version_hash = {}
-  version_conflicts = Set.new
-  recursive_runtime_formulae.each do |f|
-    name = f.name
-    unversioned_name, = name.split("@")
-    next if ignore_formula_conflict && unversioned_name == staging_formula
-    # Allow use of the full versioned name (e.g. `python@3.99`) or an unversioned alias (`python`).
-    next if formula.tap&.audit_exception :versioned_formula_dependent_conflicts_allowlist, name
-    next if formula.tap&.audit_exception :versioned_formula_dependent_conflicts_allowlist, unversioned_name
-
-    version_hash[unversioned_name] ||= Set.new
-    version_hash[unversioned_name] << name
-    next if version_hash[unversioned_name].length < 2
-
-    version_conflicts += version_hash[unversioned_name]
-  end
-
-  return if version_conflicts.empty?
-
-  return if formula.disabled?
-
-  return if formula.deprecated? &&
-            formula.deprecation_reason != DeprecateDisable::FORMULA_DEPRECATE_DISABLE_REASONS[:versioned_formula]
-
-  problem <<~EOS
-    #{formula.full_name} contains conflicting version recursive dependencies:
-      #{version_conflicts.to_a.join ", "}
-    View these with `brew deps --tree #{formula.full_name}`.
-  EOS
-end
-
-
- -
-

- - #audit_eolObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-568
-569
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-592
-593
-
-
# File 'formula_auditor.rb', line 568
-
-def audit_eol
-  return unless @online
-
-  return if formula.deprecated? || formula.disabled?
-
-  name = if formula.versioned_formula?
-    formula.name.split("@").first
-  else
-    formula.name
-  end
-
-  return if formula.tap&.audit_exception :eol_date_blocklist, name
-
-   = SharedAudits.eol_data(name, formula.version.major)
-   ||= SharedAudits.eol_data(name, formula.version.major_minor)
-
-  return if .blank? || ["eol"] == false
-
-  see_url = "see #{Formatter.url("https://endoflife.date/#{name}")}"
-  if ["eol"] == true
-    problem "Product is EOL, #{see_url}"
-    return
-  end
-
-  problem "Product is EOL since #{["eol"]}, #{see_url}" if Date.parse(["eol"]) <= Date.today
-end
-
-
- -
-

- - #audit_fileObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-
-
# File 'formula_auditor.rb', line 54
-
-def audit_file
-  if formula.core_formula? && @versioned_formula
-    unversioned_name = formula.name.gsub(/@.*$/, "")
-
-    # ignore when an unversioned formula doesn't exist after an explicit rename
-    return if formula.tap.formula_renames.key?(unversioned_name)
-
-    # build this ourselves as we want e.g. homebrew/core to be present
-    full_name = "#{formula.tap}/#{unversioned_name}"
-
-    unversioned_formula = begin
-      Formulary.factory(full_name).path
-    rescue FormulaUnavailableError, TapFormulaAmbiguityError
-      Pathname.new formula.path.to_s.gsub(/@.*\.rb$/, ".rb")
-    end
-    unless unversioned_formula.exist?
-      unversioned_name = unversioned_formula.basename(".rb")
-      problem "#{formula} is versioned but no #{unversioned_name} formula exists"
-    end
-  elsif formula.stable? &&
-        !@versioned_formula &&
-        (versioned_formulae = formula.versioned_formulae - [formula]) &&
-        versioned_formulae.present?
-    versioned_aliases, unversioned_aliases = formula.aliases.partition { |a| /.@\d/.match?(a) }
-    _, last_alias_version = versioned_formulae.map(&:name).last.split("@")
-
-    alias_name_major = "#{formula.name}@#{formula.version.major}"
-    alias_name_major_minor = "#{formula.name}@#{formula.version.major_minor}"
-    alias_name = if last_alias_version.split(".").length == 1
-      alias_name_major
-    else
-      alias_name_major_minor
-    end
-    valid_main_alias_names = [alias_name_major, alias_name_major_minor].uniq
-
-    # Also accept versioned aliases with names of other aliases, but do not require them.
-    valid_other_alias_names = unversioned_aliases.flat_map do |name|
-      %W[
-        #{name}@#{formula.version.major}
-        #{name}@#{formula.version.major_minor}
-      ].uniq
-    end
-
-    unless @core_tap
-      [versioned_aliases, valid_main_alias_names, valid_other_alias_names].each do |array|
-        array.map! { |a| "#{formula.tap}/#{a}" }
-      end
-    end
-
-    valid_versioned_aliases = versioned_aliases & valid_main_alias_names
-    invalid_versioned_aliases = versioned_aliases - valid_main_alias_names - valid_other_alias_names
-
-    latest_versioned_formula = versioned_formulae.map(&:name).first
-
-    if valid_versioned_aliases.empty? && alias_name != latest_versioned_formula
-      if formula.tap
-        problem <<~EOS
-          Formula has other versions so create a versioned alias:
-            cd #{formula.tap.alias_dir}
-            ln -s #{formula.path.to_s.gsub(formula.tap.path, "..")} #{alias_name}
-        EOS
-      else
-        problem "Formula has other versions so create an alias named #{alias_name}."
-      end
-    end
-
-    if invalid_versioned_aliases.present?
-      problem <<~EOS
-        Formula has invalid versioned aliases:
-          #{invalid_versioned_aliases.join("\n  ")}
-      EOS
-    end
-  end
-
-  return if !formula.core_formula? || formula.path == formula.tap.new_formula_path(formula.name)
-
-  problem <<~EOS
-    Formula is in wrong path:
-      Expected: #{formula.tap.new_formula_path(formula.name)}
-        Actual: #{formula.path}
-  EOS
-end
-
-
- -
-

- - #audit_formula_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
-
# File 'formula_auditor.rb', line 163
-
-def audit_formula_name
-  name = formula.name
-
-  problem "Formula name '#{name}' must not contain uppercase letters." if name != name.downcase
-
-  return unless @strict
-  return unless @core_tap
-
-  problem "'#{name}' is not allowed in homebrew/core." if MissingFormula.disallowed_reason(name)
-
-  if Formula.aliases.include? name
-    problem "Formula name conflicts with existing aliases in homebrew/core."
-    return
-  end
-
-  if (oldname = CoreTap.instance.formula_renames[name])
-    problem "'#{name}' is reserved as the old name of #{oldname} in homebrew/core."
-    return
-  end
-
-  return if formula.core_formula?
-  return unless Formula.core_names.include?(name)
-
-  problem "Formula name conflicts with existing core formula."
-end
-
-
- -
-

- - #audit_gcc_dependencyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-
-
# File 'formula_auditor.rb', line 452
-
-def audit_gcc_dependency
-  return unless @core_tap
-  return unless Homebrew::SimulateSystem.simulating_or_running_on_linux?
-  return unless linux_only_gcc_dep?(formula)
-  # https://github.com/Homebrew/homebrew-core/pull/171634
-  # https://github.com/nghttp2/nghttp2/issues/2194
-  return if formula.tap&.audit_exception(:linux_only_gcc_dependency_allowlist, formula.name)
-
-  problem "Formulae in homebrew/core should not have a Linux-only dependency on GCC."
-end
-
-
- -
-

- - #audit_github_repositoryObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-640
-641
-642
-643
-644
-645
-646
-647
-648
-649
-
-
# File 'formula_auditor.rb', line 640
-
-def audit_github_repository
-  user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}) if @new_formula
-
-  return if user.blank?
-
-  warning = SharedAudits.github(user, repo)
-  return if warning.nil?
-
-  new_formula_problem warning
-end
-
-
- -
-

- - #audit_github_repository_archivedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-
-
# File 'formula_auditor.rb', line 616
-
-def audit_github_repository_archived
-  return if formula.deprecated? || formula.disabled?
-
-  user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}) if @online
-  return if user.blank?
-
-   = SharedAudits.github_repo_data(user, repo)
-  return if .nil?
-
-  problem "GitHub repo is archived" if ["archived"]
-end
-
-
- -
-

- - #audit_gitlab_repositoryObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-651
-652
-653
-654
-655
-656
-657
-658
-659
-
-
# File 'formula_auditor.rb', line 651
-
-def audit_gitlab_repository
-  user, repo = get_repo_data(%r{https?://gitlab\.com/([^/]+)/([^/]+)/?.*}) if @new_formula
-  return if user.blank?
-
-  warning = SharedAudits.gitlab(user, repo)
-  return if warning.nil?
-
-  new_formula_problem warning
-end
-
-
- -
-

- - #audit_gitlab_repository_archivedObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-638
-
-
# File 'formula_auditor.rb', line 628
-
-def audit_gitlab_repository_archived
-  return if formula.deprecated? || formula.disabled?
-
-  user, repo = get_repo_data(%r{https?://gitlab\.com/([^/]+)/([^/]+)/?.*}) if @online
-  return if user.blank?
-
-   = SharedAudits.gitlab_repo_data(user, repo)
-  return if .nil?
-
-  problem "GitLab repo is archived" if ["archived"]
-end
-
-
- -
-

- - #audit_glibcObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-
-
# File 'formula_auditor.rb', line 478
-
-def audit_glibc
-  return unless @core_tap
-  return if formula.name != "glibc"
-  # Also allow LINUX_GLIBC_NEXT_CI_VERSION for when we're upgrading.
-  return if [OS::LINUX_GLIBC_CI_VERSION, OS::LINUX_GLIBC_NEXT_CI_VERSION].include?(formula.version.to_s)
-
-  problem "The glibc version must be #{OS::LINUX_GLIBC_CI_VERSION}, as needed by our CI on Linux. " \
-          "The glibc formula is for users who have a system glibc with a lower version, " \
-          "which allows them to use our Linux bottles, which were compiled against system glibc on CI."
-end
-
-
- -
-

- - #audit_homepageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-529
-530
-531
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-
-
# File 'formula_auditor.rb', line 529
-
-def audit_homepage
-  homepage = formula.homepage
-
-  return if homepage.blank?
-
-  return unless @online
-
-  return if formula.tap&.audit_exception :cert_error_allowlist, formula.name, homepage
-
-  return unless DevelopmentTools.curl_handles_most_https_certificates?
-
-  use_homebrew_curl = [:stable, :head].any? do |spec_name|
-    next false unless (spec = formula.send(spec_name))
-
-    spec.using == :homebrew_curl
-  end
-
-  if (http_content_problem = curl_check_http_content(
-    homepage,
-    SharedAudits::URL_TYPE_HOMEPAGE,
-    user_agents:       [:browser, :default],
-    check_content:     true,
-    strict:            @strict,
-    use_homebrew_curl:,
-  ))
-    problem http_content_problem
-  end
-end
-
-
- -
-

- - #audit_licenseObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-
-
# File 'formula_auditor.rb', line 197
-
-def audit_license
-  if formula.license.present?
-    licenses, exceptions = SPDX.parse_license_expression formula.license
-
-    sspl_licensed = licenses.any? { |license| license.to_s.start_with?("SSPL") }
-    if sspl_licensed && @core_tap
-      problem <<~EOS
-        Formula #{formula.name} is SSPL-licensed. Software under the SSPL must not be packaged in homebrew/core.
-      EOS
-    end
-
-    non_standard_licenses = licenses.reject { |license| SPDX.valid_license? license }
-    if non_standard_licenses.present?
-      problem <<~EOS
-        Formula #{formula.name} contains non-standard SPDX licenses: #{non_standard_licenses}.
-        For a list of valid licenses check: #{Formatter.url("https://spdx.org/licenses/")}
-      EOS
-    end
-
-    if @strict
-      deprecated_licenses = licenses.select do |license|
-        SPDX.deprecated_license? license
-      end
-      if deprecated_licenses.present?
-        problem <<~EOS
-          Formula #{formula.name} contains deprecated SPDX licenses: #{deprecated_licenses}.
-          You may need to add `-only` or `-or-later` for GNU licenses (e.g. `GPL`, `LGPL`, `AGPL`, `GFDL`).
-          For a list of valid licenses check: #{Formatter.url("https://spdx.org/licenses/")}
-        EOS
-      end
-    end
-
-    invalid_exceptions = exceptions.reject { |exception| SPDX.valid_license_exception? exception }
-    if invalid_exceptions.present?
-      problem <<~EOS
-        Formula #{formula.name} contains invalid or deprecated SPDX license exceptions: #{invalid_exceptions}.
-        For a list of valid license exceptions check:
-          #{Formatter.url("https://spdx.org/licenses/exceptions-index.html")}
-      EOS
-    end
-
-    return unless @online
-
-    user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*})
-    return if user.blank?
-
-    tag = SharedAudits.github_tag_from_url(formula.stable.url)
-    tag ||= formula.stable.specs[:tag]
-    github_license = GitHub.get_repo_license(user, repo, ref: tag)
-    return unless github_license
-    return if (licenses + ["NOASSERTION"]).include?(github_license)
-    return if PERMITTED_LICENSE_MISMATCHES[github_license]&.any? { |license| licenses.include? license }
-    return if formula.tap&.audit_exception :permitted_formula_license_mismatches, formula.name
-
-    problem "Formula license #{licenses} does not match GitHub license #{Array(github_license)}."
-
-  elsif @new_formula && @core_tap
-    problem "Formulae in homebrew/core must specify a license."
-  end
-end
-
-
- -
-

- - #audit_postgresqlObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-
-
# File 'formula_auditor.rb', line 463
-
-def audit_postgresql
-  return if formula.name != "postgresql"
-  return unless @core_tap
-
-  major_version = formula.version.major.to_i
-  previous_major_version = major_version - 1
-  previous_formula_name = "postgresql@#{previous_major_version}"
-  begin
-    Formula[previous_formula_name]
-  rescue FormulaUnavailableError
-    problem "Versioned #{previous_formula_name} in homebrew/core must be created for " \
-            "`brew postgresql-upgrade-database` and `pg_upgrade` to work."
-  end
-end
-
-
- -
-

- - #audit_prefix_has_contentsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-928
-929
-930
-931
-932
-933
-934
-935
-936
-937
-
-
# File 'formula_auditor.rb', line 928
-
-def audit_prefix_has_contents
-  return unless formula.prefix.directory?
-  return unless Keg.new(formula.prefix).empty_installation?
-
-  problem <<~EOS
-    The installation seems to be empty. Please ensure the prefix
-    is set correctly and expected files are installed.
-    The prefix configure/make argument may be case-sensitive.
-  EOS
-end
-
-
- -
-

- - #audit_relicensed_formulaeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-
-
# File 'formula_auditor.rb', line 504
-
-def audit_relicensed_formulae
-  return unless RELICENSED_FORMULAE_VERSIONS.key? formula.name
-  return unless @core_tap
-
-  relicensed_version = Version.new(RELICENSED_FORMULAE_VERSIONS[formula.name])
-  return if formula.version < relicensed_version
-
-  problem "#{formula.name} was relicensed to a non-open-source license from version #{relicensed_version}. " \
-          "It must not be upgraded to version #{relicensed_version} or newer."
-end
-
-
- -
-

- - #audit_reverse_migrationObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-915
-916
-917
-918
-919
-920
-921
-922
-923
-924
-925
-926
-
-
# File 'formula_auditor.rb', line 915
-
-def audit_reverse_migration
-  # Only enforce for new formula being re-added to core
-  return unless @strict
-  return unless @core_tap
-  return unless formula.tap.tap_migrations.key?(formula.name)
-
-  problem <<~EOS
-    #{formula.name} seems to be listed in tap_migrations.json!
-    Please remove #{formula.name} from present tap & tap_migrations.json
-    before submitting it to Homebrew/homebrew-#{formula.tap.repo}.
-  EOS
-end
-
-
- -
-

- - #audit_revisionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-823
-824
-825
-826
-827
-828
-829
-830
-831
-832
-833
-834
-835
-836
-837
-838
-839
-840
-841
-842
-843
-844
-845
-846
-847
-848
-849
-850
-
-
# File 'formula_auditor.rb', line 823
-
-def audit_revision
-  new_formula_problem("New formulae should not define a revision.") if @new_formula && !formula.revision.zero?
-
-  return unless @git
-  return unless formula.tap # skip formula not from core or any taps
-  return unless formula.tap.git? # git log is required
-  return if formula.stable.blank?
-
-  current_version = formula.stable.version
-  current_revision = formula.revision
-
-  previous_committed, newest_committed = committed_version_info
-
-  if (previous_committed[:version] != newest_committed[:version] ||
-     current_version != newest_committed[:version]) &&
-     !current_revision.zero? &&
-     current_revision == newest_committed[:revision] &&
-     current_revision == previous_committed[:revision]
-    problem "'revision #{current_revision}' should be removed"
-  elsif current_version == previous_committed[:version] &&
-        !previous_committed[:revision].nil? &&
-        current_revision < previous_committed[:revision]
-    problem "revision should not decrease (from #{previous_committed[:revision]} to #{current_revision})"
-  elsif newest_committed[:revision] &&
-        current_revision > (newest_committed[:revision] + 1)
-    problem "revisions should only increment by 1"
-  end
-end
-
-
- -
-

- - #audit_specsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-700
-701
-702
-703
-704
-705
-706
-707
-708
-709
-710
-711
-712
-713
-714
-715
-716
-717
-718
-719
-720
-721
-722
-723
-724
-725
-726
-727
-728
-729
-730
-731
-732
-733
-734
-735
-736
-737
-738
-739
-740
-741
-742
-743
-744
-745
-746
-747
-748
-749
-750
-751
-752
-753
-754
-755
-756
-757
-758
-759
-760
-761
-762
-763
-764
-765
-766
-767
-768
-769
-770
-771
-772
-773
-774
-775
-776
-777
-778
-779
-780
-781
-782
-783
-784
-785
-786
-787
-788
-789
-790
-791
-792
-793
-794
-795
-796
-797
-798
-799
-800
-801
-802
-803
-
-
# File 'formula_auditor.rb', line 685
-
-def audit_specs
-  problem "Head-only (no stable download)" if head_only?(formula)
-
-  %w[Stable HEAD].each do |name|
-    spec_name = name.downcase.to_sym
-    next unless (spec = formula.send(spec_name))
-
-    except = @except.to_a
-    if spec_name == :head &&
-       formula.tap&.audit_exception(:head_non_default_branch_allowlist, formula.name, spec.specs[:branch])
-      except << "head_branch"
-    end
-
-    ra = ResourceAuditor.new(
-      spec, spec_name,
-      online: @online, strict: @strict, only: @only, except:,
-      use_homebrew_curl: spec.using == :homebrew_curl
-    ).audit
-    ra.problems.each do |message|
-      problem "#{name}: #{message}"
-    end
-
-    spec.resources.each_value do |resource|
-      problem "Resource name should be different from the formula name" if resource.name == formula.name
-
-      ra = ResourceAuditor.new(
-        resource, spec_name,
-        online: @online, strict: @strict, only: @only, except: @except,
-        use_homebrew_curl: resource.using == :homebrew_curl
-      ).audit
-      ra.problems.each do |message|
-        problem "#{name} resource #{resource.name.inspect}: #{message}"
-      end
-    end
-
-    next if spec.patches.empty?
-    next if !@new_formula || !@core_tap
-
-    new_formula_problem(
-      "Formulae should not require patches to build. " \
-      "Patches should be submitted and accepted upstream first.",
-    )
-  end
-
-  return unless @core_tap
-
-  if formula.head && @versioned_formula &&
-     !formula.tap&.audit_exception(:versioned_head_spec_allowlist, formula.name)
-    problem "Versioned formulae should not have a `HEAD` spec"
-  end
-
-  stable = formula.stable
-  return unless stable
-  return unless stable.url
-
-  version = stable.version
-  problem "Stable: version (#{version}) is set to a string without a digit" unless /\d/.match?(version.to_s)
-
-  stable_version_string = version.to_s
-  if stable_version_string.start_with?("HEAD")
-    problem "Stable: non-HEAD version name (#{stable_version_string}) should not begin with HEAD"
-  end
-
-  stable_url_version = Version.parse(stable.url)
-  stable_url_minor_version = stable_url_version.minor.to_i
-
-  formula_suffix = stable.version.patch.to_i
-  throttled_rate = formula.livecheck.throttle
-  if throttled_rate && formula_suffix.modulo(throttled_rate).nonzero?
-    problem "should only be updated every #{throttled_rate} releases on multiples of #{throttled_rate}"
-  end
-
-  case (url = stable.url)
-  when /[\d._-](alpha|beta|rc\d)/
-    matched = Regexp.last_match(1)
-    version_prefix = stable_version_string.sub(/\d+$/, "")
-    return if formula.tap&.audit_exception :unstable_allowlist, formula.name, version_prefix
-    return if formula.tap&.audit_exception :unstable_devel_allowlist, formula.name, version_prefix
-
-    problem "Stable version URLs should not contain #{matched}"
-  when %r{download\.gnome\.org/sources}, %r{ftp\.gnome\.org/pub/GNOME/sources}i
-    version_prefix = stable.version.major_minor
-    return if formula.tap&.audit_exception :gnome_devel_allowlist, formula.name, version_prefix
-    return if stable_url_version < Version.new("1.0")
-    # All minor versions are stable in the new GNOME version scheme (which starts at version 40.0)
-    # https://discourse.gnome.org/t/new-gnome-versioning-scheme/4235
-    return if stable_url_version >= Version.new("40.0")
-    return if stable_url_minor_version.even?
-
-    problem "#{stable.version} is a development release"
-  when %r{isc.org/isc/bind\d*/}i
-    return if stable_url_minor_version.even?
-
-    problem "#{stable.version} is a development release"
-
-  when %r{https?://gitlab\.com/([\w-]+)/([\w-]+)}
-    owner = Regexp.last_match(1)
-    repo = Regexp.last_match(2)
-
-    tag = SharedAudits.gitlab_tag_from_url(url)
-    tag ||= stable.specs[:tag]
-    tag ||= stable.version
-
-    if @online
-      error = SharedAudits.gitlab_release(owner, repo, tag, formula:)
-      problem error if error
-    end
-  when %r{^https://github.com/([\w-]+)/([\w-]+)}
-    owner = Regexp.last_match(1)
-    repo = Regexp.last_match(2)
-    tag = SharedAudits.github_tag_from_url(url)
-    tag ||= formula.stable.specs[:tag]
-
-    if @online
-      error = SharedAudits.github_release(owner, repo, tag, formula:)
-      problem error if error
-    end
-  end
-end
-
-
- -
-

- - #audit_stable_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-805
-806
-807
-808
-809
-810
-811
-812
-813
-814
-815
-816
-817
-818
-819
-820
-821
-
-
# File 'formula_auditor.rb', line 805
-
-def audit_stable_version
-  return unless @git
-  return unless formula.tap # skip formula not from core or any taps
-  return unless formula.tap.git? # git log is required
-  return if formula.stable.blank?
-
-  current_version = formula.stable.version
-  current_version_scheme = formula.version_scheme
-
-  previous_committed, newest_committed = committed_version_info
-
-  if !newest_committed[:version].nil? &&
-     current_version < newest_committed[:version] &&
-     current_version_scheme == previous_committed[:version_scheme]
-    problem "stable version should not decrease (from #{newest_committed[:version]} to #{current_version})"
-  end
-end
-
-
- -
-

- - #audit_styleObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-
-
# File 'formula_auditor.rb', line 43
-
-def audit_style
-  return unless @style_offenses
-
-  @style_offenses.each do |offense|
-    cop_name = "#{offense.cop_name}: " if @display_cop_names
-    message = "#{cop_name}#{offense.message}"
-
-    problem message, location: offense.location, corrected: offense.corrected?
-  end
-end
-
-
- -
-

- - #audit_synced_versions_formulaeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-
-
# File 'formula_auditor.rb', line 142
-
-def audit_synced_versions_formulae
-  return unless formula.synced_with_other_formulae?
-
-  name = formula.name
-  version = formula.version
-
-  formula.tap.synced_versions_formulae.each do |synced_version_formulae|
-    next unless synced_version_formulae.include?(name)
-
-    synced_version_formulae.each do |synced_formula|
-      next if synced_formula == name
-
-      if (synced_version = Formulary.factory(synced_formula).version) != version
-        problem "Version of `#{synced_formula}` (#{synced_version}) should match version of `#{name}` (#{version})"
-      end
-    end
-
-    break
-  end
-end
-
-
- -
-

- - #audit_textObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-896
-897
-898
-899
-900
-901
-902
-903
-904
-905
-906
-907
-908
-909
-910
-911
-912
-913
-
-
# File 'formula_auditor.rb', line 896
-
-def audit_text
-  bin_names = Set.new
-  bin_names << formula.name
-  bin_names += formula.aliases
-  [formula.bin, formula.sbin].each do |dir|
-    next unless dir.exist?
-
-    bin_names += dir.children.map { |child| child.basename.to_s }
-  end
-  shell_commands = ["system", "shell_output", "pipe_output"]
-  bin_names.each do |name|
-    shell_commands.each do |cmd|
-      if text.to_s.match?(/test do.*#{cmd}[(\s]+['"]#{Regexp.escape(name)}[\s'"]/m)
-        problem %Q(fully scope test #{cmd} calls, e.g. #{cmd} "\#{bin}/#{name}")
-      end
-    end
-  end
-end
-
-
- -
-

- - #audit_unconfirmed_checksum_changeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-872
-873
-874
-875
-876
-877
-878
-879
-880
-881
-882
-883
-884
-885
-886
-887
-888
-889
-890
-891
-892
-893
-894
-
-
# File 'formula_auditor.rb', line 872
-
-def audit_unconfirmed_checksum_change
-  return unless @git
-  return unless formula.tap # skip formula not from core or any taps
-  return unless formula.tap.git? # git log is required
-  return if formula.stable.blank?
-
-  current_version = formula.stable.version
-  current_checksum = formula.stable.checksum
-  current_url = formula.stable.url
-
-  _, newest_committed = committed_version_info
-
-  if current_version == newest_committed[:version] &&
-     current_url == newest_committed[:url] &&
-     current_checksum != newest_committed[:checksum] &&
-     current_checksum.present? && newest_committed[:checksum].present?
-    problem(
-      "stable sha256 changed without the url/version also changing; " \
-      "please create an issue upstream to rule out malicious " \
-      "circumstances and to find out why the file changed.",
-    )
-  end
-end
-
-
- -
-

- - #audit_version_schemeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-852
-853
-854
-855
-856
-857
-858
-859
-860
-861
-862
-863
-864
-865
-866
-867
-868
-869
-870
-
-
# File 'formula_auditor.rb', line 852
-
-def audit_version_scheme
-  return unless @git
-  return unless formula.tap # skip formula not from core or any taps
-  return unless formula.tap.git? # git log is required
-  return if formula.stable.blank?
-
-  current_version_scheme = formula.version_scheme
-
-  previous_committed, = committed_version_info
-
-  return if previous_committed[:version_scheme].nil?
-
-  if current_version_scheme < previous_committed[:version_scheme]
-    problem "version_scheme should not decrease (from #{previous_committed[:version_scheme]} " \
-            "to #{current_version_scheme})"
-  elsif current_version_scheme > (previous_committed[:version_scheme] + 1)
-    problem "version_schemes should only increment by 1"
-  end
-end
-
-
- -
-

- - #audit_versioned_keg_onlyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-515
-516
-517
-518
-519
-520
-521
-522
-523
-524
-525
-526
-527
-
-
# File 'formula_auditor.rb', line 515
-
-def audit_versioned_keg_only
-  return unless @versioned_formula
-  return unless @core_tap
-
-  if formula.keg_only?
-    return if formula.keg_only_reason.versioned_formula?
-    return if formula.name.start_with?("openssl", "libressl") && formula.keg_only_reason.by_macos?
-  end
-
-  return if formula.tap&.audit_exception :versioned_keg_only_allowlist, formula.name
-
-  problem "Versioned formulae in homebrew/core should use `keg_only :versioned_formula`"
-end
-
-
- -
-

- - #audit_wayback_urlObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-595
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-
-
# File 'formula_auditor.rb', line 595
-
-def audit_wayback_url
-  return unless @strict
-  return unless @core_tap
-  return if formula.deprecated? || formula.disabled?
-
-  regex = %r{^https?://web\.archive\.org}
-  problem_prefix = "Formula with a Internet Archive Wayback Machine"
-
-  problem "#{problem_prefix} `url` should be deprecated with `:repo_removed`" if regex.match?(formula.stable.url)
-
-  if regex.match?(formula.homepage)
-    problem "#{problem_prefix} `homepage` should find an alternative `homepage` or be deprecated."
-  end
-
-  return unless formula.head
-
-  return unless regex.match?(formula.head.url)
-
-  problem "Remove Internet Archive Wayback Machine `head` URL"
-end
-
-
- -
-

- - #get_repo_data(regex) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-671
-672
-673
-674
-675
-676
-677
-678
-679
-680
-681
-682
-683
-
-
# File 'formula_auditor.rb', line 671
-
-def get_repo_data(regex)
-  return unless @core_tap
-  return unless @online
-
-  _, user, repo = *regex.match(formula.stable.url) if formula.stable
-  _, user, repo = *regex.match(formula.homepage) unless user
-  _, user, repo = *regex.match(formula.head.url) if !user && formula.head
-  return if !user || !repo
-
-  repo.delete_suffix!(".git")
-
-  [user, repo]
-end
-
-
- -
-

- - #problem_if_output(output) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-943
-944
-945
-
-
# File 'formula_auditor.rb', line 943
-
-def problem_if_output(output)
-  problem(output) if output
-end
-
-
- -
-

- - #quote_dep(dep) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-939
-940
-941
-
-
# File 'formula_auditor.rb', line 939
-
-def quote_dep(dep)
-  dep.is_a?(Symbol) ? dep.inspect : "'#{dep}'"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/FormulaCreator.html b/docs/Homebrew/FormulaCreator.html deleted file mode 100644 index 15165d6f1..000000000 --- a/docs/Homebrew/FormulaCreator.html +++ /dev/null @@ -1,1202 +0,0 @@ - - - - - - - Class: Homebrew::FormulaCreator - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::FormulaCreator - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
formula_creator.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class for generating a formula from a template.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(name, version, tap:, url:, mode:, license:, fetch:, head:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String, nil) - - - -
  • - -
  • - - version - - - (String, nil) - - - -
  • - -
  • - - tap - - - (String, nil) - - - -
  • - -
  • - - url - - - (String) - - - -
  • - -
  • - - mode - - - (Symbol, nil) - - - -
  • - -
  • - - license - - - (String, nil) - - - -
  • - -
  • - - fetch - - - (Boolean) - - - -
  • - -
  • - - head - - - (Boolean) - - - -
  • - -
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-
-
# File 'formula_creator.rb', line 16
-
-def initialize(name, version, tap:, url:, mode:, license:, fetch:, head:)
-  @name = name
-  @version = Version.new(version) if version
-  @tap = Tap.fetch(tap || "homebrew/core")
-  @url = url
-  @mode = mode
-  @license = license
-  @fetch = fetch
-  @head = head
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'formula_creator.rb', line 10
-
-def name
-  @name
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .name_from_url(url) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'formula_creator.rb', line 33
-
-def self.name_from_url(url)
-  stem = Pathname.new(url).stem
-  # special cases first
-  if stem.start_with? "index.cgi"
-    # gitweb URLs e.g. http://www.codesrc.com/gitweb/index.cgi?p=libzipper.git;a=summary
-    stem.rpartition("=").last
-  elsif url =~ %r{github\.com/\S+/(\S+)/(archive|releases)/}
-    # e.g. https://github.com/stella-emu/stella/releases/download/6.7/stella-6.7-src.tar.xz
-    Regexp.last_match(1)
-  else
-    # e.g. http://digit-labs.org/files/tools/synscan/releases/synscan-5.02.tar.gz
-    pathver = Version.parse(stem).to_s
-    stem.sub(/[-_.]?#{Regexp.escape(pathver)}$/, "")
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #parse_urlvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'formula_creator.rb', line 50
-
-def parse_url
-  @name = FormulaCreator.name_from_url(@url) if @name.blank?
-  odebug "name_from_url: #{@name}"
-  @version = Version.detect(@url) if @version.nil?
-
-  case @url
-  when %r{github\.com/(\S+)/(\S+)\.git}
-    @head = true
-    user = Regexp.last_match(1)
-    repo = Regexp.last_match(2)
-    @github = GitHub.repository(user, repo) if @fetch
-  when %r{github\.com/(\S+)/(\S+)/(archive|releases)/}
-    user = Regexp.last_match(1)
-    repo = Regexp.last_match(2)
-    @github = GitHub.repository(user, repo) if @fetch
-  end
-end
-
-
- -
-

- - #templateString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-
-
# File 'formula_creator.rb', line 101
-
-def template
-  # FIXME: https://github.com/errata-ai/vale/issues/818
-  # <!-- vale off -->
-  <<~ERB
-    # Documentation: https://docs.brew.sh/Formula-Cookbook
-    #                https://rubydoc.brew.sh/Formula
-    # PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
-    <% if @mode == :node %>
-    require "language/node"
-
-    <% end %>
-    class #{Formulary.class_s(name)} < Formula
-    <% if @mode == :python %>
-      include Language::Python::Virtualenv
-
-    <% end %>
-      desc "#{@desc}"
-      homepage "#{@homepage}"
-    <% unless @head %>
-      url "#{@url}"
-    <% unless @version.detected_from_url? %>
-      version "#{@version}"
-    <% end %>
-      sha256 "#{@sha256}"
-    <% end %>
-      license "#{@license}"
-    <% if @head %>
-      head "#{@url}"
-    <% end %>
-
-    <% if @mode == :cmake %>
-      depends_on "cmake" => :build
-    <% elsif @mode == :crystal %>
-      depends_on "crystal" => :build
-    <% elsif @mode == :go %>
-      depends_on "go" => :build
-    <% elsif @mode == :meson %>
-      depends_on "meson" => :build
-      depends_on "ninja" => :build
-    <% elsif @mode == :node %>
-      depends_on "node"
-    <% elsif @mode == :perl %>
-      uses_from_macos "perl"
-    <% elsif @mode == :python %>
-      depends_on "python"
-    <% elsif @mode == :ruby %>
-      uses_from_macos "ruby"
-    <% elsif @mode == :rust %>
-      depends_on "rust" => :build
-    <% elsif @mode.nil? %>
-      # depends_on "cmake" => :build
-    <% end %>
-
-    <% if @mode == :perl %>
-      # Additional dependency
-      # resource "" do
-      #   url ""
-      #   sha256 ""
-      # end
-
-    <% end %>
-      def install
-    <% if @mode == :cmake %>
-        system "cmake", "-S", ".", "-B", "build", *std_cmake_args
-        system "cmake", "--build", "build"
-        system "cmake", "--install", "build"
-    <% elsif @mode == :autotools %>
-        # Remove unrecognized options if they cause configure to fail
-        # https://rubydoc.brew.sh/Formula.html#std_configure_args-instance_method
-        system "./configure", "--disable-silent-rules", *std_configure_args
-        system "make", "install" # if this fails, try separate make/make install steps
-    <% elsif @mode == :crystal %>
-        system "shards", "build", "--release"
-        bin.install "bin/#{name}"
-    <% elsif @mode == :go %>
-        system "go", "build", *std_go_args(ldflags: "-s -w")
-    <% elsif @mode == :meson %>
-        system "meson", "setup", "build", *std_meson_args
-        system "meson", "compile", "-C", "build", "--verbose"
-        system "meson", "install", "-C", "build"
-    <% elsif @mode == :node %>
-        system "npm", "install", *Language::Node.std_npm_install_args(libexec)
-        bin.install_symlink Dir["\#{libexec}/bin/*"]
-    <% elsif @mode == :perl %>
-        ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5"
-        ENV.prepend_path "PERL5LIB", libexec/"lib"
-
-        # Stage additional dependency (`Makefile.PL` style).
-        # resource("").stage do
-        #   system "perl", "Makefile.PL", "INSTALL_BASE=\#{libexec}"
-        #   system "make"
-        #   system "make", "install"
-        # end
-
-        # Stage additional dependency (`Build.PL` style).
-        # resource("").stage do
-        #   system "perl", "Build.PL", "--install_base", libexec
-        #   system "./Build"
-        #   system "./Build", "install"
-        # end
-
-        bin.install name
-        bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"])
-    <% elsif @mode == :python %>
-        virtualenv_install_with_resources
-    <% elsif @mode == :ruby %>
-        ENV["GEM_HOME"] = libexec
-        system "gem", "build", "\#{name}.gemspec"
-        system "gem", "install", "\#{name}-\#{@version}.gem"
-        bin.install libexec/"bin/\#{name}"
-        bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"])
-    <% elsif @mode == :rust %>
-        system "cargo", "install", *std_cargo_args
-    <% else %>
-        # Remove unrecognized options if they cause configure to fail
-        # https://rubydoc.brew.sh/Formula.html#std_configure_args-instance_method
-        system "./configure", "--disable-silent-rules", *std_configure_args
-        # system "cmake", "-S", ".", "-B", "build", *std_cmake_args
-    <% end %>
-      end
-
-      test do
-        # `test do` will create, run in and delete a temporary directory.
-        #
-        # This test will fail and we won't accept that! For Homebrew/homebrew-core
-        # this will need to be a test that verifies the functionality of the
-        # software. Run the test with `brew test #{name}`. Options passed
-        # to `brew install` such as `--HEAD` also need to be provided to `brew test`.
-        #
-        # The installed folder is not in the path, so use the entire path to any
-        # executables being tested: `system "\#{bin}/program", "do", "something"`.
-        system "false"
-      end
-    end
-  ERB
-  # <!-- vale on -->
-end
-
-
- -
-

- - #verifyvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-28
-29
-30
-
-
# File 'formula_creator.rb', line 28
-
-def verify
-  raise TapUnavailableError, @tap.name unless @tap.installed?
-end
-
-
- -
-

- - #write_formula!Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-
-
# File 'formula_creator.rb', line 69
-
-def write_formula!
-  raise ArgumentError, "name is blank!" if @name.blank?
-  raise ArgumentError, "tap is blank!" if @tap.blank?
-
-  path = @tap.new_formula_path(@name)
-  raise "#{path} already exists" if path.exist?
-
-  if @version.nil? || @version.null?
-    odie "Version cannot be determined from URL. Explicitly set the version with `--set-version` instead."
-  end
-
-  if @fetch
-    unless @head
-      r = Resource.new
-      r.url(@url)
-      r.owner = self
-      @sha256 = r.fetch.sha256 if r.download_strategy == CurlDownloadStrategy
-    end
-
-    if @github
-      @desc = @github["description"]
-      @homepage = @github["homepage"]
-      @license = @github["license"]["spdx_id"] if @github["license"]
-    end
-  end
-
-  path.dirname.mkpath
-  path.write ERB.new(template, trim_mode: ">").result(binding)
-  path
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/FreePort.html b/docs/Homebrew/FreePort.html deleted file mode 100644 index da2e255ee..000000000 --- a/docs/Homebrew/FreePort.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - Module: Homebrew::FreePort - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::FreePort - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
formula_free_port.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper function for finding a free port.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #free_portInteger - - - - - -

-
-

Returns a free port.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-
-
# File 'formula_free_port.rb', line 12
-
-def free_port
-  server = TCPServer.new 0
-  _, port, = server.addr
-  server.close
-
-  port
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Help.html b/docs/Homebrew/Help.html deleted file mode 100644 index 28c53b05d..000000000 --- a/docs/Homebrew/Help.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - Module: Homebrew::Help - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Help - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
help.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for printing help output.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .help(cmd = nil, empty_argv: false, usage_error: nil, remaining_args: []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'help.rb', line 42
-
-def self.help(cmd = nil, empty_argv: false, usage_error: nil, remaining_args: [])
-  if cmd.nil?
-    # Handle `brew` (no arguments).
-    if empty_argv
-      $stderr.puts HOMEBREW_HELP
-      exit 1
-    end
-
-    # Handle `brew (-h|--help|--usage|-?|help)` (no other arguments).
-    puts HOMEBREW_HELP
-    exit 0
-  end
-
-  # Resolve command aliases and find file containing the implementation.
-  path = Commands.path(cmd)
-
-  # Display command-specific (or generic) help in response to `UsageError`.
-  if usage_error
-    $stderr.puts path ? command_help(cmd, path, remaining_args:) : HOMEBREW_HELP
-    $stderr.puts
-    onoe usage_error
-    exit 1
-  end
-
-  # Resume execution in `brew.rb` for unknown commands.
-  return if path.nil?
-
-  # Display help for internal command (or generic help if undocumented).
-  puts command_help(cmd, path, remaining_args:)
-  exit 0
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Install.html b/docs/Homebrew/Install.html deleted file mode 100644 index fb15dd1ab..000000000 --- a/docs/Homebrew/Install.html +++ /dev/null @@ -1,1166 +0,0 @@ - - - - - - - Module: Homebrew::Install - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Install - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Cmd::GistLogs
-
- - - -
-
Defined in:
-
install.rb,
- extend/os/linux/install.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for performing (pre-)install checks.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .check_prefixObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'install.rb', line 32
-
-def check_prefix
-  if (Hardware::CPU.intel? || Hardware::CPU.in_rosetta2?) &&
-     HOMEBREW_PREFIX.to_s == HOMEBREW_MACOS_ARM_DEFAULT_PREFIX
-    if Hardware::CPU.in_rosetta2?
-      odie <<~EOS
-        Cannot install under Rosetta 2 in ARM default prefix (#{HOMEBREW_PREFIX})!
-        To rerun under ARM use:
-            arch -arm64 brew install ...
-        To install under x86_64, install Homebrew into #{HOMEBREW_DEFAULT_PREFIX}.
-      EOS
-    else
-      odie "Cannot install on Intel processor in ARM default prefix (#{HOMEBREW_PREFIX})!"
-    end
-  elsif Hardware::CPU.arm? && HOMEBREW_PREFIX.to_s == HOMEBREW_DEFAULT_PREFIX
-    odie <<~EOS
-      Cannot install in Homebrew on ARM processor in Intel default prefix (#{HOMEBREW_PREFIX})!
-      Please create a new installation in #{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX} using one of the
-      "Alternative Installs" from:
-        #{Formatter.url("https://docs.brew.sh/Installation")}
-      You can migrate your previously installed formula list with:
-        brew bundle dump
-    EOS
-  end
-end
-
-
- -
-

- - .global_post_installObject - - - - Also known as: - generic_global_post_install - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-
-
# File 'extend/os/linux/install.rb', line 39
-
-def self.global_post_install
-  generic_global_post_install
-  symlink_ld_so
-  setup_preferred_gcc_libs
-end
-
-
- -
-

- - .install_formula?(formula, head: false, fetch_head: false, only_dependencies: false, force: false, quiet: false) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-
-
# File 'install.rb', line 57
-
-def install_formula?(
-  formula,
-  head: false,
-  fetch_head: false,
-  only_dependencies: false,
-  force: false,
-  quiet: false
-)
-  # head-only without --HEAD is an error
-  if !head && formula.stable.nil?
-    odie <<~EOS
-      #{formula.full_name} is a head-only formula.
-      To install it, run:
-        brew install --HEAD #{formula.full_name}
-    EOS
-  end
-
-  # --HEAD, fail with no head defined
-  odie "No head is defined for #{formula.full_name}" if head && formula.head.nil?
-
-  installed_head_version = formula.latest_head_version
-  if installed_head_version &&
-     !formula.head_version_outdated?(installed_head_version, fetch_head:)
-    new_head_installed = true
-  end
-  prefix_installed = formula.prefix.exist? && !formula.prefix.children.empty?
-
-  if formula.keg_only? && formula.any_version_installed? && formula.optlinked? && !force
-    # keg-only install is only possible when no other version is
-    # linked to opt, because installing without any warnings can break
-    # dependencies. Therefore before performing other checks we need to be
-    # sure the --force switch is passed.
-    if formula.outdated?
-      if !Homebrew::EnvConfig.no_install_upgrade? && !formula.pinned?
-        name = formula.name
-        version = formula.linked_version
-        puts "#{name} #{version} is already installed but outdated (so it will be upgraded)."
-        return true
-      end
-
-      unpin_cmd_if_needed = ("brew unpin #{formula.full_name} && " if formula.pinned?)
-      optlinked_version = Keg.for(formula.opt_prefix).version
-      onoe <<~EOS
-        #{formula.full_name} #{optlinked_version} is already installed.
-        To upgrade to #{formula.version}, run:
-          #{unpin_cmd_if_needed}brew upgrade #{formula.full_name}
-      EOS
-    elsif only_dependencies
-      return true
-    elsif !quiet
-      opoo <<~EOS
-        #{formula.full_name} #{formula.pkg_version} is already installed and up-to-date.
-        To reinstall #{formula.pkg_version}, run:
-          brew reinstall #{formula.name}
-      EOS
-    end
-  elsif (head && new_head_installed) || prefix_installed
-    # After we're sure the --force switch was passed for linking to opt
-    # keg-only we need to be sure that the version we're attempting to
-    # install is not already installed.
-
-    installed_version = if head
-      formula.latest_head_version
-    else
-      formula.pkg_version
-    end
-
-    msg = "#{formula.full_name} #{installed_version} is already installed"
-    linked_not_equals_installed = formula.linked_version != installed_version
-    if formula.linked? && linked_not_equals_installed
-      msg = if quiet
-        nil
-      else
-        <<~EOS
-          #{msg}.
-          The currently linked version is: #{formula.linked_version}
-        EOS
-      end
-    elsif only_dependencies
-      msg = nil
-      return true
-    elsif !formula.linked? || formula.keg_only?
-      msg = <<~EOS
-        #{msg}, it's just not linked.
-        To link this version, run:
-          brew link #{formula}
-      EOS
-    else
-      msg = if quiet
-        nil
-      else
-        <<~EOS
-          #{msg} and up-to-date.
-          To reinstall #{formula.pkg_version}, run:
-            brew reinstall #{formula.name}
-        EOS
-      end
-    end
-    opoo msg if msg
-  elsif !formula.any_version_installed? && (old_formula = formula.old_installed_formulae.first)
-    msg = "#{old_formula.full_name} #{old_formula.any_installed_version} already installed"
-    msg = if !old_formula.linked? && !old_formula.keg_only?
-      <<~EOS
-        #{msg}, it's just not linked.
-        To link this version, run:
-          brew link #{old_formula.full_name}
-      EOS
-    elsif quiet
-      nil
-    else
-      "#{msg}."
-    end
-    opoo msg if msg
-  elsif formula.migration_needed? && !force
-    # Check if the formula we try to install is the same as installed
-    # but not migrated one. If --force is passed then install anyway.
-    opoo <<~EOS
-      #{formula.oldnames_to_migrate.first} is already installed, it's just not migrated.
-      To migrate this formula, run:
-        brew migrate #{formula}
-      Or to force-install it, run:
-        brew install #{formula} --force
-    EOS
-  elsif formula.linked?
-    message = "#{formula.name} #{formula.linked_version} is already installed"
-    if formula.outdated? && !head
-      if !Homebrew::EnvConfig.no_install_upgrade? && !formula.pinned?
-        puts "#{message} but outdated (so it will be upgraded)."
-        return true
-      end
-
-      unpin_cmd_if_needed = ("brew unpin #{formula.full_name} && " if formula.pinned?)
-      onoe <<~EOS
-        #{message}
-        To upgrade to #{formula.pkg_version}, run:
-          #{unpin_cmd_if_needed}brew upgrade #{formula.full_name}
-      EOS
-    elsif only_dependencies
-      return true
-    else
-      onoe <<~EOS
-        #{message}
-        To install #{formula.pkg_version}, first run:
-          brew unlink #{formula.name}
-      EOS
-    end
-  else
-    # If none of the above is true and the formula is linked, then
-    # FormulaInstaller will handle this case.
-    return true
-  end
-
-  # Even if we don't install this formula mark it as no longer just
-  # installed as a dependency.
-  return false unless formula.opt_prefix.directory?
-
-  keg = Keg.new(formula.opt_prefix.resolved_path)
-  tab = keg.tab
-  unless tab.installed_on_request
-    tab.installed_on_request = true
-    tab.write
-  end
-
-  false
-end
-
-
- -
-

- - .install_formulae(formulae_to_install, build_bottle: false, force_bottle: false, bottle_arch: nil, ignore_deps: false, only_deps: false, include_test_formulae: [], build_from_source_formulae: [], cc: nil, git: false, interactive: false, keep_tmp: false, debug_symbols: false, force: false, overwrite: false, debug: false, quiet: false, verbose: false, dry_run: false, skip_post_install: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-
-
# File 'install.rb', line 223
-
-def install_formulae(
-  formulae_to_install,
-  build_bottle: false,
-  force_bottle: false,
-  bottle_arch: nil,
-  ignore_deps: false,
-  only_deps: false,
-  include_test_formulae: [],
-  build_from_source_formulae: [],
-  cc: nil,
-  git: false,
-  interactive: false,
-  keep_tmp: false,
-  debug_symbols: false,
-  force: false,
-  overwrite: false,
-  debug: false,
-  quiet: false,
-  verbose: false,
-  dry_run: false,
-  skip_post_install: false
-)
-  formula_installers = formulae_to_install.filter_map do |formula|
-    Migrator.migrate_if_needed(formula, force:, dry_run:)
-    build_options = formula.build
-
-    formula_installer = FormulaInstaller.new(
-      formula,
-      options:                    build_options.used_options,
-      build_bottle:,
-      force_bottle:,
-      bottle_arch:,
-      ignore_deps:,
-      only_deps:,
-      include_test_formulae:,
-      build_from_source_formulae:,
-      cc:,
-      git:,
-      interactive:,
-      keep_tmp:,
-      debug_symbols:,
-      force:,
-      overwrite:,
-      debug:,
-      quiet:,
-      verbose:,
-      skip_post_install:,
-    )
-
-    begin
-      unless dry_run
-        formula_installer.prelude
-        formula_installer.fetch
-      end
-      formula_installer
-    rescue CannotInstallFormulaError => e
-      ofail e.message
-      nil
-    rescue UnsatisfiedRequirements, DownloadError, ChecksumMismatchError => e
-      ofail "#{formula}: #{e}"
-      nil
-    end
-  end
-
-  if dry_run
-    if (formulae_name_to_install = formulae_to_install.map(&:name))
-      ohai "Would install #{Utils.pluralize("formula", formulae_name_to_install.count,
-                                            plural: "e", include_count: true)}:"
-      puts formulae_name_to_install.join(" ")
-
-      formula_installers.each do |fi|
-        print_dry_run_dependencies(fi.formula, fi.compute_dependencies, &:name)
-      end
-    end
-    return
-  end
-
-  formula_installers.each do |fi|
-    install_formula(fi)
-    Cleanup.install_formula_clean!(fi.formula)
-  end
-end
-
-
- -
-

- - .perform_build_from_source_checks(all_fatal: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-
-
# File 'install.rb', line 24
-
-def perform_build_from_source_checks(all_fatal: false)
-  Diagnostic.checks(:fatal_build_from_source_checks)
-  Diagnostic.checks(:build_from_source_checks, fatal: all_fatal)
-end
-
-
- -
-

- - .perform_preinstall_checks(all_fatal: false, cc: nil) ⇒ Object - - - - Also known as: - generic_perform_preinstall_checks - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-
-
# File 'extend/os/linux/install.rb', line 33
-
-def self.perform_preinstall_checks(all_fatal: false, cc: nil)
-  generic_perform_preinstall_checks(all_fatal:, cc:)
-  symlink_ld_so
-  setup_preferred_gcc_libs
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-306
-307
-308
-309
-310
-311
-312
-313
-
-
# File 'install.rb', line 306
-
-def print_dry_run_dependencies(formula, dependencies)
-  return if dependencies.empty?
-
-  ohai "Would install #{Utils.pluralize("dependenc", dependencies.count, plural: "ies", singular: "y",
-                                      include_count: true)} for #{formula.name}:"
-  formula_names = dependencies.map { |(dep, _options)| yield dep.to_formula }
-  puts formula_names.join(" ")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck.html b/docs/Homebrew/Livecheck.html deleted file mode 100644 index 5320d4b90..000000000 --- a/docs/Homebrew/Livecheck.html +++ /dev/null @@ -1,3951 +0,0 @@ - - - - - - - Module: Homebrew::Livecheck - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Livecheck - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
livecheck/livecheck.rb,
- livecheck/error.rb,
livecheck/strategy.rb,
livecheck/constants.rb,
livecheck/strategy/git.rb,
livecheck/strategy/gnu.rb,
livecheck/strategy/npm.rb,
livecheck/strategy/xml.rb,
livecheck/strategy/cpan.rb,
livecheck/strategy/json.rb,
livecheck/strategy/pypi.rb,
livecheck/strategy/xorg.rb,
livecheck/strategy/yaml.rb,
livecheck/strategy/crate.rb,
livecheck/strategy/gnome.rb,
livecheck/skip_conditions.rb,
livecheck/strategy/apache.rb,
livecheck/strategy/hackage.rb,
livecheck/strategy/sparkle.rb,
livecheck/livecheck_version.rb,
livecheck/strategy/bitbucket.rb,
livecheck/strategy/launchpad.rb,
livecheck/strategy/page_match.rb,
livecheck/strategy/sourceforge.rb,
livecheck/strategy/header_match.rb,
livecheck/strategy/extract_plist.rb,
livecheck/strategy/github_latest.rb,
livecheck/strategy/github_releases.rb,
livecheck/strategy/electron_builder.rb,
livecheck/livecheck.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

The Livecheck module consists of methods used by the brew livecheck -command. These methods print the requested livecheck information -for formulae.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Constants, SkipConditions, Strategy - - - - Classes: Error, LivecheckVersion - - -

- - -

- Constant Summary - collapse -

- -
- -
GITEA_INSTANCES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.let(%w[
-  codeberg.org
-  gitea.com
-  opendev.org
-  tildegit.org
-].freeze, T::Array[String])
- -
GOGS_INSTANCES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.let(%w[
-  lolg.it
-].freeze, T::Array[String])
- -
STRATEGY_SYMBOLS_TO_SKIP_PREPROCESS_URL = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.let([
-  :extract_plist,
-  :github_latest,
-  :header_match,
-  :json,
-  :page_match,
-  :sparkle,
-  :xml,
-  :yaml,
-].freeze, T::Array[Symbol])
- -
UNSTABLE_VERSION_KEYWORDS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.let(%w[
-  alpha
-  beta
-  bpo
-  dev
-  experimental
-  prerelease
-  preview
-  rc
-].freeze, T::Array[String])
- -
GitHubLatest = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Homebrew::Livecheck::Strategy::GithubLatest
- -
GitHubReleases = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Homebrew::Livecheck::Strategy::GithubReleases
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .cask_name(cask, full_name: false) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the fully-qualified name of a cask if the full_name argument is -provided; returns the name otherwise.

- - -
-
-
-

Parameters:

-
    - -
  • - - cask - - - (Cask::Cask) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-449
-450
-451
-
-
# File 'livecheck/livecheck.rb', line 449
-
-def cask_name(cask, full_name: false)
-  full_name ? cask.full_name : cask.token
-end
-
-
- -
-

- - .checkable_urls(package_or_resource) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns an Array containing the formula/cask/resource URLs that can be used by livecheck.

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-567
-568
-569
-570
-
-
# File 'livecheck/livecheck.rb', line 549
-
-def checkable_urls(package_or_resource)
-  urls = []
-
-  case package_or_resource
-  when Formula
-    if package_or_resource.stable
-      urls << T.must(package_or_resource.stable).url
-      urls.concat(T.must(package_or_resource.stable).mirrors)
-    end
-    urls << T.must(package_or_resource.head).url if package_or_resource.head
-    urls << package_or_resource.homepage if package_or_resource.homepage
-  when Cask::Cask
-    urls << package_or_resource.url.to_s if package_or_resource.url
-    urls << package_or_resource.homepage if package_or_resource.homepage
-  when Resource
-    urls << package_or_resource.url
-  else
-    T.absurd(package_or_resource)
-  end
-
-  urls.compact.uniq
-end
-
-
- -
-

- - .formula_name(formula, full_name: false) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the fully-qualified name of a formula if the full_name argument is -provided; returns the name otherwise.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-456
-457
-458
-
-
# File 'livecheck/livecheck.rb', line 456
-
-def formula_name(formula, full_name: false)
-  full_name ? formula.full_name : formula.name
-end
-
-
- -
-

- - .latest_version(formula_or_cask, referenced_formula_or_cask: nil, livecheck_references: [], json: false, full_name: false, verbose: false, debug: false) ⇒ Hash{Symbol => T.untyped}? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Identifies the latest version of the formula/cask and returns a Hash containing -the version information. Returns nil if a latest version couldn't be found.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula_or_cask - - - (Formula, Cask::Cask) - - - -
  • - -
  • - - referenced_formula_or_cask - - - (Formula, Cask::Cask, nil) - - - (defaults to: nil) - - -
  • - -
  • - - livecheck_references - - - (Array<Formula, Cask::Cask>) - - - (defaults to: []) - - -
  • - -
  • - - json - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - debug - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-656
-657
-658
-659
-660
-661
-662
-663
-664
-665
-666
-667
-668
-669
-670
-671
-672
-673
-674
-675
-676
-677
-678
-679
-680
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-700
-701
-702
-703
-704
-705
-706
-707
-708
-709
-710
-711
-712
-713
-714
-715
-716
-717
-718
-719
-720
-721
-722
-723
-724
-725
-726
-727
-728
-729
-730
-731
-732
-733
-734
-735
-736
-737
-738
-739
-740
-741
-742
-743
-744
-745
-746
-747
-748
-749
-750
-751
-752
-753
-754
-755
-756
-757
-758
-759
-760
-761
-762
-763
-764
-765
-766
-767
-768
-769
-770
-771
-772
-773
-774
-775
-776
-777
-778
-779
-780
-781
-782
-783
-784
-785
-786
-787
-788
-789
-790
-791
-792
-793
-794
-795
-796
-797
-798
-799
-800
-801
-802
-803
-804
-805
-806
-807
-808
-809
-810
-811
-812
-813
-814
-815
-816
-817
-818
-819
-820
-821
-822
-823
-824
-825
-826
-827
-828
-829
-830
-831
-832
-833
-834
-835
-836
-837
-838
-839
-840
-841
-842
-843
-844
-845
-846
-847
-848
-849
-850
-851
-852
-853
-854
-855
-856
-857
-858
-859
-860
-861
-862
-863
-864
-865
-866
-867
-868
-869
-870
-871
-872
-873
-874
-875
-876
-
-
# File 'livecheck/livecheck.rb', line 656
-
-def latest_version(
-  formula_or_cask,
-  referenced_formula_or_cask: nil,
-  livecheck_references: [],
-  json: false, full_name: false, verbose: false, debug: false
-)
-  formula = formula_or_cask if formula_or_cask.is_a?(Formula)
-  cask = formula_or_cask if formula_or_cask.is_a?(Cask::Cask)
-
-  has_livecheckable = formula_or_cask.livecheckable?
-  livecheck = formula_or_cask.livecheck
-  referenced_livecheck = referenced_formula_or_cask&.livecheck
-
-  livecheck_url = livecheck.url || referenced_livecheck&.url
-  livecheck_regex = livecheck.regex || referenced_livecheck&.regex
-  livecheck_strategy = livecheck.strategy || referenced_livecheck&.strategy
-  livecheck_strategy_block = livecheck.strategy_block || referenced_livecheck&.strategy_block
-  livecheck_throttle = livecheck.throttle || referenced_livecheck&.throttle
-
-  livecheck_url_string = livecheck_url_to_string(
-    livecheck_url,
-    referenced_formula_or_cask || formula_or_cask,
-  )
-
-  urls = [livecheck_url_string] if livecheck_url_string
-  urls ||= checkable_urls(referenced_formula_or_cask || formula_or_cask)
-
-  if debug
-    if formula
-      puts "Formula:          #{formula_name(formula, full_name:)}"
-      puts "Head only?:       true" if formula.head_only?
-    elsif cask
-      puts "Cask:             #{cask_name(formula_or_cask, full_name:)}"
-    end
-    puts "Livecheckable?:   #{has_livecheckable ? "Yes" : "No"}"
-    puts "Throttle:         #{livecheck_throttle}" if livecheck_throttle
-
-    livecheck_references.each do |ref_formula_or_cask|
-      case ref_formula_or_cask
-      when Formula
-        puts "Formula Ref:      #{formula_name(ref_formula_or_cask, full_name:)}"
-      when Cask::Cask
-        puts "Cask Ref:         #{cask_name(ref_formula_or_cask, full_name:)}"
-      end
-    end
-  end
-
-  checked_urls = []
-  urls.each_with_index do |original_url, i|
-    # Only preprocess the URL when it's appropriate
-    url = if STRATEGY_SYMBOLS_TO_SKIP_PREPROCESS_URL.include?(livecheck_strategy)
-      original_url
-    else
-      preprocess_url(original_url)
-    end
-    next if checked_urls.include?(url)
-
-    strategies = Strategy.from_url(
-      url,
-      livecheck_strategy:,
-      url_provided:       livecheck_url.present?,
-      regex_provided:     livecheck_regex.present?,
-      block_provided:     livecheck_strategy_block.present?,
-    )
-    strategy = Strategy.from_symbol(livecheck_strategy) || strategies.first
-    strategy_name = livecheck_strategy_names[strategy]
-
-    if debug
-      puts
-      if livecheck_url.is_a?(Symbol)
-        # This assumes the URL symbol will fit within the available space
-        puts "URL (#{livecheck_url}):".ljust(18, " ") + original_url
-      else
-        puts "URL:              #{original_url}"
-      end
-      puts "URL (processed):  #{url}" if url != original_url
-      if strategies.present? && verbose
-        puts "Strategies:       #{strategies.map { |s| livecheck_strategy_names[s] }.join(", ")}"
-      end
-      puts "Strategy:         #{strategy.blank? ? "None" : strategy_name}"
-      puts "Regex:            #{livecheck_regex.inspect}" if livecheck_regex.present?
-    end
-
-    if livecheck_strategy.present?
-      if livecheck_url.blank? && strategy.method(:find_versions).parameters.include?([:keyreq, :url])
-        odebug "#{strategy_name} strategy requires a URL"
-        next
-      elsif livecheck_strategy != :page_match && strategies.exclude?(strategy)
-        odebug "#{strategy_name} strategy does not apply to this URL"
-        next
-      end
-    end
-
-    next if strategy.blank?
-
-    homebrew_curl = case strategy_name
-    when "PageMatch", "HeaderMatch"
-      use_homebrew_curl?((referenced_formula_or_cask || formula_or_cask), url)
-    end
-    puts "Homebrew curl?:   Yes" if debug && homebrew_curl.present?
-
-    strategy_args = {
-      regex:         livecheck_regex,
-      homebrew_curl:,
-    }
-    # TODO: Set `cask`/`url` args based on the presence of the keyword arg
-    # in the strategy's `#find_versions` method once we figure out why
-    # `strategy.method(:find_versions).parameters` isn't working as
-    # expected.
-    strategy_args[:cask] = cask if strategy_name == "ExtractPlist" && cask.present?
-    strategy_args[:url] = url
-    strategy_args.compact!
-
-    strategy_data = strategy.find_versions(**strategy_args, &livecheck_strategy_block)
-    match_version_map = strategy_data[:matches]
-    regex = strategy_data[:regex]
-    messages = strategy_data[:messages]
-    checked_urls << url
-
-    if messages.is_a?(Array) && match_version_map.blank?
-      puts messages unless json
-      next if i + 1 < urls.length
-
-      return status_hash(formula_or_cask, "error", messages, full_name:, verbose:)
-    end
-
-    if debug
-      if strategy_data[:url].present? && strategy_data[:url] != url
-        puts "URL (strategy):   #{strategy_data[:url]}"
-      end
-      puts "URL (final):      #{strategy_data[:final_url]}" if strategy_data[:final_url].present?
-      if strategy_data[:regex].present? && strategy_data[:regex] != livecheck_regex
-        puts "Regex (strategy): #{strategy_data[:regex].inspect}"
-      end
-      puts "Cached?:          Yes" if strategy_data[:cached] == true
-    end
-
-    match_version_map.delete_if do |_match, version|
-      next true if version.blank?
-      next false if has_livecheckable
-
-      UNSTABLE_VERSION_KEYWORDS.any? do |rejection|
-        version.to_s.include?(rejection)
-      end
-    end
-    next if match_version_map.blank?
-
-    if debug
-      puts
-      puts "Matched Versions:"
-
-      if verbose
-        match_version_map.each do |match, version|
-          puts "#{match} => #{version.inspect}"
-        end
-      else
-        puts match_version_map.values.join(", ")
-      end
-    end
-
-    version_info = {
-      latest: Version.new(match_version_map.values.max_by { |v| LivecheckVersion.create(formula_or_cask, v) }),
-    }
-
-    if livecheck_throttle
-      match_version_map.keep_if { |_match, version| version.patch.to_i.modulo(livecheck_throttle).zero? }
-      version_info[:latest_throttled] = if match_version_map.blank?
-        nil
-      else
-        Version.new(match_version_map.values.max_by { |v| LivecheckVersion.create(formula_or_cask, v) })
-      end
-
-      if debug
-        puts
-        puts "Matched Throttled Versions:"
-
-        if verbose
-          match_version_map.each do |match, version|
-            puts "#{match} => #{version.inspect}"
-          end
-        else
-          puts match_version_map.values.join(", ")
-        end
-      end
-    end
-
-    if json && verbose
-      version_info[:meta] = {}
-
-      if livecheck_references.present?
-        version_info[:meta][:references] = livecheck_references.map do |ref_formula_or_cask|
-          case ref_formula_or_cask
-          when Formula
-            { formula: formula_name(ref_formula_or_cask, full_name:) }
-          when Cask::Cask
-            { cask: cask_name(ref_formula_or_cask, full_name:) }
-          end
-        end
-      end
-
-      version_info[:meta][:url] = {}
-      version_info[:meta][:url][:symbol] = livecheck_url if livecheck_url.is_a?(Symbol) && livecheck_url_string
-      version_info[:meta][:url][:original] = original_url
-      version_info[:meta][:url][:processed] = url if url != original_url
-      if strategy_data[:url].present? && strategy_data[:url] != url
-        version_info[:meta][:url][:strategy] = strategy_data[:url]
-      end
-      version_info[:meta][:url][:final] = strategy_data[:final_url] if strategy_data[:final_url]
-      version_info[:meta][:url][:homebrew_curl] = homebrew_curl if homebrew_curl.present?
-
-      version_info[:meta][:strategy] = strategy.present? ? strategy_name : nil
-      version_info[:meta][:strategies] = strategies.map { |s| livecheck_strategy_names[s] } if strategies.present?
-      version_info[:meta][:regex] = regex.inspect if regex.present?
-      version_info[:meta][:cached] = true if strategy_data[:cached] == true
-      version_info[:meta][:throttle] = livecheck_throttle if livecheck_throttle
-    end
-
-    return version_info
-  end
-  nil
-end
-
-
- -
-

- - .livecheck_strategy_namesHash{T::Class[T.anything] => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{T::Class[T.anything] => String}) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'livecheck/livecheck.rb', line 53
-
-def livecheck_strategy_names
-  return T.must(@livecheck_strategy_names) if defined?(@livecheck_strategy_names)
-
-  # Cache demodulized strategy names, to avoid repeating this work
-  @livecheck_strategy_names = T.let({}, T.nilable(T::Hash[T::Class[T.anything], String]))
-  Strategy.constants.sort.each do |const_symbol|
-    constant = Strategy.const_get(const_symbol)
-    next unless constant.is_a?(Class)
-
-    T.must(@livecheck_strategy_names)[constant] = Utils.demodulize(T.must(constant.name))
-  end
-  T.must(@livecheck_strategy_names).freeze
-end
-
-
- -
-

- - .livecheck_url_to_string(livecheck_url, package_or_resource) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-
-
# File 'livecheck/livecheck.rb', line 534
-
-def livecheck_url_to_string(livecheck_url, package_or_resource)
-  case livecheck_url
-  when String
-    livecheck_url
-  when :url
-    package_or_resource.url&.to_s if package_or_resource.is_a?(Cask::Cask) || package_or_resource.is_a?(Resource)
-  when :head, :stable
-    package_or_resource.send(livecheck_url)&.url if package_or_resource.is_a?(Formula)
-  when :homepage
-    package_or_resource.homepage unless package_or_resource.is_a?(Resource)
-  end
-end
-
-
- -
-

- - .load_other_tap_strategies(formulae_and_casks_to_check) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Uses formulae_and_casks_to_check to identify taps in use other than -homebrew/core and homebrew/cask and loads strategies from them.

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-
-
# File 'livecheck/livecheck.rb', line 70
-
-def load_other_tap_strategies(formulae_and_casks_to_check)
-  other_taps = {}
-  formulae_and_casks_to_check.each do |formula_or_cask|
-    next if formula_or_cask.tap.blank?
-    next if formula_or_cask.tap.core_tap?
-    next if formula_or_cask.tap.core_cask_tap?
-    next if other_taps[formula_or_cask.tap.name]
-
-    other_taps[formula_or_cask.tap.name] = formula_or_cask.tap
-  end
-  other_taps = other_taps.sort.to_h
-
-  other_taps.each_value do |tap|
-    tap_strategy_path = "#{tap.path}/livecheck/strategy"
-    Dir["#{tap_strategy_path}/*.rb"].each { require(_1) } if Dir.exist?(tap_strategy_path)
-  end
-end
-
-
- -
-

- - .package_or_resource_name(package_or_resource, full_name: false) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - package_or_resource - - - (Formula, Cask::Cask, Resource) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-
-
# File 'livecheck/livecheck.rb', line 433
-
-def package_or_resource_name(package_or_resource, full_name: false)
-  case package_or_resource
-  when Formula
-    formula_name(package_or_resource, full_name:)
-  when Cask::Cask
-    cask_name(package_or_resource, full_name:)
-  when Resource
-    package_or_resource.name
-  else
-    T.absurd(package_or_resource)
-  end
-end
-
-
- -
-

- - .preprocess_url(url) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Preprocesses and returns the URL used by livecheck.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-592
-593
-594
-595
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-
-
# File 'livecheck/livecheck.rb', line 574
-
-def preprocess_url(url)
-  begin
-    uri = Addressable::URI.parse url
-  rescue Addressable::URI::InvalidURIError
-    return url
-  end
-
-  host = uri.host
-  path = uri.path
-  return url if host.nil? || path.nil?
-
-  host = "github.com" if host == "github.s3.amazonaws.com"
-  path = path.delete_prefix("/").delete_suffix(".git")
-  scheme = uri.scheme
-
-  if host == "github.com"
-    return url if path.match? %r{/releases/latest/?$}
-
-    owner, repo = path.delete_prefix("downloads/").split("/")
-    url = "#{scheme}://#{host}/#{owner}/#{repo}.git"
-  elsif GITEA_INSTANCES.include?(host)
-    return url if path.match? %r{/releases/latest/?$}
-
-    owner, repo = path.split("/")
-    url = "#{scheme}://#{host}/#{owner}/#{repo}.git"
-  elsif GOGS_INSTANCES.include?(host)
-    owner, repo = path.split("/")
-    url = "#{scheme}://#{host}/#{owner}/#{repo}.git"
-  # sourcehut
-  elsif host == "git.sr.ht"
-    owner, repo = path.split("/")
-    url = "#{scheme}://#{host}/#{owner}/#{repo}"
-  # GitLab (gitlab.com or self-hosted)
-  elsif path.include?("/-/archive/")
-    url = url.sub(%r{/-/archive/.*$}i, ".git")
-  end
-
-  url
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Formats and prints the livecheck result for a formula/cask/resource.

- - -
-
-
-

Parameters:

-
    - -
  • - - info - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - ambiguous_cask - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-
-
# File 'livecheck/livecheck.rb', line 495
-
-def print_latest_version(info, verbose: false, ambiguous_cask: false)
-  package_or_resource_s = info[:resource].present? ? "  " : ""
-  package_or_resource_s += "#{Tty.blue}#{info[:formula] || info[:cask] || info[:resource]}#{Tty.reset}"
-  package_or_resource_s += " (cask)" if ambiguous_cask
-  package_or_resource_s += " (guessed)" if verbose && !info[:meta][:livecheckable]
-
-  current_s = if info[:version][:newer_than_upstream]
-    "#{Tty.red}#{info[:version][:current]}#{Tty.reset}"
-  else
-    info[:version][:current]
-  end
-
-  latest_s = if info[:version][:outdated]
-    "#{Tty.green}#{info[:version][:latest]}#{Tty.reset}"
-  else
-    info[:version][:latest]
-  end
-
-  puts "#{package_or_resource_s}: #{current_s} ==> #{latest_s}"
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Prints the livecheck result for the resources of a given Formula.

- - -
-
-
-

Parameters:

-
    - -
  • - - info - - - (Array<Hash{Symbol => T.untyped}>) - - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-518
-519
-520
-521
-522
-523
-524
-525
-526
-
-
# File 'livecheck/livecheck.rb', line 518
-
-def print_resources_info(info, verbose: false)
-  info.each do |r_info|
-    if r_info[:status] && r_info[:messages]
-      SkipConditions.print_skip_information(r_info)
-    else
-      print_latest_version(r_info, verbose:)
-    end
-  end
-end
-
-
- -
-

- - .resolve_livecheck_reference(formula_or_cask, first_formula_or_cask = formula_or_cask, references = [], full_name: false, debug: false) ⇒ Array<T.untyped>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Resolve formula/cask references in livecheck blocks to a final formula -or cask.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula_or_cask - - - (Formula, Cask::Cask) - - - -
  • - -
  • - - first_formula_or_cask - - - (Formula, Cask::Cask) - - - (defaults to: formula_or_cask) - - -
  • - -
  • - - references - - - (Array<Formula, Cask::Cask>) - - - (defaults to: []) - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - debug - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array<T.untyped>, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-
-
# File 'livecheck/livecheck.rb', line 99
-
-def resolve_livecheck_reference(
-  formula_or_cask,
-  first_formula_or_cask = formula_or_cask,
-  references = [],
-  full_name: false,
-  debug: false
-)
-  # Check the livecheck block for a formula or cask reference
-  livecheck = formula_or_cask.livecheck
-  livecheck_formula = livecheck.formula
-  livecheck_cask = livecheck.cask
-  return [nil, references] if livecheck_formula.blank? && livecheck_cask.blank?
-
-  # Load the referenced formula or cask
-  referenced_formula_or_cask = Homebrew.with_no_api_env do
-    if livecheck_formula
-      Formulary.factory(livecheck_formula)
-    elsif livecheck_cask
-      Cask::CaskLoader.load(livecheck_cask)
-    end
-  end
-
-  # Error if a `livecheck` block references a formula/cask that was already
-  # referenced (or itself)
-  if referenced_formula_or_cask == first_formula_or_cask ||
-     referenced_formula_or_cask == formula_or_cask ||
-     references.include?(referenced_formula_or_cask)
-    if debug
-      # Print the chain of references for debugging
-      puts "Reference Chain:"
-      puts package_or_resource_name(first_formula_or_cask, full_name:)
-
-      references << referenced_formula_or_cask
-      references.each do |ref_formula_or_cask|
-        puts package_or_resource_name(ref_formula_or_cask, full_name:)
-      end
-    end
-
-    raise "Circular formula/cask reference encountered"
-  end
-  references << referenced_formula_or_cask
-
-  # Check the referenced formula/cask for a reference
-  next_referenced_formula_or_cask, next_references = resolve_livecheck_reference(
-    referenced_formula_or_cask,
-    first_formula_or_cask,
-    references,
-    full_name:,
-    debug:,
-  )
-
-  # Returning references along with the final referenced formula/cask
-  # allows us to print the chain of references in the debug output
-  [
-    next_referenced_formula_or_cask || referenced_formula_or_cask,
-    next_references,
-  ]
-end
-
-
- -
-

- - .resource_version(resource, formula_latest, json: false, debug: false, quiet: false, verbose: false) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Identifies the latest version of a resource and returns a Hash containing the -version information. Returns nil if a latest version couldn't be found.

- - -
-
-
-

Parameters:

-
    - -
  • - - resource - - - (Resource) - - - -
  • - -
  • - - formula_latest - - - (String) - - - -
  • - -
  • - - json - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - debug - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - quiet - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-890
-891
-892
-893
-894
-895
-896
-897
-898
-899
-900
-901
-902
-903
-904
-905
-906
-907
-908
-909
-910
-911
-912
-913
-914
-915
-916
-917
-918
-919
-920
-921
-922
-923
-924
-925
-926
-927
-928
-929
-930
-931
-932
-933
-934
-935
-936
-937
-938
-939
-940
-941
-942
-943
-944
-945
-946
-947
-948
-949
-950
-951
-952
-953
-954
-955
-956
-957
-958
-959
-960
-961
-962
-963
-964
-965
-966
-967
-968
-969
-970
-971
-972
-973
-974
-975
-976
-977
-978
-979
-980
-981
-982
-983
-984
-985
-986
-987
-988
-989
-990
-991
-992
-993
-994
-995
-996
-997
-998
-999
-1000
-1001
-1002
-1003
-1004
-1005
-1006
-1007
-1008
-1009
-1010
-1011
-1012
-1013
-1014
-1015
-1016
-1017
-1018
-1019
-1020
-1021
-1022
-1023
-1024
-1025
-1026
-1027
-1028
-1029
-1030
-1031
-1032
-1033
-1034
-1035
-1036
-1037
-1038
-1039
-1040
-1041
-1042
-1043
-1044
-1045
-1046
-1047
-1048
-1049
-1050
-1051
-1052
-1053
-1054
-1055
-1056
-1057
-1058
-1059
-1060
-1061
-1062
-1063
-1064
-
-
# File 'livecheck/livecheck.rb', line 890
-
-def resource_version(
-  resource,
-  formula_latest,
-  json: false,
-  debug: false,
-  quiet: false,
-  verbose: false
-)
-  has_livecheckable = resource.livecheckable?
-
-  if debug
-    puts "\n\n"
-    puts "Resource:         #{resource.name}"
-    puts "Livecheckable?:   #{has_livecheckable ? "Yes" : "No"}"
-  end
-
-  resource_version_info = {}
-
-  livecheck = resource.livecheck
-  livecheck_url = livecheck.url
-  livecheck_regex = livecheck.regex
-  livecheck_strategy = livecheck.strategy
-  livecheck_strategy_block = livecheck.strategy_block
-
-  livecheck_url_string = livecheck_url_to_string(livecheck_url, resource)
-
-  urls = [livecheck_url_string] if livecheck_url_string
-  urls ||= checkable_urls(resource)
-
-  checked_urls = []
-  urls.each_with_index do |original_url, i|
-    url = original_url.gsub(Constants::LATEST_VERSION, formula_latest)
-
-    # Only preprocess the URL when it's appropriate
-    url = preprocess_url(url) unless STRATEGY_SYMBOLS_TO_SKIP_PREPROCESS_URL.include?(livecheck_strategy)
-
-    next if checked_urls.include?(url)
-
-    strategies = Strategy.from_url(
-      url,
-      livecheck_strategy:,
-      url_provided:       livecheck_url.present?,
-      regex_provided:     livecheck_regex.present?,
-      block_provided:     livecheck_strategy_block.present?,
-    )
-    strategy = Strategy.from_symbol(livecheck_strategy) || strategies.first
-    strategy_name = livecheck_strategy_names[strategy]
-
-    if debug
-      puts
-      if livecheck_url.is_a?(Symbol)
-        # This assumes the URL symbol will fit within the available space
-        puts "URL (#{livecheck_url}):".ljust(18, " ") + original_url
-      else
-        puts "URL:              #{original_url}"
-      end
-      puts "URL (processed):  #{url}" if url != original_url
-      if strategies.present? && verbose
-        puts "Strategies:       #{strategies.map { |s| livecheck_strategy_names[s] }.join(", ")}"
-      end
-      puts "Strategy:         #{strategy.blank? ? "None" : strategy_name}"
-      puts "Regex:            #{livecheck_regex.inspect}" if livecheck_regex.present?
-    end
-
-    if livecheck_strategy.present?
-      if livecheck_url.blank? && strategy.method(:find_versions).parameters.include?([:keyreq, :url])
-        odebug "#{strategy_name} strategy requires a URL"
-        next
-      elsif livecheck_strategy != :page_match && strategies.exclude?(strategy)
-        odebug "#{strategy_name} strategy does not apply to this URL"
-        next
-      end
-    end
-    puts if debug && strategy.blank?
-    next if strategy.blank?
-
-    strategy_args = {
-      url:,
-      regex:         livecheck_regex,
-      homebrew_curl: false,
-    }.compact
-
-    strategy_data = strategy.find_versions(**strategy_args, &livecheck_strategy_block)
-    match_version_map = strategy_data[:matches]
-    regex = strategy_data[:regex]
-    messages = strategy_data[:messages]
-    checked_urls << url
-
-    if messages.is_a?(Array) && match_version_map.blank?
-      puts messages unless json
-      next if i + 1 < urls.length
-
-      return status_hash(resource, "error", messages, verbose:)
-    end
-
-    if debug
-      if strategy_data[:url].present? && strategy_data[:url] != url
-        puts "URL (strategy):   #{strategy_data[:url]}"
-      end
-      puts "URL (final):      #{strategy_data[:final_url]}" if strategy_data[:final_url].present?
-      if strategy_data[:regex].present? && strategy_data[:regex] != livecheck_regex
-        puts "Regex (strategy): #{strategy_data[:regex].inspect}"
-      end
-      puts "Cached?:          Yes" if strategy_data[:cached] == true
-    end
-
-    match_version_map.delete_if do |_match, version|
-      next true if version.blank?
-      next false if has_livecheckable
-
-      UNSTABLE_VERSION_KEYWORDS.any? do |rejection|
-        version.to_s.include?(rejection)
-      end
-    end
-    next if match_version_map.blank?
-
-    if debug
-      puts
-      puts "Matched Versions:"
-
-      if verbose
-        match_version_map.each do |match, version|
-          puts "#{match} => #{version.inspect}"
-        end
-      else
-        puts match_version_map.values.join(", ")
-      end
-    end
-
-    res_current = T.must(resource.version)
-    res_latest = Version.new(match_version_map.values.max_by { |v| LivecheckVersion.create(resource, v) })
-
-    return status_hash(resource, "error", ["Unable to get versions"], verbose:) if res_latest.blank?
-
-    is_outdated = res_current < res_latest
-    is_newer_than_upstream = res_current > res_latest
-
-    resource_version_info = {
-      resource: resource.name,
-      version:  {
-        current:             res_current.to_s,
-        latest:              res_latest.to_s,
-        outdated:            is_outdated,
-        newer_than_upstream: is_newer_than_upstream,
-      },
-    }
-
-    resource_version_info[:meta] = { livecheckable: has_livecheckable, url: {} }
-    if livecheck_url.is_a?(Symbol) && livecheck_url_string
-      resource_version_info[:meta][:url][:symbol] = livecheck_url
-    end
-    resource_version_info[:meta][:url][:original] = original_url
-    resource_version_info[:meta][:url][:processed] = url if url != original_url
-    if strategy_data[:url].present? && strategy_data[:url] != url
-      resource_version_info[:meta][:url][:strategy] = strategy_data[:url]
-    end
-    resource_version_info[:meta][:url][:final] = strategy_data[:final_url] if strategy_data[:final_url]
-    resource_version_info[:meta][:strategy] = strategy.present? ? strategy_name : nil
-    if strategies.present?
-      resource_version_info[:meta][:strategies] = strategies.map { |s| livecheck_strategy_names[s] }
-    end
-    resource_version_info[:meta][:regex] = regex.inspect if regex.present?
-    resource_version_info[:meta][:cached] = true if strategy_data[:cached] == true
-  rescue => e
-    Homebrew.failed = true
-    if json
-      status_hash(resource, "error", [e.to_s], verbose:)
-    elsif !quiet
-      onoe "#{Tty.blue}#{resource.name}#{Tty.reset}: #{e}"
-      $stderr.puts Utils::Backtrace.clean(e) if debug && !e.is_a?(Livecheck::Error)
-      nil
-    end
-  end
-  resource_version_info
-end
-
-
- -
-

- - .run_checks(formulae_and_casks_to_check, full_name: false, handle_name_conflict: false, check_resources: false, json: false, newer_only: false, extract_plist: false, debug: false, quiet: false, verbose: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Executes the livecheck logic for each formula/cask in the -formulae_and_casks_to_check array and prints the results.

- - -
-
-
-

Parameters:

-
    - -
  • - - formulae_and_casks_to_check - - - (Array<Formula, Cask::Cask>) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - handle_name_conflict - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - check_resources - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - json - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - newer_only - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - extract_plist - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - debug - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - quiet - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-
-
# File 'livecheck/livecheck.rb', line 174
-
-def run_checks(
-  formulae_and_casks_to_check,
-  full_name: false, handle_name_conflict: false, check_resources: false, json: false, newer_only: false,
-  extract_plist: false, debug: false, quiet: false, verbose: false
-)
-  load_other_tap_strategies(formulae_and_casks_to_check)
-
-  ambiguous_casks = []
-  if handle_name_conflict
-    ambiguous_casks = formulae_and_casks_to_check
-                      .group_by { |item| package_or_resource_name(item, full_name: true) }
-                      .values
-                      .select { |items| items.length > 1 }
-                      .flatten
-                      .select { |item| item.is_a?(Cask::Cask) }
-  end
-
-  ambiguous_names = []
-  unless full_name
-    ambiguous_names =
-      (formulae_and_casks_to_check - ambiguous_casks).group_by { |item| package_or_resource_name(item) }
-                                                     .values
-                                                     .select { |items| items.length > 1 }
-                                                     .flatten
-  end
-
-  has_a_newer_upstream_version = T.let(false, T::Boolean)
-
-  formulae_and_casks_total = formulae_and_casks_to_check.count
-  if json && !quiet && $stderr.tty?
-    Tty.with($stderr) do |stderr|
-      stderr.puts Formatter.headline("Running checks", color: :blue)
-    end
-
-    require "ruby-progressbar"
-    progress = ProgressBar.create(
-      total:          formulae_and_casks_total,
-      progress_mark:  "#",
-      remainder_mark: ".",
-      format:         " %t: [%B] %c/%C ",
-      output:         $stderr,
-    )
-  end
-
-  # Allow ExtractPlist strategy if only one formula/cask is being checked.
-  extract_plist = true if formulae_and_casks_total == 1
-
-  formulae_checked = formulae_and_casks_to_check.map.with_index do |formula_or_cask, i|
-    formula = formula_or_cask if formula_or_cask.is_a?(Formula)
-    cask = formula_or_cask if formula_or_cask.is_a?(Cask::Cask)
-
-    use_full_name = full_name || ambiguous_names.include?(formula_or_cask)
-    name = package_or_resource_name(formula_or_cask, full_name: use_full_name)
-
-    referenced_formula_or_cask, livecheck_references =
-      resolve_livecheck_reference(formula_or_cask, full_name: use_full_name, debug:)
-
-    if debug && i.positive?
-      puts <<~EOS
-
-        ----------
-
-      EOS
-    elsif debug
-      puts
-    end
-
-    # Check skip conditions for a referenced formula/cask
-    if referenced_formula_or_cask
-      skip_info = SkipConditions.referenced_skip_information(
-        referenced_formula_or_cask,
-        name,
-        full_name:     use_full_name,
-        verbose:,
-        extract_plist:,
-      )
-    end
-
-    skip_info ||= SkipConditions.skip_information(
-      formula_or_cask,
-      full_name:     use_full_name,
-      verbose:,
-      extract_plist:,
-    )
-    if skip_info.present?
-      next skip_info if json && !newer_only
-
-      SkipConditions.print_skip_information(skip_info) if !newer_only && !quiet
-      next
-    end
-
-    formula&.head&.downloader&.quiet!
-
-    # Use the `stable` version for comparison except for installed
-    # head-only formulae. A formula with `stable` and `head` that's
-    # installed using `--head` will still use the `stable` version for
-    # comparison.
-    current = if formula
-      if formula.head_only?
-        formula.any_installed_version.version.commit
-      else
-        T.must(formula.stable).version
-      end
-    else
-      Version.new(formula_or_cask.version)
-    end
-
-    current_str = current.to_s
-    current = LivecheckVersion.create(formula_or_cask, current)
-
-    latest = if formula&.head_only?
-      T.must(formula.head).downloader.fetch_last_commit
-    else
-      version_info = latest_version(
-        formula_or_cask,
-        referenced_formula_or_cask:,
-        livecheck_references:,
-        json:, full_name: use_full_name, verbose:, debug:
-      )
-      version_info[:latest] if version_info.present?
-    end
-
-    check_for_resources = check_resources && formula_or_cask.is_a?(Formula) && formula_or_cask.resources.present?
-    if check_for_resources
-      resource_version_info = formula_or_cask.resources.map do |resource|
-        res_skip_info ||= SkipConditions.skip_information(resource, verbose:)
-        if res_skip_info.present?
-          res_skip_info
-        else
-          res_version_info = resource_version(
-            resource,
-            latest.to_s,
-            json:,
-            debug:,
-            quiet:,
-            verbose:,
-          )
-          if res_version_info.empty?
-            status_hash(resource, "error", ["Unable to get versions"], verbose:)
-          else
-            res_version_info
-          end
-        end
-      end.compact_blank
-      Homebrew.failed = true if resource_version_info.any? { |info| info[:status] == "error" }
-    end
-
-    if latest.blank?
-      no_versions_msg = "Unable to get versions"
-      raise Livecheck::Error, no_versions_msg unless json
-      next if quiet
-
-      next version_info if version_info.is_a?(Hash) && version_info[:status] && version_info[:messages]
-
-      latest_info = status_hash(formula_or_cask, "error", [no_versions_msg], full_name: use_full_name,
-                                                                             verbose:)
-      if check_for_resources
-        unless verbose
-          resource_version_info.map! do |info|
-            info.delete(:meta)
-            info
-          end
-        end
-        latest_info[:resources] = resource_version_info
-      end
-
-      next latest_info
-    end
-
-    if (m = latest.to_s.match(/(.*)-release$/)) && !current.to_s.match(/.*-release$/)
-      latest = Version.new(m[1])
-    end
-
-    latest_str = latest.to_s
-    latest = LivecheckVersion.create(formula_or_cask, latest)
-
-    is_outdated = if formula&.head_only?
-      # A HEAD-only formula is considered outdated if the latest upstream
-      # commit hash is different than the installed version's commit hash
-      (current != latest)
-    else
-      (current < latest)
-    end
-
-    is_newer_than_upstream = (formula&.stable? || cask) && (current > latest)
-
-    info = {}
-    info[:formula] = name if formula
-    info[:cask] = name if cask
-    info[:version] = {
-      current:             current_str,
-      latest:              latest_str,
-      latest_throttled:    version_info&.dig(:latest_throttled),
-      outdated:            is_outdated,
-      newer_than_upstream: is_newer_than_upstream,
-    }.compact
-    info[:meta] = {
-      livecheckable: formula_or_cask.livecheckable?,
-    }
-    info[:meta][:head_only] = true if formula&.head_only?
-    info[:meta].merge!(version_info[:meta]) if version_info.present? && version_info.key?(:meta)
-
-    info[:resources] = resource_version_info if check_for_resources
-
-    next if newer_only && !info[:version][:outdated]
-
-    has_a_newer_upstream_version ||= true
-
-    if json
-      progress&.increment
-      info.delete(:meta) unless verbose
-      if check_for_resources && !verbose
-        resource_version_info.map! do |info|
-          info.delete(:meta)
-          info
-        end
-      end
-      next info
-    end
-    puts if debug
-    print_latest_version(info, verbose:, ambiguous_cask: ambiguous_casks.include?(formula_or_cask))
-    print_resources_info(resource_version_info, verbose:) if check_for_resources
-    nil
-  rescue => e
-    Homebrew.failed = true
-    use_full_name = full_name || ambiguous_names.include?(formula_or_cask)
-
-    if json
-      progress&.increment
-      unless quiet
-        status_hash(formula_or_cask, "error", [e.to_s], full_name: use_full_name,
-                                                        verbose:)
-      end
-    elsif !quiet
-      name = package_or_resource_name(formula_or_cask, full_name: use_full_name)
-      name += " (cask)" if ambiguous_casks.include?(formula_or_cask)
-
-      onoe "#{Tty.blue}#{name}#{Tty.reset}: #{e}"
-      $stderr.puts Utils::Backtrace.clean(e) if debug && !e.is_a?(Livecheck::Error)
-      print_resources_info(resource_version_info, verbose:) if check_for_resources
-      nil
-    end
-  end
-
-  puts "No newer upstream versions." if newer_only && !has_a_newer_upstream_version && !debug && !json && !quiet
-
-  return unless json
-
-  if progress
-    progress.finish
-    Tty.with($stderr) do |stderr|
-      stderr.print "#{Tty.up}#{Tty.erase_line}" * 2
-    end
-  end
-
-  puts JSON.pretty_generate(formulae_checked.compact)
-end
-
-
- -
-

- - .status_hash(package_or_resource, status_str, messages = nil, full_name: false, verbose: false) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - package_or_resource - - - (Formula, Cask::Cask, Resource) - - - -
  • - -
  • - - status_str - - - (String) - - - -
  • - -
  • - - messages - - - (Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-
-
# File 'livecheck/livecheck.rb', line 469
-
-def status_hash(package_or_resource, status_str, messages = nil, full_name: false, verbose: false)
-  formula = package_or_resource if package_or_resource.is_a?(Formula)
-  cask = package_or_resource if package_or_resource.is_a?(Cask::Cask)
-  resource = package_or_resource if package_or_resource.is_a?(Resource)
-
-  status_hash = {}
-  if formula
-    status_hash[:formula] = formula_name(formula, full_name:)
-  elsif cask
-    status_hash[:cask] = cask_name(cask, full_name:)
-  elsif resource
-    status_hash[:resource] = resource.name
-  end
-  status_hash[:status] = status_str
-  status_hash[:messages] = messages if messages.is_a?(Array)
-
-  status_hash[:meta] = {
-    livecheckable: package_or_resource.livecheckable?,
-  }
-  status_hash[:meta][:head_only] = true if formula&.head_only?
-
-  status_hash
-end
-
-
- -
-

- - .use_homebrew_curl?(formula_or_cask, url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

livecheck should fetch a URL using brewed curl if the formula/cask -contains a stable/url or head URL using: :homebrew_curl that -shares the same root domain.

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-638
-639
-640
-641
-
-
# File 'livecheck/livecheck.rb', line 618
-
-def use_homebrew_curl?(formula_or_cask, url)
-  url_root_domain = Addressable::URI.parse(url)&.domain
-  return false if url_root_domain.blank?
-
-  # Collect root domains of URLs with `using: :homebrew_curl`
-  homebrew_curl_root_domains = []
-  case formula_or_cask
-  when Formula
-    [:stable, :head].each do |spec_name|
-      next unless (spec = formula_or_cask.send(spec_name))
-      next if spec.using != :homebrew_curl
-
-      domain = Addressable::URI.parse(spec.url)&.domain
-      homebrew_curl_root_domains << domain if domain.present?
-    end
-  when Cask::Cask
-    return false if formula_or_cask.url.using != :homebrew_curl
-
-    domain = Addressable::URI.parse(formula_or_cask.url.to_s)&.domain
-    homebrew_curl_root_domains << domain if domain.present?
-  end
-
-  homebrew_curl_root_domains.include?(url_root_domain)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Constants.html b/docs/Homebrew/Livecheck/Constants.html deleted file mode 100644 index 02aa890c3..000000000 --- a/docs/Homebrew/Livecheck/Constants.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - Module: Homebrew::Livecheck::Constants - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Livecheck::Constants - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Formula
-
- - - -
-
Defined in:
-
livecheck/constants.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

The Constants module provides constants that are intended to be used -in livecheck block values (e.g. url, regex).

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
LATEST_VERSION = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A placeholder string used in resource livecheck block URLs that will -be replaced with the latest version from the main formula check.

- - -
-
-
- - -
-
-
"<FORMULA_LATEST_VERSION>"
- -
- - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Error.html b/docs/Homebrew/Livecheck/Error.html deleted file mode 100644 index bd86ac86c..000000000 --- a/docs/Homebrew/Livecheck/Error.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - Exception: Homebrew::Livecheck::Error - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Homebrew::Livecheck::Error - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/error.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error during a livecheck run.

- - -
-
-
- - -
- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/LivecheckVersion.html b/docs/Homebrew/Livecheck/LivecheckVersion.html deleted file mode 100644 index 4270068a2..000000000 --- a/docs/Homebrew/Livecheck/LivecheckVersion.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::LivecheckVersion - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::LivecheckVersion - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Comparable
-
- - - - - - -
-
Defined in:
-
livecheck/livecheck_version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A formula or cask version, split into its component sub-versions.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(versions) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'livecheck/livecheck_version.rb', line 29
-
-def initialize(versions)
-  @versions = versions
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #versionsArray<Version> (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'livecheck/livecheck_version.rb', line 26
-
-def versions
-  @versions
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .create(package_or_resource, version) ⇒ LivecheckVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-
-
# File 'livecheck/livecheck_version.rb', line 13
-
-def self.create(package_or_resource, version)
-  versions = case package_or_resource
-  when Formula, Resource
-    [version]
-  when Cask::Cask
-    version.to_s.split(",").map { |s| Version.new(s) }
-  else
-    T.absurd(package_or_resource)
-  end
-  new(versions)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/SkipConditions.html b/docs/Homebrew/Livecheck/SkipConditions.html deleted file mode 100644 index df2bfe029..000000000 --- a/docs/Homebrew/Livecheck/SkipConditions.html +++ /dev/null @@ -1,2185 +0,0 @@ - - - - - - - Module: Homebrew::Livecheck::SkipConditions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Livecheck::SkipConditions - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
livecheck/skip_conditions.rb,
- livecheck/livecheck.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

The Livecheck::SkipConditions module primarily contains methods that -check for various formula/cask/resource conditions where a check should be skipped.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
FORMULA_CHECKS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Skip conditions for formulae.

- - -
-
-
- - -
-
-
[
-  :package_or_resource_skip,
-  :formula_head_only,
-  :formula_deprecated,
-  :formula_disabled,
-  :formula_versioned,
-].freeze
- -
CASK_CHECKS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Skip conditions for casks.

- - -
-
-
- - -
-
-
[
-  :package_or_resource_skip,
-  :cask_deprecated,
-  :cask_disabled,
-  :cask_extract_plist,
-  :cask_version_latest,
-  :cask_url_unversioned,
-].freeze
- -
RESOURCE_CHECKS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Skip conditions for resources.

- - -
-
-
- - -
-
-
[
-  :package_or_resource_skip,
-].freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .cask_deprecated(cask, livecheckable, full_name: false, verbose: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cask - - - (Cask::Cask) - - - -
  • - -
  • - - livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-118
-119
-120
-121
-122
-
-
# File 'livecheck/skip_conditions.rb', line 118
-
-def cask_deprecated(cask, livecheckable, full_name: false, verbose: false)
-  return {} if !cask.deprecated? || livecheckable
-
-  Livecheck.status_hash(cask, "deprecated", full_name:, verbose:)
-end
-
-
- -
-

- - .cask_disabled(cask, livecheckable, full_name: false, verbose: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cask - - - (Cask::Cask) - - - -
  • - -
  • - - livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-132
-133
-134
-135
-136
-
-
# File 'livecheck/skip_conditions.rb', line 132
-
-def cask_disabled(cask, livecheckable, full_name: false, verbose: false)
-  return {} if !cask.disabled? || livecheckable
-
-  Livecheck.status_hash(cask, "disabled", full_name:, verbose:)
-end
-
-
- -
-

- - .cask_extract_plist(cask, _livecheckable, full_name: false, verbose: false, extract_plist: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cask - - - (Cask::Cask) - - - -
  • - -
  • - - _livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - extract_plist - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-
-
# File 'livecheck/skip_conditions.rb', line 147
-
-def cask_extract_plist(cask, _livecheckable, full_name: false, verbose: false, extract_plist: false)
-  return {} if extract_plist || cask.livecheck.strategy != :extract_plist
-
-  Livecheck.status_hash(
-    cask,
-    "skipped",
-    ["Use `--extract-plist` to enable checking multiple casks with ExtractPlist strategy"],
-    full_name:,
-    verbose:,
-  )
-end
-
-
- -
-

- - .cask_url_unversioned(cask, livecheckable, full_name: false, verbose: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cask - - - (Cask::Cask) - - - -
  • - -
  • - - livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-181
-182
-183
-184
-185
-
-
# File 'livecheck/skip_conditions.rb', line 181
-
-def cask_url_unversioned(cask, livecheckable, full_name: false, verbose: false)
-  return {} if !(cask.present? && cask.url&.unversioned?) || livecheckable
-
-  Livecheck.status_hash(cask, "unversioned", full_name:, verbose:)
-end
-
-
- -
-

- - .cask_version_latest(cask, livecheckable, full_name: false, verbose: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cask - - - (Cask::Cask) - - - -
  • - -
  • - - livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-167
-168
-169
-170
-171
-
-
# File 'livecheck/skip_conditions.rb', line 167
-
-def cask_version_latest(cask, livecheckable, full_name: false, verbose: false)
-  return {} if !(cask.present? && cask.version&.latest?) || livecheckable
-
-  Livecheck.status_hash(cask, "latest", full_name:, verbose:)
-end
-
-
- -
-

- - .formula_deprecated(formula, livecheckable, full_name: false, verbose: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-76
-77
-78
-79
-80
-
-
# File 'livecheck/skip_conditions.rb', line 76
-
-def formula_deprecated(formula, livecheckable, full_name: false, verbose: false)
-  return {} if !formula.deprecated? || livecheckable
-
-  Livecheck.status_hash(formula, "deprecated", full_name:, verbose:)
-end
-
-
- -
-

- - .formula_disabled(formula, livecheckable, full_name: false, verbose: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-93
-94
-
-
# File 'livecheck/skip_conditions.rb', line 90
-
-def formula_disabled(formula, livecheckable, full_name: false, verbose: false)
-  return {} if !formula.disabled? || livecheckable
-
-  Livecheck.status_hash(formula, "disabled", full_name:, verbose:)
-end
-
-
- -
-

- - .formula_head_only(formula, _livecheckable, full_name: false, verbose: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - _livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'livecheck/skip_conditions.rb', line 56
-
-def formula_head_only(formula, _livecheckable, full_name: false, verbose: false)
-  return {} if !formula.head_only? || formula.any_version_installed?
-
-  Livecheck.status_hash(
-    formula,
-    "error",
-    ["HEAD only formula must be installed to be livecheckable"],
-    full_name:,
-    verbose:,
-  )
-end
-
-
- -
-

- - .formula_versioned(formula, livecheckable, full_name: false, verbose: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-104
-105
-106
-107
-108
-
-
# File 'livecheck/skip_conditions.rb', line 104
-
-def formula_versioned(formula, livecheckable, full_name: false, verbose: false)
-  return {} if !formula.versioned_formula? || livecheckable
-
-  Livecheck.status_hash(formula, "versioned", full_name:, verbose:)
-end
-
-
- -
-

- - .package_or_resource_skip(package_or_resource, livecheckable, full_name: false, verbose: false) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - package_or_resource - - - (Formula, Cask::Cask, Resource) - - - -
  • - -
  • - - livecheckable - - - (Boolean) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-
-
# File 'livecheck/skip_conditions.rb', line 19
-
-def package_or_resource_skip(package_or_resource, livecheckable, full_name: false, verbose: false)
-  formula = package_or_resource if package_or_resource.is_a?(Formula)
-
-  if (stable_url = formula&.stable&.url)
-    stable_is_gist = stable_url.match?(%r{https?://gist\.github(?:usercontent)?\.com/}i)
-    stable_from_google_code_archive = stable_url.match?(
-      %r{https?://storage\.googleapis\.com/google-code-archive-downloads/}i,
-    )
-    stable_from_internet_archive = stable_url.match?(%r{https?://web\.archive\.org/}i)
-  end
-
-  skip_message = if package_or_resource.livecheck.skip_msg.present?
-    package_or_resource.livecheck.skip_msg
-  elsif !livecheckable
-    if stable_from_google_code_archive
-      "Stable URL is from Google Code Archive"
-    elsif stable_from_internet_archive
-      "Stable URL is from Internet Archive"
-    elsif stable_is_gist
-      "Stable URL is a GitHub Gist"
-    end
-  end
-
-  return {} if !package_or_resource.livecheck.skip? && skip_message.blank?
-
-  skip_messages = skip_message ? [skip_message] : nil
-  Livecheck.status_hash(package_or_resource, "skipped", skip_messages, full_name:, verbose:)
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Prints default livecheck output in relation to skip conditions.

- - -
-
-
-

Parameters:

-
    - -
  • - - skip_hash - - - (Hash) - - - -
  • - -
- - -
- - - - -
-
-
-
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-
-
# File 'livecheck/skip_conditions.rb', line 303
-
-def print_skip_information(skip_hash)
-  return unless skip_hash.is_a?(Hash)
-
-  name = if skip_hash[:formula].is_a?(String)
-    skip_hash[:formula]
-  elsif skip_hash[:cask].is_a?(String)
-    skip_hash[:cask]
-  elsif skip_hash[:resource].is_a?(String)
-    "  #{skip_hash[:resource]}"
-  end
-  return unless name
-
-  if skip_hash[:messages].is_a?(Array) && skip_hash[:messages].count.positive?
-    # TODO: Handle multiple messages, only if needed in the future
-    if skip_hash[:status] == "skipped"
-      puts "#{Tty.red}#{name}#{Tty.reset}: skipped - #{skip_hash[:messages][0]}"
-    else
-      puts "#{Tty.red}#{name}#{Tty.reset}: #{skip_hash[:messages][0]}"
-    end
-  elsif skip_hash[:status].present?
-    puts "#{Tty.red}#{name}#{Tty.reset}: #{skip_hash[:status]}"
-  end
-end
-
-
- -
-

- - .referenced_skip_information(livecheck_package_or_resource, original_package_or_resource_name, full_name: false, verbose: false, extract_plist: true) ⇒ Hash? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Skip conditions for formulae/casks/resources referenced in a livecheck block -are treated differently than normal. We only respect certain skip -conditions (returning the related hash) and others are treated as -errors.

- - -
-
-
-

Parameters:

-
    - -
  • - - livecheck_package_or_resource - - - (Formula, Cask::Cask, Resource) - - - -
  • - -
  • - - original_package_or_resource_name - - - (String) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - extract_plist - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-
-
# File 'livecheck/skip_conditions.rb', line 261
-
-def referenced_skip_information(
-  livecheck_package_or_resource,
-  original_package_or_resource_name,
-  full_name: false,
-  verbose: false,
-  extract_plist: true
-)
-  skip_info = SkipConditions.skip_information(
-    livecheck_package_or_resource,
-    full_name:,
-    verbose:,
-    extract_plist:,
-  )
-  return if skip_info.blank?
-
-  referenced_name = Livecheck.package_or_resource_name(livecheck_package_or_resource, full_name:)
-  referenced_type = case livecheck_package_or_resource
-  when Formula
-    :formula
-  when Cask::Cask
-    :cask
-  when Resource
-    :resource
-  end
-
-  if skip_info[:status] != "error" &&
-     !(skip_info[:status] == "skipped" && livecheck_package_or_resource.livecheck.skip?)
-    error_msg_end = if skip_info[:status] == "skipped"
-      "automatically skipped"
-    else
-      "skipped as #{skip_info[:status]}"
-    end
-
-    raise "Referenced #{referenced_type} (#{referenced_name}) is #{error_msg_end}"
-  end
-
-  skip_info[referenced_type] = original_package_or_resource_name
-  skip_info
-end
-
-
- -
-

- - .skip_information(package_or_resource, full_name: false, verbose: false, extract_plist: true) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If a formula/cask/resource should be skipped, we return a hash from -Livecheck#status_hash, which contains a status type and sometimes -error messages.

- - -
-
-
-

Parameters:

-
    - -
  • - - package_or_resource - - - (Formula, Cask::Cask, Resource) - - - -
  • - -
  • - - full_name - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - extract_plist - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-
-
# File 'livecheck/skip_conditions.rb', line 222
-
-def skip_information(package_or_resource, full_name: false, verbose: false, extract_plist: true)
-  livecheckable = package_or_resource.livecheckable?
-
-  checks = case package_or_resource
-  when Formula
-    FORMULA_CHECKS
-  when Cask::Cask
-    CASK_CHECKS
-  when Resource
-    RESOURCE_CHECKS
-  end
-  return {} unless checks
-
-  checks.each do |method_name|
-    skip_hash = case method_name
-    when :cask_extract_plist
-      send(method_name, package_or_resource, livecheckable, full_name:, verbose:, extract_plist:)
-    else
-      send(method_name, package_or_resource, livecheckable, full_name:, verbose:)
-    end
-    return skip_hash if skip_hash.present?
-  end
-
-  {}
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy.html b/docs/Homebrew/Livecheck/Strategy.html deleted file mode 100644 index 266decbdc..000000000 --- a/docs/Homebrew/Livecheck/Strategy.html +++ /dev/null @@ -1,1229 +0,0 @@ - - - - - - - Module: Homebrew::Livecheck::Strategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Livecheck::Strategy - - - Private -

-
- - - - -
-
Extended by:
-
Utils::Curl
-
- - - - - - - - -
-
Defined in:
-
livecheck/strategy.rb,
- livecheck/strategy/git.rb,
livecheck/strategy/gnu.rb,
livecheck/strategy/npm.rb,
livecheck/strategy/xml.rb,
livecheck/strategy/cpan.rb,
livecheck/strategy/json.rb,
livecheck/strategy/pypi.rb,
livecheck/strategy/xorg.rb,
livecheck/strategy/yaml.rb,
livecheck/strategy/crate.rb,
livecheck/strategy/gnome.rb,
livecheck/strategy/apache.rb,
livecheck/strategy/hackage.rb,
livecheck/strategy/sparkle.rb,
livecheck/strategy/bitbucket.rb,
livecheck/strategy/launchpad.rb,
livecheck/strategy/page_match.rb,
livecheck/strategy/sourceforge.rb,
livecheck/strategy/header_match.rb,
livecheck/strategy/extract_plist.rb,
livecheck/strategy/github_latest.rb,
livecheck/strategy/github_releases.rb,
livecheck/strategy/electron_builder.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

The Livecheck::Strategy module contains the various strategies as well -as some general-purpose methods for working with them. Within the context -of the brew livecheck command, strategies are established procedures -for finding new software versions at a given source.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Apache, Bitbucket, Cpan, Crate, ElectronBuilder, ExtractPlist, Git, GithubLatest, GithubReleases, Gnome, Gnu, Hackage, HeaderMatch, Json, Launchpad, Npm, PageMatch, Pypi, Sourceforge, Sparkle, Xml, Xorg, Yaml - - -

- - -

- Constant Summary - collapse -

- -
- -
DEFAULT_PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Homebrew::Livecheck::Strategy priorities informally range from 1 to 10, where 10 is the -highest priority. 5 is the default priority because it's roughly in -the middle of this range. Strategies with a priority of 0 (or lower) -are ignored.

- - -
-
-
- - -
-
-
5
- -
CURL_CONNECT_TIMEOUT = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

cURL's default --connect-timeout value can be up to two minutes, so -we need to use a more reasonable duration (in seconds) to avoid a -lengthy wait when a connection can't be established.

- - -
-
-
- - -
-
-
10
- -
CURL_MAX_TIME = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

cURL does not set a default --max-time value, so we provide a value -to ensure cURL will time out in a reasonable amount of time.

- - -
-
-
- - -
-
-
CURL_CONNECT_TIMEOUT + 5
- -
CURL_PROCESS_TIMEOUT = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The curl process will sometimes hang indefinitely (despite setting -the --max-time argument) and it needs to be quit for livecheck to -continue. This value is used to set the timeout argument on -Utils::Curl method calls in Homebrew::Livecheck::Strategy.

- - -
-
-
- - -
-
-
CURL_MAX_TIME + 5
- -
MAX_REDIRECTIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The maximum number of redirections that curl should allow.

- - -
-
-
- - -
-
-
5
- -
MAX_PARSE_ITERATIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

This value is passed to #parse_curl_output to ensure that the limit -for the number of responses it will parse corresponds to the maximum -number of responses in this context. The + 1 here accounts for the -situation where there are exactly MAX_REDIRECTIONS number of -redirections, followed by a final 200 OK response.

- - -
-
-
- - -
-
-
MAX_REDIRECTIONS + 1
- -
DEFAULT_CURL_ARGS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Baseline curl arguments used in Homebrew::Livecheck::Strategy methods.

- - -
-
-
- - -
-
-
[
-  # Follow redirections to handle mirrors, relocations, etc.
-  "--location",
-  "--max-redirs", MAX_REDIRECTIONS.to_s,
-  # Avoid progress bar text, so we can reliably identify `curl` error
-  # messages in output
-  "--silent"
-].freeze
- -
PAGE_CONTENT_CURL_ARGS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

curl arguments used in Strategy#page_content method.

- - -
-
-
- - -
-
-
([
-  "--compressed",
-  # Return an error when the HTTP response code is 400 or greater but
-  # continue to return body content
-  "--fail-with-body",
-  # Include HTTP response headers in output, so we can identify the
-  # final URL after any redirections
-  "--include",
-] + DEFAULT_CURL_ARGS).freeze
- -
DEFAULT_CURL_OPTIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Baseline curl options used in Homebrew::Livecheck::Strategy methods.

- - -
-
-
- - -
-
-
{
-  print_stdout:    false,
-  print_stderr:    false,
-  debug:           false,
-  verbose:         false,
-  timeout:         CURL_PROCESS_TIMEOUT,
-  connect_timeout: CURL_CONNECT_TIMEOUT,
-  max_time:        CURL_MAX_TIME,
-  retries:         0,
-}.freeze
- -
TARBALL_EXTENSION_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A regex used to identify a tarball extension at the end of a string.

- - -
-
-
- - -
-
-
/
-  \.t
-  (?:ar(?:\.(?:bz2|gz|lz|lzma|lzo|xz|Z|zst))?|
-  b2|bz2?|z2|az|gz|lz|lzma|xz|Z|aZ|zst)
-  $
-/ix
- -
INVALID_BLOCK_RETURN_VALUE_MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

An error message to use when a strategy block returns a value of -an inappropriate type.

- - -
-
-
- - -
-
-
"Return value of a strategy block must be a string or array of strings."
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .from_symbol(symbol) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the strategy that corresponds to the provided Symbol (or -nil if there is no matching strategy).

- - -
-
-
-

Parameters:

-
    - -
  • - - symbol - - - (Symbol, nil) - - - - — -

    the strategy name in snake case as a -Symbol (e.g. :page_match)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-121
-122
-123
-
-
# File 'livecheck/strategy.rb', line 121
-
-def from_symbol(symbol)
-  strategies[symbol] if symbol.present?
-end
-
-
- -
-

- - .from_url(url, livecheck_strategy: nil, url_provided: false, regex_provided: false, block_provided: false) ⇒ Array<T.untyped> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns an array of strategies that apply to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to check for matching strategies

    -
    - -
  • - -
  • - - livecheck_strategy - - - (Symbol, nil) - - - (defaults to: nil) - - - — -

    a strategy symbol from the -livecheck block

    -
    - -
  • - -
  • - - url_provided - - - (Boolean) - - - (defaults to: false) - - - — -

    whether a url is provided in the -livecheck block

    -
    - -
  • - -
  • - - regex_provided - - - (Boolean) - - - (defaults to: false) - - - — -

    whether a regex is provided in the -livecheck block

    -
    - -
  • - -
  • - - block_provided - - - (Boolean) - - - (defaults to: false) - - - — -

    whether a strategy block is provided -in the livecheck block

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array<T.untyped>) - - - -
  • - -
- -
- - - - -
-
-
-
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-
-
# File 'livecheck/strategy.rb', line 146
-
-def from_url(url, livecheck_strategy: nil, url_provided: false, regex_provided: false, block_provided: false)
-  usable_strategies = strategies.select do |strategy_symbol, strategy|
-    if strategy == PageMatch
-      # Only treat the strategy as usable if the `livecheck` block
-      # contains a regex and/or `strategy` block
-      next if !regex_provided && !block_provided
-    elsif [Json, Xml, Yaml].include?(strategy)
-      # Only treat the strategy as usable if the `livecheck` block
-      # specifies the strategy and contains a `strategy` block
-      next if (livecheck_strategy != strategy_symbol) || !block_provided
-    elsif strategy.const_defined?(:PRIORITY) &&
-          !strategy.const_get(:PRIORITY).positive? &&
-          livecheck_strategy != strategy_symbol
-      # Ignore strategies with a priority of 0 or lower, unless the
-      # strategy is specified in the `livecheck` block
-      next
-    end
-
-    strategy.respond_to?(:match?) && strategy.match?(url)
-  end.values
-
-  # Sort usable strategies in descending order by priority, using the
-  # DEFAULT_PRIORITY when a strategy doesn't contain a PRIORITY constant
-  usable_strategies.sort_by do |strategy|
-    (strategy.const_defined?(:PRIORITY) ? -strategy.const_get(:PRIORITY) : -DEFAULT_PRIORITY)
-  end
-end
-
-
- -
-

- - .handle_block_return(value) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Handles the return value from a strategy block in a livecheck -block.

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (T.untyped) - - - - — -

    [] the return value from a strategy block

    -
    - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-
-
# File 'livecheck/strategy.rb', line 251
-
-def self.handle_block_return(value)
-  case value
-  when String
-    [value]
-  when Array
-    value.compact.uniq
-  when nil
-    []
-  else
-    raise TypeError, INVALID_BLOCK_RETURN_VALUE_MSG
-  end
-end
-
-
- -
-

- - .page_content(url, homebrew_curl: false) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Fetches the content at the URL and returns a hash containing the -content and, if there are any redirections, the final URL. -If curl encounters an error, the hash will contain a :messages -array with the error message instead.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - homebrew_curl - - - (Boolean) - - - (defaults to: false) - - - — -

    whether to use brewed curl with the URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-
-
# File 'livecheck/strategy.rb', line 216
-
-def self.page_content(url, homebrew_curl: false)
-  stderr = T.let(nil, T.nilable(String))
-  [:default, :browser].each do |user_agent|
-    stdout, stderr, status = curl_output(
-      *PAGE_CONTENT_CURL_ARGS, url,
-      **DEFAULT_CURL_OPTIONS,
-      use_homebrew_curl: homebrew_curl || !curl_supports_fail_with_body?,
-      user_agent:
-    )
-    next unless status.success?
-
-    # stdout contains the header information followed by the page content.
-    # We use #scrub here to avoid "invalid byte sequence in UTF-8" errors.
-    output = stdout.scrub
-
-    # Separate the head(s)/body and identify the final URL (after any
-    # redirections)
-    parsed_output = parse_curl_output(output, max_iterations: MAX_PARSE_ITERATIONS)
-    final_url = curl_response_last_location(parsed_output[:responses], absolutize: true, base_url: url)
-
-    data = { content: parsed_output[:body] }
-    data[:final_url] = final_url if final_url.present? && final_url != url
-    return data
-  end
-
-  error_msgs = stderr&.scan(/^curl:.+$/)
-  { messages: error_msgs.presence || ["cURL failed without a detectable error"] }
-end
-
-
- -
-

- - .page_headers(url, homebrew_curl: false) ⇒ Array<Hash{String => String}> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Collects HTTP response headers, starting with the provided URL. -Redirections will be followed and all the response headers are -collected into an array of hashes.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to fetch

    -
    - -
  • - -
  • - - homebrew_curl - - - (Boolean) - - - (defaults to: false) - - - — -

    whether to use brewed curl with the URL

    -
    - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-
-
# File 'livecheck/strategy.rb', line 182
-
-def self.page_headers(url, homebrew_curl: false)
-  headers = []
-
-  [:default, :browser].each do |user_agent|
-    begin
-      parsed_output = curl_headers(
-        "--max-redirs",
-        MAX_REDIRECTIONS.to_s,
-        url,
-        wanted_headers:    ["location", "content-disposition"],
-        use_homebrew_curl: homebrew_curl,
-        user_agent:,
-        **DEFAULT_CURL_OPTIONS,
-      )
-    rescue ErrorDuringExecution
-      next
-    end
-
-    parsed_output[:responses].each { |response| headers << response[:headers] }
-    break if headers.present?
-  end
-
-  headers
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Apache.html b/docs/Homebrew/Livecheck/Strategy/Apache.html deleted file mode 100644 index a7c203dc2..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Apache.html +++ /dev/null @@ -1,591 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Apache - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Apache - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/apache.rb
-
- -
- -

Overview

-
-

The Apache strategy identifies versions of software at apache.org -by checking directory listing pages.

- -

Most Apache URLs start with https://www.apache.org/dyn/ and include -a filename or path query string parameter where the value is a -path to a file. The path takes one of the following formats:

- -
    -
  • example/1.2.3/example-1.2.3.tar.gz
  • -
  • example/example-1.2.3/example-1.2.3.tar.gz
  • -
  • example/example-1.2.3-bin.tar.gz
  • -
- -

This strategy also handles a few common mirror/backup URLs where the -path is provided outside of a query string parameter (e.g. -https://archive.apache.org/dist/example/1.2.3/example-1.2.3.tar.gz).

- -

When the path contains a version directory (e.g. /1.2.3/, -/example-1.2.3/, etc.), the default regex matches numeric versions -in directory names. Otherwise, the default regex matches numeric -versions in filenames.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://
-  (?:www\.apache\.org/dyn/.+(?:path|filename)=/?|
-  archive\.apache\.org/dist/|
-  dlcdn\.apache\.org/|
-  downloads\.apache\.org/)
-  (?<path>.+?)/      # Path to directory of files or version directories
-  (?<prefix>[^/]*?)  # Any text in filename or directory before version
-  v?\d+(?:\.\d+)+    # The numeric version
-  (?<suffix>/|[^/]*) # Any text in filename or directory after version
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-
-
# File 'livecheck/strategy/apache.rb', line 97
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-
-  PageMatch.find_versions(url: generated[:url], regex: regex || generated[:regex], **unused, &block)
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-
-
# File 'livecheck/strategy/apache.rb', line 59
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.match(URL_MATCH_REGEX)
-  return values if match.blank?
-
-  # Example URL: `https://archive.apache.org/dist/example/`
-  values[:url] = "https://archive.apache.org/dist/#{match[:path]}/"
-
-  regex_prefix = Regexp.escape(match[:prefix] || "").gsub("\\-", "-")
-
-  # Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
-  suffix = match[:suffix]&.sub(Strategy::TARBALL_EXTENSION_REGEX, ".t")
-  regex_suffix = Regexp.escape(suffix || "").gsub("\\-", "-")
-
-  # Example directory regex: `%r{href=["']?v?(\d+(?:\.\d+)+)/}i`
-  # Example file regexes:
-  # * `/href=["']?example-v?(\d+(?:\.\d+)+)\.t/i`
-  # * `/href=["']?example-v?(\d+(?:\.\d+)+)-bin\.zip/i`
-  values[:regex] = /href=["']?#{regex_prefix}v?(\d+(?:\.\d+)+)#{regex_suffix}/i
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'livecheck/strategy/apache.rb', line 47
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Bitbucket.html b/docs/Homebrew/Livecheck/Strategy/Bitbucket.html deleted file mode 100644 index f20ad863a..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Bitbucket.html +++ /dev/null @@ -1,608 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Bitbucket - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Bitbucket - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/bitbucket.rb
-
- -
- -

Overview

-
-

The Bitbucket strategy identifies versions of software at -bitbucket.org by checking a repository's available downloads.

- -

Bitbucket URLs generally take one of the following formats:

- -
    -
  • https://bitbucket.org/example/example/get/1.2.3.tar.gz
  • -
  • https://bitbucket.org/example/example/downloads/example-1.2.3.tar.gz
  • -
- -

The /get/ archive files are simply automated snapshots of the files -for a given tag. The /downloads/ archive files are files that have -been uploaded instead.

- -

It's also possible for an archive to come from a repository's wiki, -like: -https://bitbucket.org/example/example/wiki/downloads/example-1.2.3.zip. -This scenario is handled by this strategy as well and the path in -this example would be example/example/wiki (instead of -example/example with the previous URLs).

- -

The default regex identifies versions in archive files found in href -attributes.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://bitbucket\.org
-  /(?<path>.+?) # The path leading up to the get or downloads part
-  /(?<dl_type>get|downloads) # An indicator of the file download type
-  /(?<prefix>(?:[^/]+?[_-])?) # Filename text before the version
-  v?\d+(?:\.\d+)+ # The numeric version
-  (?<suffix>[^/]+) # Filename text after the version
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-
-
# File 'livecheck/strategy/bitbucket.rb', line 105
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-
-  PageMatch.find_versions(url: generated[:url], regex: regex || generated[:regex], **unused, &block)
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-
-
# File 'livecheck/strategy/bitbucket.rb', line 58
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.match(URL_MATCH_REGEX)
-  return values if match.blank?
-
-  regex_prefix = Regexp.escape(T.must(match[:prefix])).gsub("\\-", "-")
-
-  # `/get/` archives are Git tag snapshots, so we need to check that tab
-  # instead of the main `/downloads/` page
-  if match[:dl_type] == "get"
-    values[:url] = "https://bitbucket.org/#{match[:path]}/downloads/?tab=tags"
-
-    # Example tag regexes:
-    # * `/<td[^>]*?class="name"[^>]*?>\s*v?(\d+(?:\.\d+)+)\s*?</im`
-    # * `/<td[^>]*?class="name"[^>]*?>\s*abc-v?(\d+(?:\.\d+)+)\s*?</im`
-    values[:regex] = /<td[^>]*?class="name"[^>]*?>\s*#{regex_prefix}v?(\d+(?:\.\d+)+)\s*?</im
-  else
-    values[:url] = "https://bitbucket.org/#{match[:path]}/downloads/"
-
-    # Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
-    suffix = T.must(match[:suffix]).sub(Strategy::TARBALL_EXTENSION_REGEX, ".t")
-    regex_suffix = Regexp.escape(suffix).gsub("\\-", "-")
-
-    # Example file regexes:
-    # * `/href=.*?v?(\d+(?:\.\d+)+)\.t/i`
-    # * `/href=.*?abc-v?(\d+(?:\.\d+)+)\.t/i`
-    values[:regex] = /href=.*?#{regex_prefix}v?(\d+(?:\.\d+)+)#{regex_suffix}/i
-  end
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-
-
# File 'livecheck/strategy/bitbucket.rb', line 46
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Cpan.html b/docs/Homebrew/Livecheck/Strategy/Cpan.html deleted file mode 100644 index 0f025c683..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Cpan.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Cpan - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Cpan - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/cpan.rb
-
- -
- -

Overview

-
-

The Cpan strategy identifies versions of software at -cpan.metacpan.org by checking directory listing pages.

- -

CPAN URLs take the following formats:

- -
    -
  • https://cpan.metacpan.org/authors/id/H/HO/HOMEBREW/Brew-v1.2.3.tar.gz
  • -
  • https://cpan.metacpan.org/authors/id/H/HO/HOMEBREW/brew/brew-v1.2.3.tar.gz
  • -
- -

In these examples, HOMEBREW is the author name and the preceding H -and HO directories correspond to the first letter(s). Some authors -also store files in subdirectories, as in the second example above.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"CPAN"
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://cpan\.metacpan\.org
-  (?<path>/authors/id(?:/[^/]+){3,}/) # Path before the filename
-  (?<prefix>[^/]+) # Filename text before the version
-  -v?\d+(?:\.\d+)* # The numeric version
-  (?<suffix>[^/]+) # Filename text after the version
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-85
-86
-87
-88
-
-
# File 'livecheck/strategy/cpan.rb', line 84
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-
-  PageMatch.find_versions(url: generated[:url], regex: regex || generated[:regex], **unused, &block)
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-
-
# File 'livecheck/strategy/cpan.rb', line 49
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.match(URL_MATCH_REGEX)
-  return values if match.blank?
-
-  # The directory listing page where the archive files are found
-  values[:url] = "https://cpan.metacpan.org#{match[:path]}"
-
-  regex_prefix = Regexp.escape(T.must(match[:prefix])).gsub("\\-", "-")
-
-  # Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
-  suffix = T.must(match[:suffix]).sub(Strategy::TARBALL_EXTENSION_REGEX, ".t")
-  regex_suffix = Regexp.escape(suffix).gsub("\\-", "-")
-
-  # Example regex: `/href=.*?Brew[._-]v?(\d+(?:\.\d+)*)\.t/i`
-  values[:regex] = /href=.*?#{regex_prefix}[._-]v?(\d+(?:\.\d+)*)#{regex_suffix}/i
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'livecheck/strategy/cpan.rb', line 37
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Crate.html b/docs/Homebrew/Livecheck/Strategy/Crate.html deleted file mode 100644 index 4fd7f7dcd..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Crate.html +++ /dev/null @@ -1,662 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Crate - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Crate - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/crate.rb
-
- -
- -

Overview

-
-

The Crate strategy identifies versions of a Rust crate by checking -the information from the versions API endpoint.

- -

Crate URLs have the following format: - https://static.crates.io/crates/example/example-1.2.3.crate

- -

The default regex identifies versions like 1.2.3/v1.2.3 from the -version num field. This is a common version format but a different -regex can be provided in a livecheck block to override the default -if a package uses a different format (e.g. 1.2.3d, 1.2.3-4, etc.).

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
DEFAULT_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The default regex used to identify versions when a regex isn't -provided.

- - -
-
-
- - -
-
-
/^v?(\d+(?:\.\d+)+)$/i
- -
DEFAULT_BLOCK = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The default strategy block used to extract version information when -a strategy block isn't provided.

- - -
-
-
- - -
-
-
proc do |json, regex|
-  json["versions"]&.map do |version|
-    next if version["yanked"]
-    next unless (match = version["num"]&.match(regex))
-
-    match[1]
-  end
-end.freeze
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://static\.crates\.io/crates
-  /(?<package>[^/]+) # The name of the package
-  /.+\.crate # The crate filename
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and checks the content at the URL for new versions -using Json.versions_from_content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex for matching versions in content

    -
    - -
  • - -
  • - - provided_content - - - (String, nil) - - - (defaults to: nil) - - - — -

    content to check instead of -fetching

    -
    - -
  • - -
  • - - homebrew_curl - - - (Boolean) - - - (defaults to: false) - - - — -

    whether to use brewed curl with the URL

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-
-
# File 'livecheck/strategy/crate.rb', line 85
-
-def self.find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block)
-  match_data = { matches: {}, regex:, url: }
-  match_data[:cached] = true if provided_content.is_a?(String)
-
-  generated = generate_input_values(url)
-  return match_data if generated.blank?
-
-  match_data[:url] = generated[:url]
-
-  content = if provided_content
-    provided_content
-  else
-    match_data.merge!(Strategy.page_content(match_data[:url], homebrew_curl:))
-    match_data[:content]
-  end
-  return match_data unless content
-
-  Json.versions_from_content(content, regex || DEFAULT_REGEX, &block || DEFAULT_BLOCK).each do |match_text|
-    match_data[:matches][match_text] = Version.new(match_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'livecheck/strategy/crate.rb', line 57
-
-def self.generate_input_values(url)
-  values = {}
-  return values unless (match = url.match(URL_MATCH_REGEX))
-
-  values[:url] = "https://crates.io/api/v1/crates/#{match[:package]}/versions"
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'livecheck/strategy/crate.rb', line 47
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/ElectronBuilder.html b/docs/Homebrew/Livecheck/Strategy/ElectronBuilder.html deleted file mode 100644 index 0671e6de3..000000000 --- a/docs/Homebrew/Livecheck/Strategy/ElectronBuilder.html +++ /dev/null @@ -1,503 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::ElectronBuilder - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::ElectronBuilder - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/electron_builder.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

The ElectronBuilder strategy fetches content at a URL and parses it -as an electron-builder appcast in YAML format.

- -

This strategy is not applied automatically and it's necessary to use -strategy :electron_builder in a livecheck block to apply it.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"electron-builder"
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::ElectronBuilder so we can selectively apply it when appropriate.

- - -
-
-
- - -
-
-
0
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{^https?://.+/[^/]+\.ya?ml(?:\?[^/?]+)?$}i
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, provided_content: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks the YAML content at the URL for new versions.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions

    -
    - -
  • - -
  • - - provided_content - - - (String, nil) - - - (defaults to: nil) - - - — -

    content to use in place of -fetching via Strategy#page_content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'livecheck/strategy/electron_builder.rb', line 47
-
-def self.find_versions(url:, regex: nil, provided_content: nil, **unused, &block)
-  if regex.present? && block.blank?
-    raise ArgumentError,
-          "#{Utils.demodulize(T.must(name))} only supports a regex when using a `strategy` block"
-  end
-
-  Yaml.find_versions(
-    url:,
-    regex:,
-    provided_content:,
-    **unused,
-    &block || proc { |yaml| yaml["version"] }
-  )
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'livecheck/strategy/electron_builder.rb', line 27
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/ExtractPlist.html b/docs/Homebrew/Livecheck/Strategy/ExtractPlist.html deleted file mode 100644 index e9106c50f..000000000 --- a/docs/Homebrew/Livecheck/Strategy/ExtractPlist.html +++ /dev/null @@ -1,671 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::ExtractPlist - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::ExtractPlist - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/extract_plist.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

The ExtractPlist strategy downloads the file at a URL and extracts -versions from contained .plist files using UnversionedCaskChecker.

- -

In practice, this strategy operates by downloading very large files, -so it's both slow and data-intensive. As such, the ExtractPlist -strategy should only be used as an absolute last resort.

- -

This strategy is not applied automatically and it's necessary to use -strategy :extract_plist in a livecheck block to apply it.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Item - - -

- - -

- Constant Summary - collapse -

- -
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::ExtractPlist so we can selectively apply it when appropriate.

- - -
-
-
- - -
-
-
0
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{^https?://}i
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(cask:, url: nil, regex: nil, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Uses UnversionedCaskChecker on the provided cask to identify -versions from plist files.

- - -
-
-
-

Parameters:

-
    - -
  • - - cask - - - (Cask::Cask) - - - - — -

    the cask to check for version information

    -
    - -
  • - -
  • - - url - - - (String, nil) - - - (defaults to: nil) - - - — -

    an alternative URL to check for version -information

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex for use in a strategy block

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-
-
# File 'livecheck/strategy/extract_plist.rb', line 92
-
-def self.find_versions(cask:, url: nil, regex: nil, **_unused, &block)
-  if regex.present? && block.blank?
-    raise ArgumentError,
-          "#{Utils.demodulize(T.must(name))} only supports a regex when using a `strategy` block"
-  end
-  unless T.unsafe(cask)
-    raise ArgumentError, "The #{Utils.demodulize(T.must(name))} strategy only supports casks."
-  end
-
-  match_data = { matches: {}, regex:, url: }
-
-  unversioned_cask_checker = if url.present? && url != cask.url.to_s
-    # Create a copy of the `cask` that uses the `livecheck` block URL
-    cask_copy = Cask::CaskLoader.load(cask.sourcefile_path)
-    cask_copy.allow_reassignment = true
-    cask_copy.url { url }
-    UnversionedCaskChecker.new(cask_copy)
-  else
-    UnversionedCaskChecker.new(cask)
-  end
-
-  items = unversioned_cask_checker.all_versions.transform_values { |v| Item.new(bundle_version: v) }
-
-  versions_from_items(items, regex, &block).each do |version_text|
-    match_data[:matches][version_text] = Version.new(version_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'livecheck/strategy/extract_plist.rb', line 32
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
-

- - .versions_from_items(items, regex = nil, &block) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Identify versions from Items produced using -UnversionedCaskChecker version information.

- - -
-
-
-

Parameters:

-
    - -
  • - - items - - - (Hash{String => Item}) - - - - — -

    a hash of Items containing version information

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex for use in a strategy block

    -
    - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# File 'livecheck/strategy/extract_plist.rb', line 64
-
-def self.versions_from_items(items, regex = nil, &block)
-  if block
-    block_return_value = regex.present? ? yield(items, regex) : yield(items)
-    return Strategy.handle_block_return(block_return_value)
-  end
-
-  items.filter_map do |_key, item|
-    item.bundle_version.nice_version
-  end.uniq
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/ExtractPlist/Item.html b/docs/Homebrew/Livecheck/Strategy/ExtractPlist/Item.html deleted file mode 100644 index 12cbe235f..000000000 --- a/docs/Homebrew/Livecheck/Strategy/ExtractPlist/Item.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::ExtractPlist::Item - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::ExtractPlist::Item - - - Private -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
livecheck/strategy/extract_plist.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - - - -
-

Instance Attribute Details

- - - -
-

- - #bundle_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute bundle_version

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of bundle_version

    -
    - -
  • - -
- -
- - - - -
-
-
-
-36
-37
-38
-
-
# File 'livecheck/strategy/extract_plist.rb', line 36
-
-def bundle_version
-  @bundle_version
-end
-
-
- - - -
-

- - #short_versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-48
-
-
# File 'livecheck/strategy/extract_plist.rb', line 48
-
-delegate short_version: :bundle_version
-
-
- - - -
-

- - #versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-44
-
-
# File 'livecheck/strategy/extract_plist.rb', line 44
-
-delegate version: :bundle_version
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Git.html b/docs/Homebrew/Livecheck/Strategy/Git.html deleted file mode 100644 index 85c42fc54..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Git.html +++ /dev/null @@ -1,827 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Git - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Git - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
livecheck/strategy/git.rb
-
- -
- -

Overview

-
-

The Git strategy identifies versions of software in a Git repository -by checking the tags using git ls-remote --tags.

- -

Livecheck has historically prioritized the Git strategy over others -and this behavior was continued when the priority setup was created. -This is partly related to Livecheck checking formula URLs in order of -head, stable and then homepage. The higher priority here may -be removed (or altered) in the future if we reevaluate this particular -behavior.

- -

This strategy does not have a default regex. Instead, it simply removes -any non-digit text from the start of tags and parses the rest as a -Version. This works for some simple situations but even one unusual -tag can cause a bad result. It's better to provide a regex in a -livecheck block, so livecheck only matches what we really want.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The priority of the strategy on an informal scale of 1 to 10 (from -lowest to highest).

- - -
-
-
- - -
-
-
8
- -
DEFAULT_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The default regex used to naively identify versions from tags when a -regex isn't provided.

- - -
-
-
- - -
-
-
/\D*(.+)/
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks the Git tags for new versions. When a regex isn't provided, -this strategy simply removes non-digits from the start of tag -strings and parses the remaining text as a Version.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the Git repository to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-
-
# File 'livecheck/strategy/git.rb', line 132
-
-def self.find_versions(url:, regex: nil, **_unused, &block)
-  match_data = { matches: {}, regex:, url: }
-
-  tags_data = tag_info(url, regex)
-  tags = tags_data[:tags]
-
-  if tags_data.key?(:messages)
-    match_data[:messages] = tags_data[:messages]
-    return match_data if tags.blank?
-  end
-
-  versions_from_tags(tags, regex, &block).each do |version_text|
-    match_data[:matches][version_text] = Version.new(version_text)
-  rescue TypeError
-    next
-  end
-
-  match_data
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'livecheck/strategy/git.rb', line 43
-
-def self.match?(url)
-  (DownloadStrategyDetector.detect(url) <= GitDownloadStrategy) == true
-end
-
-
- -
-

- - .tag_info(url, regex = nil) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Fetches a remote Git repository's tags using git ls-remote --tags -and parses the command's output. If a regex is provided, it will be -used to filter out any tags that don't match it.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the Git repository to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    the regex to use for filtering tags

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-
-
# File 'livecheck/strategy/git.rb', line 55
-
-def self.tag_info(url, regex = nil)
-  stdout, stderr, _status = system_command(
-    "git",
-    args:         ["ls-remote", "--tags", url],
-    env:          { "GIT_TERMINAL_PROMPT" => "0" },
-    print_stdout: false,
-    print_stderr: false,
-    debug:        false,
-    verbose:      false,
-  )
-
-  tags_data = { tags: [] }
-  tags_data[:messages] = stderr.split("\n") if stderr.present?
-  return tags_data if stdout.blank?
-
-  # Isolate tag strings and filter by regex
-  tags = stdout.gsub(%r{^.*\trefs/tags/|\^{}$}, "").split("\n").uniq.sort
-  tags.select! { |t| regex.match?(t) } if regex
-  tags_data[:tags] = tags
-
-  tags_data
-end
-
-
- -
-

- - .versions_from_tags(tags, regex = nil, &block) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Identify versions from tag strings using a provided regex or the -DEFAULT_REGEX. The regex is expected to use a capture group around -the version text.

- - -
-
-
-

Parameters:

-
    - -
  • - - tags - - - (Array<String>) - - - - — -

    the tags to identify versions from

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex to identify versions

    -
    - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-
-
# File 'livecheck/strategy/git.rb', line 92
-
-def self.versions_from_tags(tags, regex = nil, &block)
-  if block
-    block_return_value = if regex.present?
-      yield(tags, regex)
-    elsif block.arity == 2
-      yield(tags, DEFAULT_REGEX)
-    else
-      yield(tags)
-    end
-    return Strategy.handle_block_return(block_return_value)
-  end
-
-  tags.filter_map do |tag|
-    if regex
-      # Use the first capture group (the version)
-      # This code is not typesafe unless the regex includes a capture group
-      T.unsafe(tag.scan(regex).first)&.first
-    else
-      # Remove non-digits from the start of the tag and use that as the
-      # version text
-      tag[DEFAULT_REGEX, 1]
-    end
-  end.uniq
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/GithubLatest.html b/docs/Homebrew/Livecheck/Strategy/GithubLatest.html deleted file mode 100644 index 0db146a42..000000000 --- a/docs/Homebrew/Livecheck/Strategy/GithubLatest.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::GithubLatest - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::GithubLatest - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/github_latest.rb
-
- -
- -

Overview

-
-

The GithubLatest strategy identifies versions of software at -github.com by checking a repository's "latest" release using the -GitHub API.

- -

GitHub URLs take a few different formats:

- -
    -
  • https://github.com/example/example/releases/download/1.2.3/example-1.2.3.tar.gz
  • -
  • https://github.com/example/example/archive/v1.2.3.tar.gz
  • -
  • https://github.com/downloads/example/example/example-1.2.3.tar.gz
  • -
- -

GithubLatest should only be used when the upstream repository has a -"latest" release for a suitable version and the strategy is necessary -or appropriate (e.g. the formula/cask uses a release asset or the -Git strategy returns an unreleased version). The strategy can only -be applied by using strategy :github_latest in a livecheck block.

- -

The default regex identifies versions like 1.2.3/v1.2.3 in a -release's tag or title. This is a common tag format but a modified -regex can be provided in a livecheck block to override the default -if a repository uses a different format (e.g. 1.2.3d, 1.2.3-4, -etc.).

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"GitHub - Latest"
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::GithubLatest so we can selectively apply the strategy using -strategy :github_latest in a livecheck block.

- - -
-
-
- - -
-
-
0
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: GithubReleases::DEFAULT_REGEX, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates the GitHub API URL for the repository's "latest" release -and identifies the version from the JSON response.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp) - - - (defaults to: GithubReleases::DEFAULT_REGEX) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-
-
# File 'livecheck/strategy/github_latest.rb', line 82
-
-def self.find_versions(url:, regex: GithubReleases::DEFAULT_REGEX, **_unused, &block)
-  match_data = { matches: {}, regex:, url: }
-
-  generated = generate_input_values(url)
-  return match_data if generated.blank?
-
-  match_data[:url] = generated[:url]
-
-  release = GitHub.get_latest_release(generated[:username], generated[:repository])
-  GithubReleases.versions_from_content(release, regex, &block).each do |match_text|
-    match_data[:matches][match_text] = Version.new(match_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'livecheck/strategy/github_latest.rb', line 55
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.delete_suffix(".git").match(GithubReleases::URL_MATCH_REGEX)
-  return values if match.blank?
-
-  values[:url] = "https://api.github.com/repos/#{match[:username]}/#{match[:repository]}/releases/latest"
-  values[:username] = match[:username]
-  values[:repository] = match[:repository]
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'livecheck/strategy/github_latest.rb', line 43
-
-def self.match?(url)
-  GithubReleases.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/GithubReleases.html b/docs/Homebrew/Livecheck/Strategy/GithubReleases.html deleted file mode 100644 index 6f4578eb7..000000000 --- a/docs/Homebrew/Livecheck/Strategy/GithubReleases.html +++ /dev/null @@ -1,832 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::GithubReleases - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::GithubReleases - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/github_releases.rb
-
- -
- -

Overview

-
-

The GithubReleases strategy identifies versions of software at -github.com by checking a repository's recent releases using the -GitHub API.

- -

GitHub URLs take a few different formats:

- -
    -
  • https://github.com/example/example/releases/download/1.2.3/example-1.2.3.tar.gz
  • -
  • https://github.com/example/example/archive/v1.2.3.tar.gz
  • -
  • https://github.com/downloads/example/example/example-1.2.3.tar.gz
  • -
- -

GithubReleases should only be used when the upstream repository has -releases for suitable versions and the strategy is necessary or -appropriate (e.g. the formula/cask uses a release asset and the -GithubLatest strategy isn't sufficient to identify the newest version. -The strategy can only be applied by using strategy :github_releases -in a livecheck block.

- -

The default regex identifies versions like 1.2.3/v1.2.3 in each -release's tag or title. This is a common tag format but a modified -regex can be provided in a livecheck block to override the default -if a repository uses a different format (e.g. 1.2.3d, 1.2.3-4, -etc.).

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"GitHub - Releases"
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::GithubReleases so we can selectively apply the strategy using -strategy :github_releases in a livecheck block.

- - -
-
-
- - -
-
-
0
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://github\.com
-  /(?:downloads/)?(?<username>[^/]+) # The GitHub username
-  /(?<repository>[^/]+)              # The GitHub repository name
-}ix
- -
DEFAULT_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The default regex used to identify a version from a tag when a regex -isn't provided.

- - -
-
-
- - -
-
-
/v?(\d+(?:\.\d+)+)/i
- -
VERSION_KEYS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Keys in the release JSON that could contain the version. -The tag name is checked first, to better align with the Homebrew::Livecheck::Strategy::Git -strategy.

- - -
-
-
- - -
-
-
["tag_name", "name"].freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: DEFAULT_REGEX, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates the GitHub API URL for the repository's recent releases -and identifies versions from the JSON response.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp) - - - (defaults to: DEFAULT_REGEX) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-
-
# File 'livecheck/strategy/github_releases.rb', line 136
-
-def self.find_versions(url:, regex: DEFAULT_REGEX, **_unused, &block)
-  match_data = { matches: {}, regex:, url: }
-
-  generated = generate_input_values(url)
-  return match_data if generated.blank?
-
-  match_data[:url] = generated[:url]
-
-  releases = GitHub::API.open_rest(generated[:url])
-  versions_from_content(releases, regex, &block).each do |match_text|
-    match_data[:matches][match_text] = Version.new(match_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-
-
# File 'livecheck/strategy/github_releases.rb', line 72
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.delete_suffix(".git").match(URL_MATCH_REGEX)
-  return values if match.blank?
-
-  values[:url] = "#{GitHub::API_URL}/repos/#{match[:username]}/#{match[:repository]}/releases"
-  values[:username] = match[:username]
-  values[:repository] = match[:repository]
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-
-
# File 'livecheck/strategy/github_releases.rb', line 60
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
-

- - .versions_from_content(content, regex, &block) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Uses a regex to match versions from release JSON or, if a block is -provided, passes the JSON to the block to handle matching. With -either approach, an array of unique matches is returned.

- -

content

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (Array<Hash{String => T.untyped}>, Hash{String => T.untyped}) - - - - — -

    array of releases or a single release

    -
    - -
  • - -
  • - - regex - - - (Regexp) - - - - — -

    a regex used for matching versions in the

    -
    - -
  • - -
  • - - block - - - (Proc, nil) - - - - — -

    a block to match the content

    -
    - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-
-
# File 'livecheck/strategy/github_releases.rb', line 101
-
-def self.versions_from_content(content, regex, &block)
-  if block.present?
-    block_return_value = yield(content, regex)
-    return Strategy.handle_block_return(block_return_value)
-  end
-
-  content = [content] unless content.is_a?(Array)
-  content.compact_blank.filter_map do |release|
-    next if release["draft"] || release["prerelease"]
-
-    value = T.let(nil, T.untyped)
-    VERSION_KEYS.find do |key|
-      match = release[key]&.match(regex)
-      next if match.blank?
-
-      value = match[1]
-    end
-    value
-  end.uniq
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Gnome.html b/docs/Homebrew/Livecheck/Strategy/Gnome.html deleted file mode 100644 index 380041ab0..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Gnome.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Gnome - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Gnome - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/gnome.rb
-
- -
- -

Overview

-
-

The Gnome strategy identifies versions of software at gnome.org by -checking the available downloads found in a project's cache.json -file.

- -

GNOME URLs generally follow a standard format:

- -
    -
  • https://download.gnome.org/sources/example/1.2/example-1.2.3.tar.xz
  • -
- -

Before version 40, GNOME used a version scheme where unstable releases -were indicated with a minor that's 90+ or odd. The newer version scheme -uses trailing alpha/beta/rc text to identify unstable versions -(e.g. 40.alpha).

- -

When a regex isn't provided in a livecheck block, the strategy uses -a default regex that matches versions which don't include trailing text -after the numeric version (e.g. 40.0 instead of 40.alpha) and it -selectively filters out unstable versions below 40 using the rules for -the older version scheme.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"GNOME"
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://download\.gnome\.org
-  /sources
-  /(?<package_name>[^/]+)/ # The GNOME package name
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-
-
# File 'livecheck/strategy/gnome.rb', line 86
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-
-  version_data = PageMatch.find_versions(
-    url:   generated[:url],
-    regex: regex || generated[:regex],
-    **unused,
-    &block
-  )
-
-  if regex.blank?
-    # Filter out unstable versions using the old version scheme where
-    # the major version is below 40.
-    version_data[:matches].reject! do |_, version|
-      next if version.major >= 40
-      next if version.minor.blank?
-
-      (version.minor.to_i.odd? || version.minor >= 90) ||
-        (version.patch.present? && version.patch >= 90)
-    end
-  end
-
-  version_data
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-
-
# File 'livecheck/strategy/gnome.rb', line 54
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.match(URL_MATCH_REGEX)
-  return values if match.blank?
-
-  values[:url] = "https://download.gnome.org/sources/#{match[:package_name]}/cache.json"
-
-  regex_name = Regexp.escape(T.must(match[:package_name])).gsub("\\-", "-")
-
-  # GNOME archive files seem to use a standard filename format, so we
-  # count on the delimiter between the package name and numeric
-  # version being a hyphen and the file being a tarball.
-  values[:regex] = /#{regex_name}-(\d+(?:\.\d+)*)\.t/i
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'livecheck/strategy/gnome.rb', line 42
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Gnu.html b/docs/Homebrew/Livecheck/Strategy/Gnu.html deleted file mode 100644 index f4ede34c3..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Gnu.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Gnu - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Gnu - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/gnu.rb
-
- -
- -

Overview

-
-

The Gnu strategy identifies versions of software at gnu.org by -checking directory listing pages.

- -

GNU URLs use a variety of formats:

- -
    -
  • Archive file URLs: - -
      -
    • https://ftp.gnu.org/gnu/example/example-1.2.3.tar.gz
    • -
    • https://ftp.gnu.org/gnu/example/1.2.3/example-1.2.3.tar.gz
    • -
  • -
  • Homepage URLs: - -
      -
    • https://www.gnu.org/software/example/
    • -
    • https://example.gnu.org
    • -
  • -
- -

There are other URL formats that this strategy currently doesn't -support:

- -
    -
  • https://ftp.gnu.org/non-gnu/example/source/feature/1.2.3/example-1.2.3.tar.gz
  • -
  • https://savannah.nongnu.org/download/example/example-1.2.3.tar.gz
  • -
  • https://download.savannah.gnu.org/releases/example/example-1.2.3.tar.gz
  • -
  • https://download.savannah.nongnu.org/releases/example/example-1.2.3.tar.gz
  • -
- -

The default regex identifies versions in archive files found in href -attributes.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"GNU"
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
T.let(%r{
-  ^https?://
-  (?:(?:[^/]+?\.)*gnu\.org/(?:gnu|software)/(?<project_name>[^/]+)/
-  |(?<project_name>[^/]+)\.gnu\.org/?$)
-}ix, Regexp)
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-97
-98
-99
-100
-
-
# File 'livecheck/strategy/gnu.rb', line 96
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-
-  PageMatch.find_versions(url: generated[:url], regex: regex || generated[:regex], **unused, &block)
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'livecheck/strategy/gnu.rb', line 58
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.match(URL_MATCH_REGEX)
-  return values if match.blank?
-
-  # The directory listing page for the project's files
-  values[:url] = "https://ftp.gnu.org/gnu/#{match[:project_name]}/"
-
-  regex_name = Regexp.escape(T.must(match[:project_name])).gsub("\\-", "-")
-
-  # The default regex consists of the following parts:
-  # * `href=.*?`: restricts matching to URLs in `href` attributes
-  # * The project name
-  # * `[._-]`: the generic delimiter between project name and version
-  # * `v?(\d+(?:\.\d+)*)`: the numeric version
-  # * `(?:\.[a-z]+|/)`: the file extension (a trailing delimiter)
-  #
-  # Example regex: `%r{href=.*?example[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i`
-  values[:regex] = %r{href=.*?#{regex_name}[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-
-
# File 'livecheck/strategy/gnu.rb', line 46
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url) && url.exclude?("savannah.")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Hackage.html b/docs/Homebrew/Livecheck/Strategy/Hackage.html deleted file mode 100644 index f43cd827f..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Hackage.html +++ /dev/null @@ -1,603 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Hackage - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Hackage - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/hackage.rb
-
- -
- -

Overview

-
-

The Hackage strategy identifies versions of software at -hackage.haskell.org by checking directory listing pages.

- -

Hackage URLs take one of the following formats:

- -
    -
  • https://hackage.haskell.org/package/example-1.2.3/example-1.2.3.tar.gz
  • -
  • https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-src.tar.xz
  • -
- -

The default regex checks for the latest version in an h3 heading element -with a format like <h3>example-1.2.3/</h3>.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PACKAGE_NAME_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A Regexp used in determining if the strategy applies to the URL and -also as part of extracting the package name from the URL basename.

- - -
-
-
- - -
-
-
/(?<package_name>.+?)-\d+/i
- -
FILENAME_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A Regexp used to extract the package name from the URL basename.

- - -
-
-
- - -
-
-
/^#{PACKAGE_NAME_REGEX.source.strip}/i
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A Regexp used in determining if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://(?:downloads|hackage)\.haskell\.org
-  (?:/[^/]+)+ # Path before the filename
-  #{PACKAGE_NAME_REGEX.source.strip}
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-
-
# File 'livecheck/strategy/hackage.rb', line 82
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-
-  PageMatch.find_versions(url: generated[:url], regex: regex || generated[:regex], **unused, &block)
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'livecheck/strategy/hackage.rb', line 51
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = File.basename(url).match(FILENAME_REGEX)
-  return values if match.blank?
-
-  # A page containing a directory listing of the latest source tarball
-  values[:url] = "https://hackage.haskell.org/package/#{match[:package_name]}/src/"
-
-  regex_name = Regexp.escape(T.must(match[:package_name])).gsub("\\-", "-")
-
-  # Example regex: `%r{<h3>example-(.*?)/?</h3>}i`
-  values[:regex] = %r{<h3>#{regex_name}-(.*?)/?</h3>}i
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'livecheck/strategy/hackage.rb', line 39
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/HeaderMatch.html b/docs/Homebrew/Livecheck/Strategy/HeaderMatch.html deleted file mode 100644 index 99bf1a616..000000000 --- a/docs/Homebrew/Livecheck/Strategy/HeaderMatch.html +++ /dev/null @@ -1,682 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::HeaderMatch - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::HeaderMatch - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/header_match.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

The HeaderMatch strategy follows all URL redirections and scans -the resulting headers for matching text using the provided regex.

- -

This strategy is not applied automatically and it's necessary to use -strategy :header_match in a livecheck block to apply it.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Header match"
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::HeaderMatch so we can selectively apply it when appropriate.

- - -
-
-
- - -
-
-
0
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{^https?://}i
- -
DEFAULT_HEADERS_TO_CHECK = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The header fields to check when a strategy block isn't provided.

- - -
-
-
- - -
-
-
["content-disposition", "location"].freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, homebrew_curl: false, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks the final URL for new versions after following all redirections, -using the provided regex for matching.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to fetch

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions

    -
    - -
  • - -
  • - - homebrew_curl - - - (Boolean) - - - (defaults to: false) - - - — -

    whether to use brewed curl with the URL

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'livecheck/strategy/header_match.rb', line 81
-
-def self.find_versions(url:, regex: nil, homebrew_curl: false, **_unused, &block)
-  match_data = { matches: {}, regex:, url: }
-
-  headers = Strategy.page_headers(url, homebrew_curl:)
-
-  # Merge the headers from all responses into one hash
-  merged_headers = headers.reduce(&:merge)
-  return match_data if merged_headers.blank?
-
-  versions_from_headers(merged_headers, regex, &block).each do |version_text|
-    match_data[:matches][version_text] = Version.new(version_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'livecheck/strategy/header_match.rb', line 30
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
-

- - .versions_from_headers(headers, regex = nil, &block) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Identify versions from HTTP headers.

- - -
-
-
-

Parameters:

-
    - -
  • - - headers - - - (Hash{String => String}) - - - - — -

    a hash of HTTP headers to check for versions

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex for matching versions

    -
    - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-
-
# File 'livecheck/strategy/header_match.rb', line 46
-
-def self.versions_from_headers(headers, regex = nil, &block)
-  if block
-    block_return_value = regex.present? ? yield(headers, regex) : yield(headers)
-    return Strategy.handle_block_return(block_return_value)
-  end
-
-  DEFAULT_HEADERS_TO_CHECK.filter_map do |header_name|
-    header_value = headers[header_name]
-    next if header_value.blank?
-
-    if regex
-      header_value[regex, 1]
-    else
-      v = Version.parse(header_value, detected_from_url: true)
-      v.null? ? nil : v.to_s
-    end
-  end.uniq
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Json.html b/docs/Homebrew/Livecheck/Strategy/Json.html deleted file mode 100644 index 55d6dbfed..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Json.html +++ /dev/null @@ -1,817 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Json - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Json - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/json.rb
-
- -
- -

Overview

-
-

The Json strategy fetches content at a URL, parses it as JSON and -provides the parsed data to a strategy block. If a regex is present -in the livecheck block, it should be passed as the second argument to -the strategy block.

- -

This is a generic strategy that doesn't contain any logic for finding -versions, as the structure of JSON data varies. Instead, a strategy -block must be used to extract version information from the JSON data.

- -

This strategy is not applied automatically and it is necessary to use -strategy :json in a livecheck block (in conjunction with a -strategy block) to use it.

- -

This strategy's Json.find_versions method can be used in other strategies -that work with JSON content, so it should only be necessary to write -the version-finding logic that works with the parsed JSON data.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"JSON"
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::Json so we can selectively apply it only when a strategy block -is provided in a livecheck block.

- - -
-
-
- - -
-
-
0
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{^https?://}i
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks the JSON content at the URL for versions, using the provided -strategy block to extract version information.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions

    -
    - -
  • - -
  • - - provided_content - - - (String, nil) - - - (defaults to: nil) - - - — -

    page content to use in place of -fetching via Strategy#page_content

    -
    - -
  • - -
  • - - homebrew_curl - - - (Boolean) - - - (defaults to: false) - - - — -

    whether to use brewed curl with the URL

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-
-
# File 'livecheck/strategy/json.rb', line 109
-
-def self.find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block)
-  raise ArgumentError, "#{Utils.demodulize(T.must(name))} requires a `strategy` block" if block.blank?
-
-  match_data = { matches: {}, regex:, url: }
-  return match_data if url.blank? || block.blank?
-
-  content = if provided_content.is_a?(String)
-    match_data[:cached] = true
-    provided_content
-  else
-    match_data.merge!(Strategy.page_content(url, homebrew_curl:))
-    match_data[:content]
-  end
-  return match_data if content.blank?
-
-  versions_from_content(content, regex, &block).each do |match_text|
-    match_data[:matches][match_text] = Version.new(match_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL. -Homebrew::Livecheck::Strategy::Json will technically match any HTTP URL but is only usable with -a livecheck block containing a strategy block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'livecheck/strategy/json.rb', line 43
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
-

- - .parse_json(content) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Parses JSON text and returns the parsed data.

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - - — -

    the JSON text to parse

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'livecheck/strategy/json.rb', line 50
-
-def self.parse_json(content)
-  require "json"
-
-  begin
-    JSON.parse(content)
-  rescue JSON::ParserError
-    raise "Content could not be parsed as JSON."
-  end
-end
-
-
- -
-

- - .versions_from_content(content, regex = nil, &block) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Parses JSON text and identifies versions using a strategy block. -If a regex is provided, it will be passed as the second argument to -the strategy block (after the parsed JSON data).

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - - — -

    the JSON text to parse and check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in the -content

    -
    - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-
-
# File 'livecheck/strategy/json.rb', line 74
-
-def self.versions_from_content(content, regex = nil, &block)
-  return [] if content.blank? || block.blank?
-
-  json = parse_json(content)
-  return [] if json.blank?
-
-  block_return_value = if regex.present?
-    yield(json, regex)
-  elsif block.arity == 2
-    raise "Two arguments found in `strategy` block but no regex provided."
-  else
-    yield(json)
-  end
-  Strategy.handle_block_return(block_return_value)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Launchpad.html b/docs/Homebrew/Livecheck/Strategy/Launchpad.html deleted file mode 100644 index 66e2adc22..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Launchpad.html +++ /dev/null @@ -1,578 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Launchpad - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Launchpad - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/launchpad.rb
-
- -
- -

Overview

-
-

The Launchpad strategy identifies versions of software at -launchpad.net by checking the main page for a project.

- -

Launchpad URLs take a variety of formats but all the current formats -contain the project name as the first part of the URL path:

- -
    -
  • https://launchpad.net/example/1.2/1.2.3/+download/example-1.2.3.tar.gz
  • -
  • https://launchpad.net/example/trunk/1.2.3/+download/example-1.2.3.tar.gz
  • -
  • https://code.launchpad.net/example/1.2/1.2.3/+download/example-1.2.3.tar.gz
  • -
- -

The default regex identifies the latest version within an HTML element -found on the main page for a project:

- -
<div class="version">
-  Latest version is 1.2.3
-</div>
- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://(?:[^/]+?\.)*launchpad\.net
-  /(?<project_name>[^/]+) # The Launchpad project name
-}ix
- -
DEFAULT_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The default regex used to identify the latest version when a regex -isn't provided.

- - -
-
-
- - -
-
-
%r{class="[^"]*version[^"]*"[^>]*>\s*Latest version is (.+)\s*</}
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: DEFAULT_REGEX, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp) - - - (defaults to: DEFAULT_REGEX) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-79
-80
-81
-82
-83
-
-
# File 'livecheck/strategy/launchpad.rb', line 79
-
-def self.find_versions(url:, regex: DEFAULT_REGEX, **unused, &block)
-  generated = generate_input_values(url)
-
-  PageMatch.find_versions(url: generated[:url], regex:, **unused, &block)
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-
-
# File 'livecheck/strategy/launchpad.rb', line 53
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.match(URL_MATCH_REGEX)
-  return values if match.blank?
-
-  # The main page for the project on Launchpad
-  values[:url] = "https://launchpad.net/#{match[:project_name]}/"
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-41
-42
-43
-
-
# File 'livecheck/strategy/launchpad.rb', line 41
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Npm.html b/docs/Homebrew/Livecheck/Strategy/Npm.html deleted file mode 100644 index c951a43bf..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Npm.html +++ /dev/null @@ -1,577 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Npm - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Npm - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/npm.rb
-
- -
- -

Overview

-
-

The Npm strategy identifies versions of software at -registry.npmjs.org by checking the listed versions for a package.

- -

npm URLs take one of the following formats:

- -
    -
  • https://registry.npmjs.org/example/-/example-1.2.3.tgz
  • -
  • https://registry.npmjs.org/@example/example/-/example-1.2.3.tgz
  • -
- -

The default regex matches URLs in the href attributes of version tags -on the "Versions" tab of the package page.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"npm"
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://registry\.npmjs\.org
-  /(?<package_name>.+?)/-/ # The npm package name
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-
-
# File 'livecheck/strategy/npm.rb', line 77
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-
-  PageMatch.find_versions(url: generated[:url], regex: regex || generated[:regex], **unused, &block)
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-
-
# File 'livecheck/strategy/npm.rb', line 45
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.match(URL_MATCH_REGEX)
-  return values if match.blank?
-
-  values[:url] = "https://www.npmjs.com/package/#{match[:package_name]}?activeTab=versions"
-
-  regex_name = Regexp.escape(T.must(match[:package_name])).gsub("\\-", "-")
-
-  # Example regexes:
-  # * `%r{href=.*?/package/example/v/(\d+(?:\.\d+)+)"}i`
-  # * `%r{href=.*?/package/@example/example/v/(\d+(?:\.\d+)+)"}i`
-  values[:regex] = %r{href=.*?/package/#{regex_name}/v/(\d+(?:\.\d+)+)"}i
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'livecheck/strategy/npm.rb', line 33
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/PageMatch.html b/docs/Homebrew/Livecheck/Strategy/PageMatch.html deleted file mode 100644 index acb7ede99..000000000 --- a/docs/Homebrew/Livecheck/Strategy/PageMatch.html +++ /dev/null @@ -1,692 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::PageMatch - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::PageMatch - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/page_match.rb
-
- -
- -

Overview

-
-

The PageMatch strategy fetches content at a URL and scans it for -matching text using the provided regex.

- -

This strategy can be used in a livecheck block when no specific -strategies apply to a given URL. Though PageMatch will technically -match any HTTP URL, the strategy also requires a regex to function.

- -

The PageMatch.find_versions method can be used within other strategies, to -handle the process of identifying version text in content.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"Page match"
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::PageMatch so we can selectively apply it only when a regex is -provided in a livecheck block.

- - -
-
-
- - -
-
-
0
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{^https?://}i
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks the content at the URL for new versions, using the provided -regex for matching.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions

    -
    - -
  • - -
  • - - provided_content - - - (String, nil) - - - (defaults to: nil) - - - — -

    page content to use in place of -fetching via Strategy#page_content

    -
    - -
  • - -
  • - - homebrew_curl - - - (Boolean) - - - (defaults to: false) - - - — -

    whether to use brewed curl with the URL

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-
-
# File 'livecheck/strategy/page_match.rb', line 92
-
-def self.find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block)
-  if regex.blank? && block.blank?
-    raise ArgumentError, "#{Utils.demodulize(T.must(name))} requires a regex or `strategy` block"
-  end
-
-  match_data = { matches: {}, regex:, url: }
-  return match_data if url.blank? || (regex.blank? && block.blank?)
-
-  content = if provided_content.is_a?(String)
-    match_data[:cached] = true
-    provided_content
-  else
-    match_data.merge!(Strategy.page_content(url, homebrew_curl:))
-    match_data[:content]
-  end
-  return match_data if content.blank?
-
-  versions_from_content(content, regex, &block).each do |match_text|
-    match_data[:matches][match_text] = Version.new(match_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL. -Homebrew::Livecheck::Strategy::PageMatch will technically match any HTTP URL but is only -usable with a livecheck block containing a regex.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-37
-38
-
-
# File 'livecheck/strategy/page_match.rb', line 36
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
-

- - .versions_from_content(content, regex, &block) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Uses the regex to match text in the content or, if a block is -provided, passes the page content to the block to handle matching. -With either approach, an array of unique matches is returned.

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - - — -

    the page content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - - — -

    a regex used for matching versions in the -content

    -
    - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'livecheck/strategy/page_match.rb', line 55
-
-def self.versions_from_content(content, regex, &block)
-  if block
-    block_return_value = regex.present? ? yield(content, regex) : yield(content)
-    return Strategy.handle_block_return(block_return_value)
-  end
-
-  return [] if regex.blank?
-
-  content.scan(regex).filter_map do |match|
-    case match
-    when String
-      match
-    when Array
-      match.first
-    end
-  end.uniq
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Pypi.html b/docs/Homebrew/Livecheck/Strategy/Pypi.html deleted file mode 100644 index fda7bf668..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Pypi.html +++ /dev/null @@ -1,612 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Pypi - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Pypi - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/pypi.rb
-
- -
- -

Overview

-
-

The Pypi strategy identifies versions of software at pypi.org by -checking project pages for archive files.

- -

PyPI URLs have a standard format but the hexadecimal text between -/packages/ and the filename varies:

- -
    -
  • https://files.pythonhosted.org/packages/<hex>/<hex>/<long_hex>/example-1.2.3.tar.gz
  • -
- -

As such, the default regex only targets the filename at the end of the -URL.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"PyPI"
- -
FILENAME_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to extract the package name and suffix (e.g. file -extension) from the URL basename.

- - -
-
-
- - -
-
-
/
-  (?<package_name>.+)- # The package name followed by a hyphen
-  .*? # The version string
-  (?<suffix>\.tar\.[a-z0-9]+|\.[a-z0-9]+)$ # Filename extension
-/ix
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://files\.pythonhosted\.org
-  /packages
-  (?:/[^/]+)+ # The hexadecimal paths before the filename
-  /#{FILENAME_REGEX.source.strip} # The filename
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to Homebrew::Livecheck::Strategy::PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-91
-92
-93
-94
-95
-
-
# File 'livecheck/strategy/pypi.rb', line 91
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-
-  PageMatch.find_versions(url: generated[:url], regex: regex || generated[:regex], **unused, &block)
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-
-
# File 'livecheck/strategy/pypi.rb', line 55
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = File.basename(url).match(FILENAME_REGEX)
-  return values if match.blank?
-
-  # It's not technically necessary to have the `#files` fragment at the
-  # end of the URL but it makes the debug output a bit more useful.
-  values[:url] = "https://pypi.org/project/#{T.must(match[:package_name]).gsub(/%20|_/, "-")}/#files"
-
-  # Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
-  suffix = T.must(match[:suffix]).sub(Strategy::TARBALL_EXTENSION_REGEX, ".t")
-  regex_suffix = Regexp.escape(suffix).gsub("\\-", "-")
-
-  # Example regex: `%r{href=.*?/packages.*?/example[._-]v?(\d+(?:\.\d+)*(?:[._-]post\d+)?)\.t}i`
-  regex_name = Regexp.escape(T.must(match[:package_name])).gsub(/\\[_-]/, "[_-]")
-  values[:regex] =
-    %r{href=.*?/packages.*?/#{regex_name}[._-]v?(\d+(?:\.\d+)*(?:[._-]post\d+)?)#{regex_suffix}}i
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'livecheck/strategy/pypi.rb', line 43
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Sourceforge.html b/docs/Homebrew/Livecheck/Strategy/Sourceforge.html deleted file mode 100644 index 26466dc0a..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Sourceforge.html +++ /dev/null @@ -1,609 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Sourceforge - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Sourceforge - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/sourceforge.rb
-
- -
- -

Overview

-
-

The Sourceforge strategy identifies versions of software at -sourceforge.net by checking a project's RSS feed.

- -

SourceForge URLs take a few different formats:

- -
    -
  • https://downloads.sourceforge.net/project/example/example-1.2.3.tar.gz
  • -
  • https://svn.code.sf.net/p/example/code/trunk
  • -
  • :pserver:anonymous:@example.cvs.sourceforge.net:/cvsroot/example
  • -
- -

The RSS feed for a project contains the most recent release archives -and while this is fine for most projects, this approach has some -shortcomings. Some project releases involve so many files that the one -we're interested in isn't present in the feed content. Some projects -contain additional software and the archive we're interested in is -pushed out of the feed (especially if it hasn't been updated recently).

- -

Usually we address this situation by adding a livecheck block to -the formula/cask that checks the page for the relevant directory in the -project instead. In this situation, it's necessary to use -strategy :page_match to prevent the Sourceforge stratgy from -being used.

- -

The default regex matches within url attributes in the RSS feed -and identifies versions within directory names or filenames.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"SourceForge"
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://(?:[^/]+?\.)*(?:sourceforge|sf)\.net
-  (?:/projects?/(?<project_name>[^/]+)/
-  |/p/(?<project_name>[^/]+)/
-  |(?::/cvsroot)?/(?<project_name>[^/]+))
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and passes them -to PageMatch.find_versions to identify versions in the content.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'livecheck/strategy/sourceforge.rb', line 96
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-
-  PageMatch.find_versions(
-    url:   generated[:url] || url,
-    regex: regex || generated[:regex],
-    **unused,
-    &block
-  )
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'livecheck/strategy/sourceforge.rb', line 61
-
-def self.generate_input_values(url)
-  values = {}
-
-  match = url.match(URL_MATCH_REGEX)
-  return values if match.blank?
-
-  # Don't generate a URL if the URL already points to the RSS feed
-  unless url.match?(%r{/rss(?:/?$|\?)})
-    values[:url] = "https://sourceforge.net/projects/#{match[:project_name]}/rss"
-  end
-
-  regex_name = Regexp.escape(T.must(match[:project_name])).gsub("\\-", "-")
-
-  # It may be possible to improve the generated regex but there's quite
-  # a bit of variation between projects and it can be challenging to
-  # create something that works for most URLs.
-  values[:regex] = %r{url=.*?/#{regex_name}/files/.*?[-_/](\d+(?:[-.]\d+)+)[-_/%.]}i
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'livecheck/strategy/sourceforge.rb', line 49
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Sparkle.html b/docs/Homebrew/Livecheck/Strategy/Sparkle.html deleted file mode 100644 index 04959310f..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Sparkle.html +++ /dev/null @@ -1,1126 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Sparkle - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Sparkle - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/sparkle.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

The Sparkle strategy fetches content at a URL and parses it as a -Sparkle appcast in XML format.

- -

This strategy is not applied automatically and it's necessary to use -strategy :sparkle in a livecheck block to apply it.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Item - - -

- - -

- Constant Summary - collapse -

- -
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::Sparkle so we can selectively apply it when appropriate.

- - -
-
-
- - -
-
-
0
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{^https?://}i
- -
APPCAST_MACOS_STRINGS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Common os values used in appcasts to refer to macOS.

- - -
-
-
- - -
-
-
["macos", "osx"].freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .filter_items(items) ⇒ Array<Item> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Filters out items that aren't suitable for Homebrew.

- - -
-
-
-

Parameters:

-
    - -
  • - - items - - - (Array<Item>) - - - - — -

    appcast items

    -
    - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-
-
# File 'livecheck/strategy/sparkle.rb', line 155
-
-def self.filter_items(items)
-  items.select do |item|
-    # Omit items with an explicit `os` value that isn't macOS
-    next false if item.os && APPCAST_MACOS_STRINGS.none?(item.os)
-
-    # Omit items for prerelease macOS versions
-    next false if item.minimum_system_version&.strip_patch&.prerelease?
-
-    true
-  end.compact
-end
-
-
- -
-

- - .find_versions(url:, regex: nil, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks the content at the URL for new versions.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex for use in a strategy block

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-
-
# File 'livecheck/strategy/sparkle.rb', line 226
-
-def self.find_versions(url:, regex: nil, **_unused, &block)
-  if regex.present? && block.blank?
-    raise ArgumentError,
-          "#{Utils.demodulize(T.must(name))} only supports a regex when using a `strategy` block"
-  end
-
-  match_data = { matches: {}, regex:, url: }
-
-  match_data.merge!(Strategy.page_content(url))
-  content = match_data.delete(:content)
-  return match_data if content.blank?
-
-  versions_from_content(content, regex, &block).each do |version_text|
-    match_data[:matches][version_text] = Version.new(version_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .items_from_content(content) ⇒ Array<Item> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Identifies version information from a Sparkle appcast.

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - - — -

    the text of the Sparkle appcast

    -
    - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-
-
# File 'livecheck/strategy/sparkle.rb', line 75
-
-def self.items_from_content(content)
-  require "rexml/document"
-  xml = Xml.parse_xml(content)
-  return [] if xml.blank?
-
-  # Remove prefixes, so we can reliably identify elements and attributes
-  xml.root&.each_recursive do |node|
-    node.prefix = ""
-    node.attributes.each_attribute do |attribute|
-      attribute.prefix = ""
-    end
-  end
-
-  xml.get_elements("//rss//channel//item").filter_map do |item|
-    enclosure = item.elements["enclosure"]
-
-    if enclosure
-      url = enclosure["url"].presence
-      short_version = enclosure["shortVersionString"].presence
-      version = enclosure["version"].presence
-      os = enclosure["os"].presence
-    end
-
-    title = Xml.element_text(item, "title")
-    link = Xml.element_text(item, "link")
-    url ||= link
-    channel = Xml.element_text(item, "channel")
-    release_notes_link = Xml.element_text(item, "releaseNotesLink")
-    short_version ||= Xml.element_text(item, "shortVersionString")
-    version ||= Xml.element_text(item, "version")
-
-    minimum_system_version_text =
-      Xml.element_text(item, "minimumSystemVersion")&.gsub(/\A\D+|\D+\z/, "")
-    if minimum_system_version_text.present?
-      minimum_system_version = begin
-        MacOSVersion.new(minimum_system_version_text)
-      rescue MacOSVersion::Error
-        nil
-      end
-    end
-
-    pub_date = Xml.element_text(item, "pubDate")&.then do |date_string|
-      Time.parse(date_string)
-    rescue ArgumentError
-      # Omit unparsable strings (e.g. non-English dates)
-      nil
-    end
-
-    if (match = title&.match(/(\d+(?:\.\d+)*)\s*(\([^)]+\))?\Z/))
-      short_version ||= match[1]
-      version ||= match[2]
-    end
-
-    bundle_version = BundleVersion.new(short_version, version) if short_version || version
-
-    data = {
-      title:,
-      link:,
-      channel:,
-      release_notes_link:,
-      pub_date:,
-      os:,
-      url:,
-      bundle_version:,
-      minimum_system_version:,
-    }.compact
-    next if data.empty?
-
-    # Set a default `pub_date` (for sorting) if one isn't provided
-    data[:pub_date] ||= Time.new(0)
-
-    Item.new(**data)
-  end
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'livecheck/strategy/sparkle.rb', line 30
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
-

- - .sort_items(items) ⇒ Array<Item> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sorts items from newest to oldest.

- - -
-
-
-

Parameters:

-
    - -
  • - - items - - - (Array<Item>) - - - - — -

    appcast items

    -
    - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-172
-173
-174
-175
-
-
# File 'livecheck/strategy/sparkle.rb', line 172
-
-def self.sort_items(items)
-  items.sort_by { |item| [item.pub_date, item.bundle_version] }
-       .reverse
-end
-
-
- -
-

- - .versions_from_content(content, regex = nil, &block) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Uses #items_from_content to identify versions from the Sparkle -appcast content or, if a block is provided, passes the content to -the block to handle matching.

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - - — -

    the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex for use in a strategy block

    -
    - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-
-
# File 'livecheck/strategy/sparkle.rb', line 191
-
-def self.versions_from_content(content, regex = nil, &block)
-  items = sort_items(filter_items(items_from_content(content)))
-  return [] if items.blank?
-
-  item = items.first
-
-  if block
-    block_return_value = case block.parameters[0]
-    when [:opt, :item], [:rest], [:req]
-      regex.present? ? yield(item, regex) : yield(item)
-    when [:opt, :items]
-      regex.present? ? yield(items, regex) : yield(items)
-    else
-      raise "First argument of Sparkle `strategy` block must be `item` or `items`"
-    end
-    return Strategy.handle_block_return(block_return_value)
-  end
-
-  version = T.must(item).bundle_version&.nice_version
-  version.present? ? [version] : []
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Sparkle/Item.html b/docs/Homebrew/Livecheck/Strategy/Sparkle/Item.html deleted file mode 100644 index c5189eae6..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Sparkle/Item.html +++ /dev/null @@ -1,1157 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Sparkle::Item - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Sparkle::Item - - - Private -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
livecheck/strategy/sparkle.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #bundle_version ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute bundle_version.

    -
    - -
  • - - - -
  • - - - #channel ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute channel.

    -
    - -
  • - - - -
  • - - - #link ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute link.

    -
    - -
  • - - - -
  • - - - #minimum_system_version ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute minimum_system_version.

    -
    - -
  • - - - -
  • - - - #nice_version ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #os ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute os.

    -
    - -
  • - - - -
  • - - - #pub_date ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute pub_date.

    -
    - -
  • - - - -
  • - - - #release_notes_link ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute release_notes_link.

    -
    - -
  • - - - -
  • - - - #short_version ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #title ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute title.

    -
    - -
  • - - - -
  • - - - #url ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute url.

    -
    - -
  • - - - -
  • - - - #version ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - - - -
-

Instance Attribute Details

- - - -
-

- - #bundle_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute bundle_version

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of bundle_version

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'livecheck/strategy/sparkle.rb', line 34
-
-def bundle_version
-  @bundle_version
-end
-
-
- - - -
-

- - #channelObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute channel

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of channel

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'livecheck/strategy/sparkle.rb', line 34
-
-def channel
-  @channel
-end
-
-
- - - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute link

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of link

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'livecheck/strategy/sparkle.rb', line 34
-
-def link
-  @link
-end
-
-
- - - -
-

- - #minimum_system_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute minimum_system_version

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of minimum_system_version

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'livecheck/strategy/sparkle.rb', line 34
-
-def minimum_system_version
-  @minimum_system_version
-end
-
-
- - - -
-

- - #nice_versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-67
-
-
# File 'livecheck/strategy/sparkle.rb', line 67
-
-delegate nice_version: :bundle_version
-
-
- - - -
-

- - #osObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute os

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of os

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'livecheck/strategy/sparkle.rb', line 34
-
-def os
-  @os
-end
-
-
- - - -
-

- - #pub_dateObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute pub_date

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of pub_date

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'livecheck/strategy/sparkle.rb', line 34
-
-def pub_date
-  @pub_date
-end
-
-
- - - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute release_notes_link

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of release_notes_link

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'livecheck/strategy/sparkle.rb', line 34
-
-def release_notes_link
-  @release_notes_link
-end
-
-
- - - -
-

- - #short_versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-63
-
-
# File 'livecheck/strategy/sparkle.rb', line 63
-
-delegate short_version: :bundle_version
-
-
- - - -
-

- - #titleObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute title

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of title

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'livecheck/strategy/sparkle.rb', line 34
-
-def title
-  @title
-end
-
-
- - - -
-

- - #urlObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute url

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of url

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'livecheck/strategy/sparkle.rb', line 34
-
-def url
-  @url
-end
-
-
- - - -
-

- - #versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-59
-
-
# File 'livecheck/strategy/sparkle.rb', line 59
-
-delegate version: :bundle_version
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Xml.html b/docs/Homebrew/Livecheck/Strategy/Xml.html deleted file mode 100644 index f886ccbd7..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Xml.html +++ /dev/null @@ -1,975 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Xml - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Xml - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/xml.rb
-
- -
- -

Overview

-
-

The Xml strategy fetches content at a URL, parses it as XML using -REXML and provides the REXML::Document to a strategy block. -If a regex is present in the livecheck block, it should be passed -as the second argument to the strategy block.

- -

This is a generic strategy that doesn't contain any logic for finding -versions, as the structure of XML data varies. Instead, a strategy -block must be used to extract version information from the XML data. -For more information on how to work with an REXML::Document object, -please refer to the REXML::Document -and REXML::Element -documentation.

- -

This strategy is not applied automatically and it is necessary to use -strategy :xml in a livecheck block (in conjunction with a -strategy block) to use it.

- -

This strategy's Xml.find_versions method can be used in other strategies -that work with XML content, so it should only be necessary to write -the version-finding logic that works with the parsed XML data.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"XML"
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::Xml so we can selectively apply it only when a strategy block -is provided in a livecheck block.

- - -
-
-
- - -
-
-
0
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{^https?://}i
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .element_text(element, child_path = nil) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Retrieves the stripped inner text of an REXML element. Returns -nil if the optional child element doesn't exist or the text is -blank.

- - -
-
-
-

Parameters:

-
    - -
  • - - element - - - (REXML::Element) - - - - — -

    an REXML element to retrieve text -from, either directly or from a child element

    -
    - -
  • - -
  • - - child_path - - - (String, nil) - - - (defaults to: nil) - - - — -

    the XPath of a child element to -retrieve text from

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-
-
# File 'livecheck/strategy/xml.rb', line 89
-
-def self.element_text(element, child_path = nil)
-  element = element.get_elements(child_path).first if child_path.present?
-  return if element.nil?
-
-  text = element.text
-  return if text.blank?
-
-  text.strip
-end
-
-
- -
-

- - .find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks the XML content at the URL for versions, using the provided -strategy block to extract version information.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions

    -
    - -
  • - -
  • - - provided_content - - - (String, nil) - - - (defaults to: nil) - - - — -

    page content to use in place of -fetching via Strategy#page_content

    -
    - -
  • - -
  • - - homebrew_curl - - - (Boolean) - - - (defaults to: false) - - - — -

    whether to use brewed curl with the URL

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-
-
# File 'livecheck/strategy/xml.rb', line 149
-
-def self.find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block)
-  raise ArgumentError, "#{Utils.demodulize(T.must(name))} requires a `strategy` block" if block.blank?
-
-  match_data = { matches: {}, regex:, url: }
-  return match_data if url.blank? || block.blank?
-
-  content = if provided_content.is_a?(String)
-    match_data[:cached] = true
-    provided_content
-  else
-    match_data.merge!(Strategy.page_content(url, homebrew_curl:))
-    match_data[:content]
-  end
-  return match_data if content.blank?
-
-  versions_from_content(content, regex, &block).each do |match_text|
-    match_data[:matches][match_text] = Version.new(match_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL. -Homebrew::Livecheck::Strategy::Xml will technically match any HTTP URL but is only usable with -a livecheck block containing a strategy block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'livecheck/strategy/xml.rb', line 47
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
-

- - .parse_xml(content) ⇒ REXML::Document? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Parses XML text and returns an REXML::Document object.

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - - — -

    the XML text to parse

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (REXML::Document, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# File 'livecheck/strategy/xml.rb', line 55
-
-def self.parse_xml(content)
-  parsing_tries = 0
-  begin
-    REXML::Document.new(content)
-  rescue REXML::UndefinedNamespaceException => e
-    undefined_prefix = e.to_s[/Undefined prefix ([^ ]+) found/i, 1]
-    raise "Could not identify undefined prefix." if undefined_prefix.blank?
-
-    # Only retry parsing once after removing prefix from content
-    parsing_tries += 1
-    raise "Could not parse XML after removing undefined prefix." if parsing_tries > 1
-
-    # When an XML document contains a prefix without a corresponding
-    # namespace, it's necessary to remove the prefix from the content
-    # to be able to successfully parse it using REXML
-    content = content.gsub(%r{(</?| )#{Regexp.escape(undefined_prefix)}:}, '\1')
-    retry
-  end
-end
-
-
- -
-

- - .versions_from_content(content, regex = nil, &block) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Parses XML text and identifies versions using a strategy block. -If a regex is provided, it will be passed as the second argument to -the strategy block (after the parsed XML data).

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - - — -

    the XML text to parse and check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in the -content

    -
    - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
-
# File 'livecheck/strategy/xml.rb', line 113
-
-def self.versions_from_content(content, regex = nil, &block)
-  return [] if content.blank? || block.blank?
-
-  require "rexml"
-  xml = parse_xml(content)
-  return [] if xml.blank?
-
-  block_return_value = if regex.present?
-    yield(xml, regex)
-  elsif block.arity == 2
-    raise "Two arguments found in `strategy` block but no regex provided."
-  else
-    yield(xml)
-  end
-  Strategy.handle_block_return(block_return_value)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Xorg.html b/docs/Homebrew/Livecheck/Strategy/Xorg.html deleted file mode 100644 index 771d3bfc2..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Xorg.html +++ /dev/null @@ -1,680 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Xorg - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Xorg - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/xorg.rb
-
- -
- -

Overview

-
-

The Xorg strategy identifies versions of software at x.org by -checking directory listing pages.

- -

X.Org URLs take one of the following formats, among several others:

- -
    -
  • https://www.x.org/archive/individual/app/example-1.2.3.tar.bz2
  • -
  • https://www.x.org/archive/individual/font/example-1.2.3.tar.bz2
  • -
  • https://www.x.org/archive/individual/lib/libexample-1.2.3.tar.bz2
  • -
  • https://ftp.x.org/archive/individual/lib/libexample-1.2.3.tar.bz2
  • -
  • https://www.x.org/pub/individual/doc/example-1.2.3.tar.gz
  • -
- -

The notable differences between URLs are as follows:

- -
    -
  • www.x.org and ftp.x.org seem to be interchangeable (we prefer -www.x.org).
  • -
  • /archive/ is the current top-level directory and /pub/ will -redirect to the same URL using /archive/ instead. (The strategy -handles this replacement to avoid the redirection.)
  • -
  • The /individual/ directory contains a number of directories (e.g. -app, data, doc, driver, font, lib, etc.) which contain a number of -different archive files.
  • -
- -

Since this strategy ends up checking the same directory listing pages -for multiple formulae, we've included a simple method of page caching. -This prevents livecheck from fetching the same page more than once and -also dramatically speeds up these checks. Eventually we hope to -implement a more sophisticated page cache that all strategies using -PageMatch can use (allowing us to simplify this strategy accordingly).

- -

The default regex identifies versions in archive files found in href -attributes.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"X.Org"
- -
MODULE_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A Regexp used in determining if the strategy applies to the URL and -also as part of extracting the module name from the URL basename.

- - -
-
-
- - -
-
-
/(?<module_name>.+)-\d+/i
- -
FILENAME_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A Regexp used to extract the module name from the URL basename.

- - -
-
-
- - -
-
-
/^#{MODULE_REGEX.source.strip}/i
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{
-  ^https?://(?:[^/]+?\.)* # Scheme and any leading subdomains
-  (?:x\.org/(?:[^/]+/)*individual/(?:[^/]+/)*#{MODULE_REGEX.source.strip}
-  |freedesktop\.org/(?:archive|dist|software)/(?:[^/]+/)*#{MODULE_REGEX.source.strip})
-}ix
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, **unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Generates a URL and regex (if one isn't provided) and checks the -content at the URL for new versions (using the regex for matching).

- -

The behavior in this method for matching text in the content using a -regex is copied and modified from the PageMatch strategy, so that -we can add some simple page caching. If this behavior is expanded to -apply to all strategies that use PageMatch to identify versions, -then this strategy can be brought in line with the others.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in content

    -
    - -
  • - -
  • - - unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
-
# File 'livecheck/strategy/xorg.rb', line 118
-
-def self.find_versions(url:, regex: nil, **unused, &block)
-  generated = generate_input_values(url)
-  generated_url = generated[:url]
-
-  # Use the cached page content to avoid duplicate fetches
-  cached_content = @page_data[generated_url]
-  match_data = PageMatch.find_versions(
-    url:              generated_url,
-    regex:            regex || generated[:regex],
-    provided_content: cached_content,
-    **unused,
-    &block
-  )
-
-  # Cache any new page content
-  @page_data[generated_url] = match_data[:content] if match_data[:content].present?
-
-  match_data
-end
-
-
- -
-

- - .generate_input_values(url) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Extracts information from a provided URL and uses it to generate -various input values used by the strategy to check for new versions. -Some of these values act as defaults and can be overridden in a -livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL used to generate values

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-
-
# File 'livecheck/strategy/xorg.rb', line 78
-
-def self.generate_input_values(url)
-  values = {}
-
-  file_name = File.basename(url)
-  match = file_name.match(FILENAME_REGEX)
-  return values if match.blank?
-
-  # /pub/ URLs redirect to the same URL with /archive/, so we replace
-  # it to avoid the redirection. Removing the filename from the end of
-  # the URL gives us the relevant directory listing page.
-  values[:url] = url.sub("x.org/pub/", "x.org/archive/").delete_suffix(file_name)
-
-  regex_name = Regexp.escape(T.must(match[:module_name])).gsub("\\-", "-")
-
-  # Example regex: `/href=.*?example[._-]v?(\d+(?:\.\d+)+)\.t/i`
-  values[:regex] = /href=.*?#{regex_name}[._-]v?(\d+(?:\.\d+)+)\.t/i
-
-  values
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'livecheck/strategy/xorg.rb', line 66
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Livecheck/Strategy/Yaml.html b/docs/Homebrew/Livecheck/Strategy/Yaml.html deleted file mode 100644 index f0f448276..000000000 --- a/docs/Homebrew/Livecheck/Strategy/Yaml.html +++ /dev/null @@ -1,817 +0,0 @@ - - - - - - - Class: Homebrew::Livecheck::Strategy::Yaml - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Livecheck::Strategy::Yaml - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
livecheck/strategy/yaml.rb
-
- -
- -

Overview

-
-

The Yaml strategy fetches content at a URL, parses it as YAML and -provides the parsed data to a strategy block. If a regex is present -in the livecheck block, it should be passed as the second argument to -the strategy block.

- -

This is a generic strategy that doesn't contain any logic for finding -versions, as the structure of YAML data varies. Instead, a strategy -block must be used to extract version information from the YAML data.

- -

This strategy is not applied automatically and it is necessary to use -strategy :yaml in a livecheck block (in conjunction with a -strategy block) to use it.

- -

This strategy's Yaml.find_versions method can be used in other strategies -that work with YAML content, so it should only be necessary to write -the version-finding logic that works with the parsed YAML data.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NICE_NAME = -
-
- - -
-
-
- - -
-
-
"YAML"
- -
PRIORITY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A priority of zero causes livecheck to skip the strategy. We do this -for Homebrew::Livecheck::Strategy::Yaml so we can selectively apply it only when a strategy block -is provided in a livecheck block.

- - -
-
-
- - -
-
-
0
- -
URL_MATCH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Regexp used to determine if the strategy applies to the URL.

- - -
-
-
- - -
-
-
%r{^https?://}i
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks the YAML content at the URL for versions, using the provided -strategy block to extract version information.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL of the content to check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions

    -
    - -
  • - -
  • - - provided_content - - - (String, nil) - - - (defaults to: nil) - - - — -

    page content to use in place of -fetching via Strategy#page_content

    -
    - -
  • - -
  • - - homebrew_curl - - - (Boolean) - - - (defaults to: false) - - - — -

    whether to use brewed curl with the URL

    -
    - -
  • - -
  • - - _unused - - - (T.untyped) - - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-
-
# File 'livecheck/strategy/yaml.rb', line 109
-
-def self.find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block)
-  raise ArgumentError, "#{Utils.demodulize(T.must(name))} requires a `strategy` block" if block.blank?
-
-  match_data = { matches: {}, regex:, url: }
-  return match_data if url.blank? || block.blank?
-
-  content = if provided_content.is_a?(String)
-    match_data[:cached] = true
-    provided_content
-  else
-    match_data.merge!(Strategy.page_content(url, homebrew_curl:))
-    match_data[:content]
-  end
-  return match_data if content.blank?
-
-  versions_from_content(content, regex, &block).each do |match_text|
-    match_data[:matches][match_text] = Version.new(match_text)
-  end
-
-  match_data
-end
-
-
- -
-

- - .match?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether the strategy can be applied to the provided URL. -Homebrew::Livecheck::Strategy::Yaml will technically match any HTTP URL but is only usable with -a livecheck block containing a strategy block.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    the URL to match against

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'livecheck/strategy/yaml.rb', line 43
-
-def self.match?(url)
-  URL_MATCH_REGEX.match?(url)
-end
-
-
- -
-

- - .parse_yaml(content) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Parses YAML text and returns the parsed data.

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - - — -

    the YAML text to parse

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'livecheck/strategy/yaml.rb', line 50
-
-def self.parse_yaml(content)
-  require "yaml"
-
-  begin
-    YAML.safe_load(content, permitted_classes: [Date, Time])
-  rescue Psych::SyntaxError
-    raise "Content could not be parsed as YAML."
-  end
-end
-
-
- -
-

- - .versions_from_content(content, regex = nil, &block) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Parses YAML text and identifies versions using a strategy block. -If a regex is provided, it will be passed as the second argument to -the strategy block (after the parsed YAML data).

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - - — -

    the YAML text to parse and check

    -
    - -
  • - -
  • - - regex - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    a regex used for matching versions in the -content

    -
    - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-
-
# File 'livecheck/strategy/yaml.rb', line 74
-
-def self.versions_from_content(content, regex = nil, &block)
-  return [] if content.blank? || block.blank?
-
-  yaml = parse_yaml(content)
-  return [] if yaml.blank?
-
-  block_return_value = if regex.present?
-    yield(yaml, regex)
-  elsif block.arity == 2
-    raise "Two arguments found in `strategy` block but no regex provided."
-  else
-    yield(yaml)
-  end
-  Strategy.handle_block_return(block_return_value)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Manpages.html b/docs/Homebrew/Manpages.html deleted file mode 100644 index 0ebbda3ae..000000000 --- a/docs/Homebrew/Manpages.html +++ /dev/null @@ -1,1198 +0,0 @@ - - - - - - - Module: Homebrew::Manpages - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Manpages - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
manpages.rb,
- manpages/parser/ronn.rb,
manpages/converter/roff.rb,
manpages/converter/kramdown.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for generating homebrew manual.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Converter, Parser - - - - Classes: Variables - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .build_man_page(quiet:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-
-
# File 'manpages.rb', line 47
-
-def self.build_man_page(quiet:)
-  template = (SOURCE_PATH/"brew.1.md.erb").read
-  readme = HOMEBREW_REPOSITORY/"README.md"
-  variables = Variables.new(
-    commands:                   generate_cmd_manpages(Commands.internal_commands_paths),
-    developer_commands:         generate_cmd_manpages(Commands.internal_developer_commands_paths),
-    official_external_commands: generate_cmd_manpages(Commands.official_external_commands_paths(quiet:)),
-    global_cask_options:        global_cask_options_manpage,
-    global_options:             global_options_manpage,
-    environment_variables:      env_vars_manpage,
-    lead:                       readme.read[/(Homebrew's \[Project Leader.*\.)/, 1]
-                                  .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1'),
-    plc:                        readme.read[/(Homebrew's \[Project Leadership Committee.*\.)/, 1]
-                                  .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1'),
-    tsc:                        readme.read[/(Homebrew's \[Technical Steering Committee.*\.)/, 1]
-                                  .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1'),
-    maintainers:                readme.read[/(Homebrew's maintainers .*\.)/, 1]
-                                  .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1'),
-    alumni:                     readme.read[/(Former maintainers .*\.)/, 1]
-                                  .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1'),
-  )
-
-  ERB.new(template, trim_mode: ">").result(variables.instance_eval { binding })
-end
-
-
- -
-

- - .cmd_comment_manpage_lines(cmd_path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-
-
# File 'manpages.rb', line 116
-
-def self.cmd_comment_manpage_lines(cmd_path)
-  comment_lines = cmd_path.read.lines.grep(/^#:/)
-  return if comment_lines.empty?
-  return if comment_lines.first.include?("@hide_from_man_page")
-
-  lines = [format_usage_banner(comment_lines.first).chomp]
-  comment_lines.slice(1..-1)
-               .each do |line|
-    line = line.slice(4..-2)
-    unless line
-      lines.last << "\n"
-      next
-    end
-
-    # Omit the common global_options documented separately in the man page.
-    next if line.match?(/--(debug|help|quiet|verbose) /)
-
-    # Format one option or a comma-separated pair of short and long options.
-    line.gsub!(/^ +(-+[a-z-]+), (-+[a-z-]+) +(.*)$/, "`\\1`, `\\2`\n\n: \\3\n")
-    line.gsub!(/^ +(-+[a-z-]+) +(.*)$/, "`\\1`\n\n: \\2\n")
-
-    lines << line
-  end
-  lines.last << "\n"
-  lines
-end
-
-
- -
-

- - .cmd_parser_manpage_lines(cmd_parser) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-
-
# File 'manpages.rb', line 99
-
-def self.cmd_parser_manpage_lines(cmd_parser)
-  lines = [format_usage_banner(cmd_parser.usage_banner_text)]
-  lines += cmd_parser.processed_options.filter_map do |short, long, _, desc, hidden|
-    next if hidden
-
-    if long.present?
-      next if Homebrew::CLI::Parser.global_options.include?([short, long, desc])
-      next if Homebrew::CLI::Parser.global_cask_options.any? do |_, option, kwargs|
-                [long, "#{long}="].include?(option) && kwargs.fetch(:description) == desc
-              end
-    end
-
-    generate_option_doc(short, long, desc)
-  end
-  lines
-end
-
-
- -
-

- - .env_vars_manpageString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-
-
# File 'manpages.rb', line 163
-
-def self.env_vars_manpage
-  lines = Homebrew::EnvConfig::ENVS.flat_map do |env, hash|
-    entry = "`#{env}`\n\n: #{hash[:description]}\n"
-    default = hash[:default_text]
-    default ||= "`#{hash[:default]}`." if hash[:default]
-    entry += "\n\n    *Default:* #{default}\n" if default
-
-    entry
-  end
-  lines.join("\n")
-end
-
-
- -
-

- - .format_opt(opt) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-175
-176
-177
-
-
# File 'manpages.rb', line 175
-
-def self.format_opt(opt)
-  "`#{opt}`" unless opt.nil?
-end
-
-
- -
-

- - .format_usage_banner(usage_banner) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-189
-190
-191
-192
-
-
# File 'manpages.rb', line 189
-
-def self.format_usage_banner(usage_banner)
-  usage_banner&.sub(/^(#: *\* )?/, "### ")
-              &.gsub(/(?<!`)\[([^\[\]]*)\](?!`)/, "\\[\\1\\]") # escape [] character (except those in code spans)
-end
-
-
- -
-

- - .generate_cmd_manpages(cmd_paths) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-
-
# File 'manpages.rb', line 77
-
-def self.generate_cmd_manpages(cmd_paths)
-  man_page_lines = []
-
-  # preserve existing manpage order
-  cmd_paths.sort_by { sort_key_for_path(_1) }
-           .each do |cmd_path|
-    cmd_man_page_lines = if (cmd_parser = Homebrew::CLI::Parser.from_cmd_path(cmd_path))
-      next if cmd_parser.hide_from_man_page
-
-      cmd_parser_manpage_lines(cmd_parser).join
-    else
-      cmd_comment_manpage_lines(cmd_path)&.join("\n")
-    end
-    # Convert subcommands to definition lists
-    cmd_man_page_lines&.gsub!(/(?<=\n\n)([\\?\[`].+):\n/, "\\1\n\n: ")
-
-    man_page_lines << cmd_man_page_lines
-  end
-
-  man_page_lines.compact.join("\n")
-end
-
-
- -
-

- - .generate_option_doc(short, long, desc) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
-
# File 'manpages.rb', line 179
-
-def self.generate_option_doc(short, long, desc)
-  comma = (short && long) ? ", " : ""
-  <<~EOS
-    #{format_opt(short)}#{comma}#{format_opt(long)}
-
-    : #{desc}
-
-  EOS
-end
-
-
- -
-

- - .global_cask_options_manpageString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-144
-145
-146
-147
-148
-149
-150
-151
-
-
# File 'manpages.rb', line 144
-
-def self.global_cask_options_manpage
-  lines = ["These options are applicable to the `install`, `reinstall` and `upgrade` " \
-           "subcommands with the `--cask` switch.\n"]
-  lines += Homebrew::CLI::Parser.global_cask_options.map do |_, long, kwargs|
-    generate_option_doc(nil, long.chomp("="), kwargs.fetch(:description))
-  end
-  lines.join("\n")
-end
-
-
- -
-

- - .global_options_manpageString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-154
-155
-156
-157
-158
-159
-160
-
-
# File 'manpages.rb', line 154
-
-def self.global_options_manpage
-  lines = ["These options are applicable across multiple subcommands.\n"]
-  lines += Homebrew::CLI::Parser.global_options.map do |short, long, desc|
-    generate_option_doc(short, long, desc)
-  end
-  lines.join("\n")
-end
-
-
- -
-

- - .regenerate_man_pages(quiet:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'manpages.rb', line 28
-
-def self.regenerate_man_pages(quiet:)
-  require "kramdown"
-  require "manpages/parser/ronn"
-  require "manpages/converter/kramdown"
-  require "manpages/converter/roff"
-
-  markup = build_man_page(quiet:)
-  root, warnings = Parser::Ronn.parse(markup)
-  $stderr.puts(warnings)
-
-  roff, warnings = Converter::Kramdown.convert(root)
-  $stderr.puts(warnings)
-  File.write(TARGET_DOC_PATH/"Manpage.md", roff)
-
-  roff, warnings = Converter::Roff.convert(root)
-  $stderr.puts(warnings)
-  File.write(TARGET_MAN_PATH/"brew.1", roff)
-end
-
-
- -
-

- - .sort_key_for_path(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-72
-73
-74
-75
-
-
# File 'manpages.rb', line 72
-
-def self.sort_key_for_path(path)
-  # Options after regular commands (`~` comes after `z` in ASCII table).
-  path.basename.to_s.sub(/\.(rb|sh)$/, "").sub(/^--/, "~~")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Manpages/Converter.html b/docs/Homebrew/Manpages/Converter.html deleted file mode 100644 index 2d301ae31..000000000 --- a/docs/Homebrew/Manpages/Converter.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: Homebrew::Manpages::Converter - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Manpages::Converter - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
manpages/converter/roff.rb,
- manpages/converter/kramdown.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Kramdown, Roff - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Manpages/Converter/Kramdown.html b/docs/Homebrew/Manpages/Converter/Kramdown.html deleted file mode 100644 index 365bf32d3..000000000 --- a/docs/Homebrew/Manpages/Converter/Kramdown.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - Class: Homebrew::Manpages::Converter::Kramdown - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Manpages::Converter::Kramdown - - - Private -

-
- -
-
Inherits:
-
- Kramdown::Converter::Kramdown - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
manpages/converter/kramdown.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Converts our Kramdown-like input to pure Kramdown.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(root, options) ⇒ Kramdown - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Kramdown.

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'manpages/converter/kramdown.rb', line 11
-
-def initialize(root, options)
-  super(root, options.merge(line_width: 80))
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #convert_a(element, options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'manpages/converter/kramdown.rb', line 19
-
-def convert_a(element, options)
-  text = inner(element, options)
-  if element.attr["href"] == text
-    # Don't duplicate the URL if the link text is the same as the URL.
-    "<#{text}>"
-  else
-    super
-  end
-end
-
-
- -
-

- - #convert_variable(element, _options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'manpages/converter/kramdown.rb', line 15
-
-def convert_variable(element, _options)
-  "*`#{element.value}`*"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Manpages/Converter/Roff.html b/docs/Homebrew/Manpages/Converter/Roff.html deleted file mode 100644 index 92cc5245f..000000000 --- a/docs/Homebrew/Manpages/Converter/Roff.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - Class: Homebrew::Manpages::Converter::Roff - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Manpages::Converter::Roff - - - Private -

-
- -
-
Inherits:
-
- Kramdown::Converter::Man - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
manpages/converter/roff.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Converts our Kramdown-like input to roff.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Instance Method Details

- - -
-

- - #convert_a(element, options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'manpages/converter/roff.rb', line 35
-
-def convert_a(element, options)
-  if element.attr["href"].chr == "#"
-    # Hide internal links - just make them italicised
-    convert_em(element, options)
-  else
-    super
-    # Remove the space after links if the next character is not a space
-    if options[:result].end_with?(".UE\n") &&
-       (next_element = options[:next]) &&
-       next_element.type == :text &&
-       next_element.value.chr.present? # i.e. not a space character
-      options[:result].chomp!
-      options[:result] << " "
-    end
-  end
-end
-
-
- -
-

- - #convert_header(element, options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Override that adds Homebrew metadata for the top level header -and doesn't escape the text inside subheaders.

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'manpages/converter/roff.rb', line 13
-
-def convert_header(element, options)
-  if element.options[:level] == 1
-    element.attr["data-date"] = Date.today.strftime("%B %Y")
-    element.attr["data-extra"] = "Homebrew"
-    return super
-  end
-
-  result = +""
-  inner(element, options.merge(result:))
-  result.gsub!(" [", ' \fR[') # make args not bold
-
-  options[:result] << if element.options[:level] == 2
-    macro("SH", quote(result))
-  else
-    macro("SS", quote(result))
-  end
-end
-
-
- -
-

- - #convert_variable(element, options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'manpages/converter/roff.rb', line 31
-
-def convert_variable(element, options)
-  options[:result] << "\\fI#{escape(element.value)}\\fP"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Manpages/Parser.html b/docs/Homebrew/Manpages/Parser.html deleted file mode 100644 index 8edbd0038..000000000 --- a/docs/Homebrew/Manpages/Parser.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Module: Homebrew::Manpages::Parser - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Manpages::Parser - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
manpages/parser/ronn.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Ronn - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Manpages/Parser/Ronn.html b/docs/Homebrew/Manpages/Parser/Ronn.html deleted file mode 100644 index 9571cbc09..000000000 --- a/docs/Homebrew/Manpages/Parser/Ronn.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - Class: Homebrew::Manpages::Parser::Ronn - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Manpages::Parser::Ronn - - - Private -

-
- -
-
Inherits:
-
- Kramdown::Parser::Kramdown - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
manpages/parser/ronn.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Kramdown parser with compatiblity for ronn variable syntax.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
VARIABLE_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

HTML-like tags denote variables instead, except
.

- - -
-
-
- - -
-
-
/<([\w\-\|]+)>/
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initializeRonn - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Ronn.

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'manpages/parser/ronn.rb', line 11
-
-def initialize(*)
-  super
-  # Disable HTML parsing and replace it with variable parsing.
-  # Also disable table parsing too because it depends on HTML parsing
-  # and existing command descriptions may get misinterpreted as tables.
-  # Typographic symbols is disabled as it detects `--` as en-dash.
-  @block_parsers.delete(:block_html)
-  @block_parsers.delete(:table)
-  @span_parsers.delete(:span_html)
-  @span_parsers.delete(:typographic_syms)
-  @span_parsers << :variable
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #parse_variableObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'manpages/parser/ronn.rb', line 26
-
-def parse_variable
-  start_line_number = @src.current_line_number
-  @src.scan(VARIABLE_REGEX)
-  variable = @src[1]
-  if variable == "br"
-    @src.skip(/\n/)
-    @tree.children << Element.new(:br, nil, nil, location: start_line_number)
-  else
-    @tree.children << Element.new(:variable, variable, nil, location: start_line_number)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Manpages/Variables.html b/docs/Homebrew/Manpages/Variables.html deleted file mode 100644 index f2d6fa6a6..000000000 --- a/docs/Homebrew/Manpages/Variables.html +++ /dev/null @@ -1,1125 +0,0 @@ - - - - - - - Class: Homebrew::Manpages::Variables - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Manpages::Variables - - - Private -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
manpages.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #alumni ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute alumni.

    -
    - -
  • - - - -
  • - - - #commands ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute commands.

    -
    - -
  • - - - -
  • - - - #developer_commands ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute developer_commands.

    -
    - -
  • - - - -
  • - - - #environment_variables ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute environment_variables.

    -
    - -
  • - - - -
  • - - - #global_cask_options ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute global_cask_options.

    -
    - -
  • - - - -
  • - - - #global_options ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute global_options.

    -
    - -
  • - - - -
  • - - - #lead ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute lead.

    -
    - -
  • - - - -
  • - - - #maintainers ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute maintainers.

    -
    - -
  • - - - -
  • - - - #official_external_commands ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute official_external_commands.

    -
    - -
  • - - - -
  • - - - #plc ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute plc.

    -
    - -
  • - - - -
  • - - - #tsc ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute tsc.

    -
    - -
  • - - -
- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #alumniObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute alumni

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of alumni

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def alumni
-  @alumni
-end
-
-
- - - -
-

- - #commandsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute commands

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of commands

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def commands
-  @commands
-end
-
-
- - - -
-

- - #developer_commandsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute developer_commands

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of developer_commands

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def developer_commands
-  @developer_commands
-end
-
-
- - - -
-

- - #environment_variablesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute environment_variables

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of environment_variables

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def environment_variables
-  @environment_variables
-end
-
-
- - - -
-

- - #global_cask_optionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute global_cask_options

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of global_cask_options

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def global_cask_options
-  @global_cask_options
-end
-
-
- - - -
-

- - #global_optionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute global_options

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of global_options

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def global_options
-  @global_options
-end
-
-
- - - -
-

- - #leadObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute lead

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of lead

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def lead
-  @lead
-end
-
-
- - - -
-

- - #maintainersObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute maintainers

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of maintainers

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def maintainers
-  @maintainers
-end
-
-
- - - -
-

- - #official_external_commandsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute official_external_commands

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of official_external_commands

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def official_external_commands
-  @official_external_commands
-end
-
-
- - - -
-

- - #plcObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute plc

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of plc

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def plc
-  @plc
-end
-
-
- - - -
-

- - #tscObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute tsc

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of tsc

    -
    - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'manpages.rb', line 13
-
-def tsc
-  @tsc
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/MissingFormula.html b/docs/Homebrew/MissingFormula.html deleted file mode 100644 index 4fa48cf0e..000000000 --- a/docs/Homebrew/MissingFormula.html +++ /dev/null @@ -1,900 +0,0 @@ - - - - - - - Module: Homebrew::MissingFormula - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::MissingFormula - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
missing_formula.rb,
- extend/os/mac/missing_formula.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for checking if there is a reason a formula is missing.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .cask_reason(name, silent: false, show_info: false) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - silent - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - show_info - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-
-
# File 'extend/os/mac/missing_formula.rb', line 24
-
-def cask_reason(name, silent: false, show_info: false)
-  return if silent
-
-  suggest_command(name, show_info ? "info" : "install")
-end
-
-
- -
-

- - .deleted_reason(name, silent: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-
-
# File 'missing_formula.rb', line 130
-
-def deleted_reason(name, silent: false)
-  path = Formulary.path name
-  return if File.exist? path
-
-  tap = Tap.from_path(path)
-  return if tap.nil? || !File.exist?(tap.path)
-
-  relative_path = path.relative_path_from tap.path
-
-  tap.path.cd do
-    unless silent
-      ohai "Searching for a previously deleted formula (in the last month)..."
-      if (tap.path/".git/shallow").exist?
-        opoo <<~EOS
-          #{tap} is shallow clone. To get its complete history, run:
-            git -C "$(brew --repo #{tap})" fetch --unshallow
-
-        EOS
-      end
-    end
-
-    # Optimization for the core tap which has many monthly commits
-    if tap.core_tap?
-      # Check if the formula has been deleted in the last month.
-      diff_command = ["git", "diff", "--diff-filter=D", "--name-only",
-                      "@{'1 month ago'}", "--", relative_path]
-      deleted_formula = Utils.popen_read(*diff_command)
-
-      if deleted_formula.blank?
-        ofail "No previously deleted formula found." unless silent
-        return
-      end
-    end
-
-    # Find commit where formula was deleted in the last month.
-    log_command = "git log --since='1 month ago' --diff-filter=D " \
-                  "--name-only --max-count=1 " \
-                  "--format=%H\\\\n%h\\\\n%B -- #{relative_path}"
-    hash, short_hash, *commit_message, relative_path =
-      Utils.popen_read(log_command).gsub("\\n", "\n").lines.map(&:chomp)
-
-    if hash.blank? || short_hash.blank? || relative_path.blank?
-      ofail "No previously deleted formula found." unless silent
-      return
-    end
-
-    commit_message = commit_message.reject(&:empty?).join("\n  ")
-
-    commit_message.sub!(/ \(#(\d+)\)$/, " (#{tap.issues_url}/\\1)")
-    commit_message.gsub!(/(Closes|Fixes) #(\d+)/, "\\1 #{tap.issues_url}/\\2")
-
-    <<~EOS
-      #{name} was deleted from #{tap.name} in commit #{short_hash}:
-        #{commit_message}
-
-      To show the formula before removal, run:
-        git -C "$(brew --repo #{tap})" show #{short_hash}^:#{relative_path}
-
-      If you still use this formula, consider creating your own tap:
-        #{Formatter.url("https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap")}
-    EOS
-  end
-end
-
-
- -
-

- - .disallowed_reason(name) ⇒ String? - - - - Also known as: - generic_disallowed_reason - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'extend/os/mac/missing_formula.rb', line 12
-
-def disallowed_reason(name)
-  case name.downcase
-  when "xcode"
-    <<~EOS
-      Xcode can be installed from the App Store.
-    EOS
-  else
-    generic_disallowed_reason(name)
-  end
-end
-
-
- -
-

- - .reason(name, silent: false, show_info: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-
-
# File 'missing_formula.rb', line 10
-
-def reason(name, silent: false, show_info: false)
-  cask_reason(name, silent:, show_info:) || disallowed_reason(name) ||
-    tap_migration_reason(name) || deleted_reason(name, silent:)
-end
-
-
- -
-

- - .suggest_command(name, command) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - command - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'extend/os/mac/missing_formula.rb', line 31
-
-def suggest_command(name, command)
-  suggestion = <<~EOS
-    Found a cask named "#{name}" instead. Try
-      brew #{command} --cask #{name}
-
-  EOS
-  case command
-  when "install"
-    Cask::CaskLoader.load(name)
-  when "uninstall"
-    cask = Cask::Caskroom.casks.find { |installed_cask| installed_cask.to_s == name }
-    raise Cask::CaskUnavailableError, name if cask.nil?
-  when "info"
-    cask = Cask::CaskLoader.load(name)
-    suggestion = <<~EOS
-      Found a cask named "#{name}" instead.
-
-      #{Cask::Info.get_info(cask)}
-    EOS
-  else
-    return
-  end
-  suggestion
-rescue Cask::CaskUnavailableError
-  nil
-end
-
-
- -
-

- - .tap_migration_reason(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
-
# File 'missing_formula.rb', line 96
-
-def tap_migration_reason(name)
-  message = T.let(nil, T.nilable(String))
-
-  Tap.each do |old_tap|
-    new_tap = old_tap.tap_migrations[name]
-    next unless new_tap
-
-    new_tap_user, new_tap_repo, new_tap_new_name = new_tap.split("/")
-    new_tap_name = "#{new_tap_user}/#{new_tap_repo}"
-
-    message = <<~EOS
-      It was migrated from #{old_tap} to #{new_tap}.
-    EOS
-    break if new_tap_name == CoreTap.instance.name
-
-    install_cmd = if new_tap_name.start_with?("homebrew/cask")
-      "install --cask"
-    else
-      "install"
-    end
-    new_tap_new_name ||= name
-
-    message += <<~EOS
-      You can access it again by running:
-        brew tap #{new_tap_name}
-      And then you can install it by running:
-        brew #{install_cmd} #{new_tap_new_name}
-    EOS
-    break
-  end
-
-  message
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Parlour.html b/docs/Homebrew/Parlour.html deleted file mode 100644 index 889d00ed2..000000000 --- a/docs/Homebrew/Parlour.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - Module: Homebrew::Parlour - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Parlour - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/parlour.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Parlour type signature generator helper class for Homebrew.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
ROOT_DIR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.let(Pathname(T.must(__dir__)).parent.realpath.freeze, Pathname).freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .ast_listArray<Parser::AST::Node> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<Parser::AST::Node>) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'sorbet/parlour.rb', line 16
-
-def self.ast_list
-  @ast_list ||= begin
-    ast_list = []
-    parser = Parser::CurrentRuby.new
-    prune_dirs = %w[sorbet shims test vendor].freeze
-
-    ROOT_DIR.find do |path|
-      Find.prune if path.directory? && prune_dirs.any? { |subdir| path == ROOT_DIR/subdir }
-
-      Find.prune if path.file? && path.extname != ".rb"
-
-      next unless path.file?
-
-      buffer = Parser::Source::Buffer.new(path, source: path.read)
-
-      parser.reset
-      ast = parser.parse(buffer)
-      ast_list << ast if ast
-    end
-
-    ast_list
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/ResourceAuditor.html b/docs/Homebrew/ResourceAuditor.html deleted file mode 100644 index e4486d0a7..000000000 --- a/docs/Homebrew/ResourceAuditor.html +++ /dev/null @@ -1,1860 +0,0 @@ - - - - - - - Class: Homebrew::ResourceAuditor - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::ResourceAuditor - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Utils::Curl
-
- - - - - - -
-
Defined in:
-
resource_auditor.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Auditor for checking common violations in Resources.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

-
-

Constructor Details

- -
-

- - #initialize(resource, spec_name, options = {}) ⇒ ResourceAuditor - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ResourceAuditor.

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'resource_auditor.rb', line 11
-
-def initialize(resource, spec_name, options = {})
-  @name     = resource.name
-  @version  = resource.version
-  @checksum = resource.checksum
-  @url      = resource.url
-  @mirrors  = resource.mirrors
-  @using    = resource.using
-  @specs    = resource.specs
-  @owner    = resource.owner
-  @spec_name = spec_name
-  @online    = options[:online]
-  @strict    = options[:strict]
-  @only      = options[:only]
-  @except    = options[:except]
-  @use_homebrew_curl = options[:use_homebrew_curl]
-  @problems = []
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #checksumObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def checksum
-  @checksum
-end
-
-
- - - -
-

- - #mirrorsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def mirrors
-  @mirrors
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def name
-  @name
-end
-
-
- - - -
-

- - #ownerObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def owner
-  @owner
-end
-
-
- - - -
-

- - #problemsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def problems
-  @problems
-end
-
-
- - - -
-

- - #spec_nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def spec_name
-  @spec_name
-end
-
-
- - - -
-

- - #specsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def specs
-  @specs
-end
-
-
- - - -
-

- - #urlObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def url
-  @url
-end
-
-
- - - -
-

- - #usingObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def using
-  @using
-end
-
-
- - - -
-

- - #versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'resource_auditor.rb', line 9
-
-def version
-  @version
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .curl_depsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'resource_auditor.rb', line 99
-
-def self.curl_deps
-  @curl_deps ||= begin
-    ["curl"] + Formula["curl"].recursive_dependencies.map(&:name).uniq
-  rescue FormulaUnavailableError
-    []
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #auditObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-
-
# File 'resource_auditor.rb', line 29
-
-def audit
-  only_audits = @only
-  except_audits = @except
-
-  methods.map(&:to_s).grep(/^audit_/).each do |audit_method_name|
-    name = audit_method_name.delete_prefix("audit_")
-    next if only_audits&.exclude?(name)
-    next if except_audits&.include?(name)
-
-    send(audit_method_name)
-  end
-
-  self
-end
-
-
- -
-

- - #audit_checksumObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-90
-91
-92
-93
-94
-95
-96
-97
-
-
# File 'resource_auditor.rb', line 90
-
-def audit_checksum
-  return if spec_name == :head
-  # rubocop:disable Style/InvertibleUnlessCondition (non-invertible)
-  return unless DownloadStrategyDetector.detect(url, using) <= CurlDownloadStrategy
-  # rubocop:enable Style/InvertibleUnlessCondition
-
-  problem "Checksum is missing" if checksum.blank?
-end
-
-
- -
-

- - #audit_download_strategyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-
-
# File 'resource_auditor.rb', line 60
-
-def audit_download_strategy
-  url_strategy = DownloadStrategyDetector.detect(url)
-
-  if (using == :git || url_strategy == GitDownloadStrategy) && specs[:tag] && !specs[:revision]
-    problem "Git should specify :revision when a :tag is specified."
-  end
-
-  return unless using
-
-  if using == :cvs
-    mod = specs[:module]
-
-    problem "Redundant :module value in URL" if mod == name
-
-    if url.match?(%r{:[^/]+$})
-      mod = url.split(":").last
-
-      if mod == name
-        problem "Redundant CVS module appended to URL"
-      else
-        problem "Specify CVS module as `:module => \"#{mod}\"` instead of appending it to the URL"
-      end
-    end
-  end
-
-  return if url_strategy != DownloadStrategyDetector.detect("", using)
-
-  problem "Redundant :using value in URL"
-end
-
-
- -
-

- - #audit_head_branchObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-
-
# File 'resource_auditor.rb', line 166
-
-def audit_head_branch
-  return unless @online
-  return unless @strict
-  return if spec_name != :head
-  return unless Utils::Git.remote_exists?(url)
-  return if specs[:tag].present?
-  return if specs[:revision].present?
-
-  branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD")
-                .match(%r{ref: refs/heads/(.*?)\s+HEAD})&.to_a&.second
-  return if branch.blank? || branch == specs[:branch]
-
-  problem "Use `branch: \"#{branch}\"` to specify the default branch"
-end
-
-
- -
-

- - #audit_resource_name_matches_pypi_package_name_in_urlObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-
-
# File 'resource_auditor.rb', line 107
-
-def audit_resource_name_matches_pypi_package_name_in_url
-  return unless url.match?(%r{^https?://files\.pythonhosted\.org/packages/})
-  return if name == owner.name # Skip the top-level package name as we only care about `resource "foo"` blocks.
-
-  url =~ %r{/(?<package_name>[^/]+)-}
-  pypi_package_name = Regexp.last_match(:package_name).to_s.gsub(/[_.]/, "-")
-  return if name.casecmp(pypi_package_name).zero?
-
-  problem "resource name should be `#{pypi_package_name}` to match the PyPI package name"
-end
-
-
- -
-

- - #audit_urlsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-
-
# File 'resource_auditor.rb', line 118
-
-def audit_urls
-  urls = [url] + mirrors
-
-  curl_dep = self.class.curl_deps.include?(owner.name)
-  # Ideally `ca-certificates` would not be excluded here, but sourcing a HTTP mirror was tricky.
-  # Instead, we have logic elsewhere to pass `--insecure` to curl when downloading the certs.
-  # TODO: try remove the OS/env conditional
-  if Homebrew::SimulateSystem.simulating_or_running_on_macos? && spec_name == :stable &&
-     owner.name != "ca-certificates" && curl_dep && !urls.find { |u| u.start_with?("http://") }
-    problem "should always include at least one HTTP mirror"
-  end
-
-  return unless @online
-
-  urls.each do |url|
-    next if !@strict && mirrors.include?(url)
-
-    strategy = DownloadStrategyDetector.detect(url, using)
-    if strategy <= CurlDownloadStrategy && !url.start_with?("file")
-
-      raise HomebrewCurlDownloadStrategyError, url if
-        strategy <= HomebrewCurlDownloadStrategy && !Formula["curl"].any_version_installed?
-
-      if (http_content_problem = curl_check_http_content(
-        url,
-        "source URL",
-        specs:,
-        use_homebrew_curl: @use_homebrew_curl,
-      ))
-        problem http_content_problem
-      end
-    elsif strategy <= GitDownloadStrategy
-      attempts = 0
-      remote_exists = T.let(false, T::Boolean)
-      while !remote_exists && attempts < Homebrew::EnvConfig.curl_retries.to_i
-        remote_exists = Utils::Git.remote_exists?(url)
-        attempts += 1
-      end
-      problem "The URL #{url} is not a valid git URL" unless remote_exists
-    elsif strategy <= SubversionDownloadStrategy
-      next unless DevelopmentTools.subversion_handles_most_https_certificates?
-      next unless Utils::Svn.available?
-
-      problem "The URL #{url} is not a valid svn URL" unless Utils::Svn.remote_exists? url
-    end
-  end
-end
-
-
- -
-

- - #audit_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'resource_auditor.rb', line 44
-
-def audit_version
-  if version.nil?
-    problem "missing version"
-  elsif owner.is_a?(Formula) && !version.to_s.match?(GitHubPackages::VALID_OCI_TAG_REGEX) &&
-        (owner.core_formula? ||
-        (owner.bottle_defined? && GitHubPackages::URL_REGEX.match?(owner.bottle_specification.root_url)))
-    problem "version #{version} does not match #{GitHubPackages::VALID_OCI_TAG_REGEX.source}"
-  elsif !version.detected_from_url?
-    version_text = version
-    version_url = Version.detect(url, **specs)
-    if version_url.to_s == version_text.to_s && version.instance_of?(Version)
-      problem "version #{version_text} is redundant with version scanned from URL"
-    end
-  end
-end
-
-
- -
-

- - #problem(text) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-181
-182
-183
-
-
# File 'resource_auditor.rb', line 181
-
-def problem(text)
-  @problems << text
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Search.html b/docs/Homebrew/Search.html deleted file mode 100644 index 0eecee498..000000000 --- a/docs/Homebrew/Search.html +++ /dev/null @@ -1,936 +0,0 @@ - - - - - - - Module: Homebrew::Search - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Search - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
search.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for searching formulae or casks.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .query_regexp(query) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-
-
# File 'search.rb', line 9
-
-def self.query_regexp(query)
-  if (m = query.match(%r{^/(.*)/$}))
-    Regexp.new(m[1])
-  else
-    query
-  end
-rescue RegexpError
-  raise "#{query} is not a valid regex."
-end
-
-
- -
-

- - .search(selectable, string_or_regex, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-123
-124
-125
-126
-127
-128
-129
-130
-
-
# File 'search.rb', line 123
-
-def self.search(selectable, string_or_regex, &block)
-  case string_or_regex
-  when Regexp
-    search_regex(selectable, string_or_regex, &block)
-  else
-    search_string(selectable, string_or_regex.to_str, &block)
-  end
-end
-
-
- -
-

- - .search_casks(string_or_regex) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-
-
# File 'search.rb', line 73
-
-def self.search_casks(string_or_regex)
-  if string_or_regex.is_a?(String) && string_or_regex.match?(HOMEBREW_TAP_CASK_REGEX)
-    return begin
-      [Cask::CaskLoader.load(string_or_regex).token]
-    rescue Cask::CaskUnavailableError
-      []
-    end
-  end
-
-  cask_tokens = Tap.each_with_object([]) do |tap, array|
-    # We can exclude the core cask tap because `CoreCaskTap#cask_tokens` returns short names by default.
-    if tap.official? && !tap.core_cask_tap?
-      tap.cask_tokens.each { |token| array << token.sub(%r{^homebrew/cask.*/}, "") }
-    else
-      tap.cask_tokens.each { |token| array << token }
-    end
-  end.uniq
-
-  results = search(cask_tokens, string_or_regex)
-  results += DidYouMean::SpellChecker.new(dictionary: cask_tokens)
-                                     .correct(string_or_regex)
-
-  results.sort.map do |name|
-    cask = Cask::CaskLoader.load(name)
-    if cask.installed?
-      pretty_installed(cask.full_name)
-    else
-      cask.full_name
-    end
-  end.uniq
-end
-
-
- -
-

- - .search_descriptions(string_or_regex, args, search_type: :desc) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
# File 'search.rb', line 19
-
-def self.search_descriptions(string_or_regex, args, search_type: :desc)
-  both = !args.formula? && !args.cask?
-  eval_all = args.eval_all? || Homebrew::EnvConfig.eval_all?
-
-  if args.formula? || both
-    ohai "Formulae"
-    CacheStoreDatabase.use(:descriptions) do |db|
-      cache_store = DescriptionCacheStore.new(db)
-      Descriptions.search(string_or_regex, search_type, cache_store, eval_all).print
-    end
-  end
-  return if !args.cask? && !both
-
-  puts if both
-
-  ohai "Casks"
-  CacheStoreDatabase.use(:cask_descriptions) do |db|
-    cache_store = CaskDescriptionCacheStore.new(db)
-    Descriptions.search(string_or_regex, search_type, cache_store, eval_all).print
-  end
-end
-
-
- -
-

- - .search_formulae(string_or_regex) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'search.rb', line 41
-
-def self.search_formulae(string_or_regex)
-  if string_or_regex.is_a?(String) && string_or_regex.match?(HOMEBREW_TAP_FORMULA_REGEX)
-    return begin
-      [Formulary.factory(string_or_regex).name]
-    rescue FormulaUnavailableError
-      []
-    end
-  end
-
-  aliases = Formula.alias_full_names
-  results = search(Formula.full_names + aliases, string_or_regex).sort
-  results |= Formula.fuzzy_search(string_or_regex).map { |n| Formulary.factory(n).full_name }
-
-  results.filter_map do |name|
-    formula, canonical_full_name = begin
-      f = Formulary.factory(name)
-      [f, f.full_name]
-    rescue
-      [nil, name]
-    end
-
-    # Ignore aliases from results when the full name was also found
-    next if aliases.include?(name) && results.include?(canonical_full_name)
-
-    if formula&.any_version_installed?
-      pretty_installed(name)
-    elsif formula.nil? || formula.valid_platform?
-      name
-    end
-  end
-end
-
-
- -
-

- - .search_names(string_or_regex, args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-
-
# File 'search.rb', line 105
-
-def self.search_names(string_or_regex, args)
-  both = !args.formula? && !args.cask?
-
-  all_formulae = if args.formula? || both
-    search_formulae(string_or_regex)
-  else
-    []
-  end
-
-  all_casks = if args.cask? || both
-    search_casks(string_or_regex)
-  else
-    []
-  end
-
-  [all_formulae, all_casks]
-end
-
-
- -
-

- - .search_regex(selectable, regex) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-136
-137
-138
-139
-140
-141
-142
-
-
# File 'search.rb', line 136
-
-def self.search_regex(selectable, regex)
-  selectable.select do |*args|
-    args = yield(*args) if block_given?
-    args = Array(args).flatten.compact
-    args.any? { |arg| arg.match?(regex) }
-  end
-end
-
-
- -
-

- - .search_string(selectable, string) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-144
-145
-146
-147
-148
-149
-150
-151
-
-
# File 'search.rb', line 144
-
-def self.search_string(selectable, string)
-  simplified_string = simplify_string(string)
-  selectable.select do |*args|
-    args = yield(*args) if block_given?
-    args = Array(args).flatten.compact
-    args.any? { |arg| simplify_string(arg).include?(simplified_string) }
-  end
-end
-
-
- -
-

- - .simplify_string(string) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-132
-133
-134
-
-
# File 'search.rb', line 132
-
-def self.simplify_string(string)
-  string.downcase.gsub(/[^a-z\d]/i, "")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Service.html b/docs/Homebrew/Service.html deleted file mode 100644 index 185dfbd57..000000000 --- a/docs/Homebrew/Service.html +++ /dev/null @@ -1,5744 +0,0 @@ - - - - - - - Class: Homebrew::Service - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Service - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
OnSystem::MacOSAndLinux
-
- - - - - - -
-
Defined in:
-
service.rb,
- service.rbi,
sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

The Service class implements the DSL methods used in a formula's -service block and stores related instance variables. Most of these methods -also return the related instance variable when no argument is provided.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
RUN_TYPE_IMMEDIATE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
:immediate
- -
RUN_TYPE_INTERVAL = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
:interval
- -
RUN_TYPE_CRON = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
:cron
- -
PROCESS_TYPE_BACKGROUND = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
:background
- -
PROCESS_TYPE_STANDARD = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
:standard
- -
PROCESS_TYPE_INTERACTIVE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
:interactive
- -
PROCESS_TYPE_ADAPTIVE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
:adaptive
- -
KEEP_ALIVE_KEYS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:always, :successful_exit, :crashed, :path].freeze
- -
SOCKET_STRING_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%r{^([a-z]+)://(.+):([0-9]+)$}i
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from OnSystem::MacOSAndLinux

-

included

-
-

Constructor Details

- -
-

- - #initialize(formula, &block) ⇒ Service - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

sig { params(formula: Formula).void }

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'service.rb', line 27
-
-def initialize(formula, &block)
-  @formula = formula
-  @run_type = RUN_TYPE_IMMEDIATE
-  @run_at_load = true
-  @environment_variables = {}
-  instance_eval(&block) if block
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_hash(api_hash) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Turn the service API hash values back into what is expected by the formula DSL.

- - -
-
-
-

Parameters:

-
    - -
  • - - api_hash - - - (Hash) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-592
-593
-594
-595
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-631
-632
-633
-
-
# File 'service.rb', line 570
-
-def self.from_hash(api_hash)
-  hash = {}
-  hash[:name] = api_hash["name"].transform_keys(&:to_sym) if api_hash.key?("name")
-
-  # The service hash might not have a "run" command if it only documents
-  # an existing service file with the "name" command.
-  return hash unless api_hash.key?("run")
-
-  hash[:run] =
-    case api_hash["run"]
-    when String
-      replace_placeholders(api_hash["run"])
-    when Array
-      api_hash["run"].map { replace_placeholders(_1) }
-    when Hash
-      api_hash["run"].to_h do |key, elem|
-        run_cmd = if elem.is_a?(Array)
-          elem.map { replace_placeholders(_1) }
-        else
-          replace_placeholders(elem)
-        end
-
-        [key.to_sym, run_cmd]
-      end
-    else
-      raise ArgumentError, "Unexpected run command: #{api_hash["run"]}"
-    end
-
-  if api_hash.key?("environment_variables")
-    hash[:environment_variables] = api_hash["environment_variables"].to_h do |key, value|
-      [key.to_sym, replace_placeholders(value)]
-    end
-  end
-
-  %w[run_type process_type].each do |key|
-    next unless (value = api_hash[key])
-
-    hash[key.to_sym] = value.to_sym
-  end
-
-  %w[working_dir root_dir input_path log_path error_log_path].each do |key|
-    next unless (value = api_hash[key])
-
-    hash[key.to_sym] = replace_placeholders(value)
-  end
-
-  %w[interval cron launch_only_once require_root restart_delay macos_legacy_timers].each do |key|
-    next if (value = api_hash[key]).nil?
-
-    hash[key.to_sym] = value
-  end
-
-  %w[sockets keep_alive].each do |key|
-    next unless (value = api_hash[key])
-
-    hash[key.to_sym] = if value.is_a?(Hash)
-      value.transform_keys(&:to_sym)
-    else
-      value
-    end
-  end
-
-  hash
-end
-
-
- -
-

- - .replace_placeholders(string) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Replace API path placeholders with local paths.

- - -
-
-
-

Parameters:

-
    - -
  • - - string - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-637
-638
-639
-640
-641
-
-
# File 'service.rb', line 637
-
-def self.replace_placeholders(string)
-  string.gsub(HOMEBREW_PREFIX_PLACEHOLDER, HOMEBREW_PREFIX)
-        .gsub(HOMEBREW_CELLAR_PLACEHOLDER, HOMEBREW_CELLAR)
-        .gsub(HOMEBREW_HOME_PLACEHOLDER, Dir.home)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #bin(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-388
-
-
# File 'sorbet/rbi/parlour.rbi', line 388
-
-def bin(*args, **options, &block); end
-
-
- -
-

- - #commandArray<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-365
-366
-367
-
-
# File 'service.rb', line 365
-
-def command
-  @run&.map(&:to_s)&.map { |arg| arg.start_with?("~") ? File.expand_path(arg) : arg }
-end
-
-
- -
-

- - #command?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-370
-371
-372
-
-
# File 'service.rb', line 370
-
-def command?
-  @run.present?
-end
-
-
- -
-

- - #cron(value = nil) ⇒ Hash? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-284
-285
-286
-287
-288
-289
-290
-291
-
-
# File 'service.rb', line 284
-
-def cron(value = nil)
-  case value
-  when nil
-    @cron
-  when String
-    @cron = parse_cron(T.must(value))
-  end
-end
-
-
- -
-

- - #default_cron_valuesHash{Symbol => Integer, String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-294
-295
-296
-297
-298
-299
-300
-301
-302
-
-
# File 'service.rb', line 294
-
-def default_cron_values
-  {
-    Month:   "*",
-    Day:     "*",
-    Weekday: "*",
-    Hour:    "*",
-    Minute:  "*",
-  }
-end
-
-
- -
-

- - #default_plist_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-41
-42
-43
-
-
# File 'service.rb', line 41
-
-def default_plist_name
-  "homebrew.mxcl.#{@formula.name}"
-end
-
-
- -
-

- - #default_service_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'service.rb', line 51
-
-def default_service_name
-  "homebrew.#{@formula.name}"
-end
-
-
- -
-

- - #environment_variables(variables = {}) ⇒ Hash{Symbol => String}? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - variables - - - (Hash{Symbol => String}) - - - (defaults to: {}) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-340
-341
-342
-343
-344
-345
-
-
# File 'service.rb', line 340
-
-def environment_variables(variables = {})
-  case variables
-  when Hash
-    @environment_variables = variables.transform_values(&:to_s)
-  end
-end
-
-
- -
-

- - #error_log_path(path = nil) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-135
-136
-137
-138
-139
-140
-141
-142
-
-
# File 'service.rb', line 135
-
-def error_log_path(path = nil)
-  case path
-  when nil
-    @error_log_path
-  when String, Pathname
-    @error_log_path = path.to_s
-  end
-end
-
-
- -
-

- - #etc(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-391
-
-
# File 'sorbet/rbi/parlour.rbi', line 391
-
-def etc(*args, **options, &block); end
-
-
- -
-

- - #fFormula - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-36
-37
-38
-
-
# File 'service.rb', line 36
-
-def f
-  @formula
-end
-
-
- -
-

- - #input_path(path = nil) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-115
-116
-117
-118
-119
-120
-121
-122
-
-
# File 'service.rb', line 115
-
-def input_path(path = nil)
-  case path
-  when nil
-    @input_path
-  when String, Pathname
-    @input_path = path.to_s
-  end
-end
-
-
- -
-

- - #interval(value = nil) ⇒ Integer? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Integer, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-274
-275
-276
-277
-278
-279
-280
-281
-
-
# File 'service.rb', line 274
-
-def interval(value = nil)
-  case value
-  when nil
-    @interval
-  when Integer
-    @interval = value
-  end
-end
-
-
- -
-

- - #keep_alive(value = nil) ⇒ Hash{Symbol => T.untyped}? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Boolean, Hash{Symbol => T.untyped}, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-
-
# File 'service.rb', line 148
-
-def keep_alive(value = nil)
-  case value
-  when nil
-    @keep_alive
-  when true, false
-    @keep_alive = { always: value }
-  when Hash
-    unless (value.keys - KEEP_ALIVE_KEYS).empty?
-      raise TypeError, "Service#keep_alive allows only #{KEEP_ALIVE_KEYS}"
-    end
-
-    @keep_alive = value
-  end
-end
-
-
- -
-

- - #keep_alive?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a Boolean describing if a service is set to be kept alive.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-223
-224
-225
-
-
# File 'service.rb', line 223
-
-def keep_alive?
-  @keep_alive.present? && @keep_alive[:always] != false
-end
-
-
- -
-

- - #launch_only_once(value = nil) ⇒ Boolean? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-228
-229
-230
-231
-232
-233
-234
-235
-
-
# File 'service.rb', line 228
-
-def launch_only_once(value = nil)
-  case value
-  when nil
-    @launch_only_once
-  when true, false
-    @launch_only_once = value
-  end
-end
-
-
- -
-

- - #libexec(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-394
-
-
# File 'sorbet/rbi/parlour.rbi', line 394
-
-def libexec(*args, **options, &block); end
-
-
- -
-

- - #log_path(path = nil) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-126
-127
-128
-129
-130
-131
-132
-
-
# File 'service.rb', line 125
-
-def log_path(path = nil)
-  case path
-  when nil
-    @log_path
-  when String, Pathname
-    @log_path = path.to_s
-  end
-end
-
-
- -
-

- - #macos_legacy_timers(value = nil) ⇒ Boolean? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-348
-349
-350
-351
-352
-353
-354
-355
-
-
# File 'service.rb', line 348
-
-def macos_legacy_timers(value = nil)
-  case value
-  when nil
-    @macos_legacy_timers
-  when true, false
-    @macos_legacy_timers = value
-  end
-end
-
-
- -
-

- - #manual_commandString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the String command to run manually instead of the service.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-377
-378
-379
-380
-381
-382
-383
-
-
# File 'service.rb', line 377
-
-def manual_command
-  vars = @environment_variables.except(:PATH)
-                               .map { |k, v| "#{k}=\"#{v}\"" }
-
-  out = vars + T.must(command).map { |arg| Utils::Shell.sh_quote(arg) } if command?
-  out.join(" ")
-end
-
-
- -
-

- - #name(macos: nil, linux: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - macos - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - linux - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Raises:

-
    - -
  • - - - (TypeError) - - - -
  • - -
- -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-
-
# File 'service.rb', line 61
-
-def name(macos: nil, linux: nil)
-  raise TypeError, "Service#name expects at least one String" if [macos, linux].none?(String)
-
-  @plist_name = macos if macos
-  @service_name = linux if linux
-end
-
-
- -
-

- - #on_system_conditional(macos: nil, linux: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-5
-
-
# File 'service.rbi', line 5
-
-def on_system_conditional(macos: nil, linux: nil); end
-
-
- -
-

- - #opt_bin(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-397
-
-
# File 'sorbet/rbi/parlour.rbi', line 397
-
-def opt_bin(*args, **options, &block); end
-
-
- -
-

- - #opt_libexec(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-400
-
-
# File 'sorbet/rbi/parlour.rbi', line 400
-
-def opt_libexec(*args, **options, &block); end
-
-
- -
-

- - #opt_pkgshare(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-403
-
-
# File 'sorbet/rbi/parlour.rbi', line 403
-
-def opt_pkgshare(*args, **options, &block); end
-
-
- -
-

- - #opt_prefix(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-406
-
-
# File 'sorbet/rbi/parlour.rbi', line 406
-
-def opt_prefix(*args, **options, &block); end
-
-
- -
-

- - #opt_sbin(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-409
-
-
# File 'sorbet/rbi/parlour.rbi', line 409
-
-def opt_sbin(*args, **options, &block); end
-
-
- -
-

- - #parse_cron(cron_statement) ⇒ Hash{Symbol => Integer, String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - cron_statement - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-
-
# File 'service.rb', line 305
-
-def parse_cron(cron_statement)
-  parsed = default_cron_values
-
-  case cron_statement
-  when "@hourly"
-    parsed[:Minute] = 0
-  when "@daily"
-    parsed[:Minute] = 0
-    parsed[:Hour] = 0
-  when "@weekly"
-    parsed[:Minute] = 0
-    parsed[:Hour] = 0
-    parsed[:Weekday] = 0
-  when "@monthly"
-    parsed[:Minute] = 0
-    parsed[:Hour] = 0
-    parsed[:Day] = 1
-  when "@yearly", "@annually"
-    parsed[:Minute] = 0
-    parsed[:Hour] = 0
-    parsed[:Day] = 1
-    parsed[:Month] = 1
-  else
-    cron_parts = cron_statement.split
-    raise TypeError, "Service#parse_cron expects a valid cron syntax" if cron_parts.length != 5
-
-    [:Minute, :Hour, :Day, :Month, :Weekday].each_with_index do |selector, index|
-      parsed[selector] = Integer(cron_parts.fetch(index)) if cron_parts.fetch(index) != "*"
-    end
-  end
-
-  parsed
-end
-
-
- -
-

- - #plist_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-
-
# File 'service.rb', line 46
-
-def plist_name
-  @plist_name ||= default_plist_name
-end
-
-
- -
-

- - #process_type(value = nil) ⇒ Symbol? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Symbol, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-
-
# File 'service.rb', line 248
-
-def process_type(value = nil)
-  case value
-  when nil
-    @process_type
-  when :background, :standard, :interactive, :adaptive
-    @process_type = value
-  when Symbol
-    raise TypeError, "Service#process_type allows: " \
-                     "'#{PROCESS_TYPE_BACKGROUND}'/'#{PROCESS_TYPE_STANDARD}'/" \
-                     "'#{PROCESS_TYPE_INTERACTIVE}'/'#{PROCESS_TYPE_ADAPTIVE}'"
-  end
-end
-
-
- -
-

- - #require_root(value = nil) ⇒ Boolean? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-164
-165
-166
-167
-168
-169
-170
-171
-
-
# File 'service.rb', line 164
-
-def require_root(value = nil)
-  case value
-  when nil
-    @require_root
-  when true, false
-    @require_root = value
-  end
-end
-
-
- -
-

- - #requires_root?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a Boolean describing if a service requires root access.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-176
-177
-178
-
-
# File 'service.rb', line 176
-
-def requires_root?
-  @require_root.present? && @require_root == true
-end
-
-
- -
-

- - #restart_delay(value = nil) ⇒ Integer? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Integer, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-238
-239
-240
-241
-242
-243
-244
-245
-
-
# File 'service.rb', line 238
-
-def restart_delay(value = nil)
-  case value
-  when nil
-    @restart_delay
-  when Integer
-    @restart_delay = value
-  end
-end
-
-
- -
-

- - #root_dir(path = nil) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-110
-111
-112
-
-
# File 'service.rb', line 105
-
-def root_dir(path = nil)
-  case path
-  when nil
-    @root_dir
-  when String, Pathname
-    @root_dir = path.to_s
-  end
-end
-
-
- -
-

- - #run(command = nil, macos: nil, linux: nil) ⇒ Array<String, Pathname>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-
-
# File 'service.rb', line 75
-
-def run(command = nil, macos: nil, linux: nil)
-  # Save parameters for serialization
-  if command
-    @run_params = command
-  elsif macos || linux
-    @run_params = { macos:, linux: }.compact
-  end
-
-  command ||= on_system_conditional(macos:, linux:)
-  case command
-  when nil
-    @run
-  when String, Pathname
-    @run = [command]
-  when Array
-    @run = command
-  end
-end
-
-
- -
-

- - #run_at_load(value = nil) ⇒ Boolean? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-181
-182
-183
-184
-185
-186
-187
-188
-
-
# File 'service.rb', line 181
-
-def run_at_load(value = nil)
-  case value
-  when nil
-    @run_at_load
-  when true, false
-    @run_at_load = value
-  end
-end
-
-
- -
-

- - #run_type(value = nil) ⇒ Symbol? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Symbol, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-
-
# File 'service.rb', line 262
-
-def run_type(value = nil)
-  case value
-  when nil
-    @run_type
-  when :immediate, :interval, :cron
-    @run_type = value
-  when Symbol
-    raise TypeError, "Service#run_type allows: '#{RUN_TYPE_IMMEDIATE}'/'#{RUN_TYPE_INTERVAL}'/'#{RUN_TYPE_CRON}'"
-  end
-end
-
-
- -
-

- - #service_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'service.rb', line 56
-
-def service_name
-  @service_name ||= default_service_name
-end
-
-
- -
-

- - #sockets(value = nil) ⇒ Hash{Symbol => Hash{Symbol => String}}? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-
-
# File 'service.rb', line 196
-
-def sockets(value = nil)
-  return @sockets if value.nil?
-
-  @sockets = case value
-  when String
-    { listeners: value }
-  when Hash
-    value
-  end.transform_values do |socket_string|
-    match = socket_string.match(SOCKET_STRING_REGEX)
-    raise TypeError, "Service#sockets a formatted socket definition as <type>://<host>:<port>" if match.blank?
-
-    type, host, port = match.captures
-
-    begin
-      IPAddr.new(host)
-    rescue IPAddr::InvalidAddressError
-      raise TypeError, "Service#sockets expects a valid ipv4 or ipv6 host address"
-    end
-
-    { host:, port:, type: }
-  end
-end
-
-
- -
-

- - #std_service_path_envString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-360
-361
-362
-
-
# File 'service.rb', line 360
-
-def std_service_path_env
-  "#{HOMEBREW_PREFIX}/bin:#{HOMEBREW_PREFIX}/sbin:/usr/bin:/bin:/usr/sbin:/sbin"
-end
-
-
- -
-

- - #timed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a Boolean describing if a service is timed.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-388
-389
-390
-
-
# File 'service.rb', line 388
-
-def timed?
-  @run_type == RUN_TYPE_CRON || @run_type == RUN_TYPE_INTERVAL
-end
-
-
- -
-

- - #to_hashHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Prepare the service hash for inclusion in the formula API JSON.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-517
-518
-519
-520
-521
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-
-
# File 'service.rb', line 517
-
-def to_hash
-  name_params = {
-    macos: (plist_name if plist_name != default_plist_name),
-    linux: (service_name if service_name != default_service_name),
-  }.compact
-
-  return { name: name_params }.compact_blank if @run_params.blank?
-
-  cron_string = if @cron.present?
-    [:Minute, :Hour, :Day, :Month, :Weekday]
-      .map { |key| @cron[key].to_s }
-      .join(" ")
-  end
-
-  sockets_var = if @sockets.present?
-    @sockets.transform_values { |info| "#{info[:type]}://#{info[:host]}:#{info[:port]}" }
-            .then do |sockets_hash|
-              # TODO: Remove this code when all users are running on versions of Homebrew
-              # that can process sockets hashes (this commit or later).
-              if sockets_hash.size == 1 && sockets_hash.key?(:listeners)
-                # When original #sockets argument was a string: `sockets "tcp://127.0.0.1:80"`
-                sockets_hash.fetch(:listeners)
-              else
-                # When original #sockets argument was a hash: `sockets http: "tcp://0.0.0.0:80"`
-                sockets_hash
-              end
-            end
-  end
-
-  {
-    name:                  name_params.presence,
-    run:                   @run_params,
-    run_type:              @run_type,
-    interval:              @interval,
-    cron:                  cron_string,
-    keep_alive:            @keep_alive,
-    launch_only_once:      @launch_only_once,
-    require_root:          @require_root,
-    environment_variables: @environment_variables.presence,
-    working_dir:           @working_dir,
-    root_dir:              @root_dir,
-    input_path:            @input_path,
-    log_path:              @log_path,
-    error_log_path:        @error_log_path,
-    restart_delay:         @restart_delay,
-    process_type:          @process_type,
-    macos_legacy_timers:   @macos_legacy_timers,
-    sockets:               sockets_var,
-  }.compact
-end
-
-
- -
-

- - #to_plistString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a String plist.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-
-
# File 'service.rb', line 395
-
-def to_plist
-  # command needs to be first because it initializes all other values
-  base = {
-    Label:            plist_name,
-    ProgramArguments: command,
-    RunAtLoad:        @run_at_load == true,
-  }
-
-  base[:LaunchOnlyOnce] = @launch_only_once if @launch_only_once == true
-  base[:LegacyTimers] = @macos_legacy_timers if @macos_legacy_timers == true
-  base[:TimeOut] = @restart_delay if @restart_delay.present?
-  base[:ProcessType] = @process_type.to_s.capitalize if @process_type.present?
-  base[:StartInterval] = @interval if @interval.present? && @run_type == RUN_TYPE_INTERVAL
-  base[:WorkingDirectory] = File.expand_path(@working_dir) if @working_dir.present?
-  base[:RootDirectory] = File.expand_path(@root_dir) if @root_dir.present?
-  base[:StandardInPath] = File.expand_path(@input_path) if @input_path.present?
-  base[:StandardOutPath] = File.expand_path(@log_path) if @log_path.present?
-  base[:StandardErrorPath] = File.expand_path(@error_log_path) if @error_log_path.present?
-  base[:EnvironmentVariables] = @environment_variables unless @environment_variables.empty?
-
-  if keep_alive?
-    if (always = @keep_alive[:always].presence)
-      base[:KeepAlive] = always
-    elsif @keep_alive.key?(:successful_exit)
-      base[:KeepAlive] = { SuccessfulExit: @keep_alive[:successful_exit] }
-    elsif @keep_alive.key?(:crashed)
-      base[:KeepAlive] = { Crashed: @keep_alive[:crashed] }
-    elsif @keep_alive.key?(:path) && @keep_alive[:path].present?
-      base[:KeepAlive] = { PathState: @keep_alive[:path].to_s }
-    end
-  end
-
-  if @sockets.present?
-    base[:Sockets] = {}
-    @sockets.each do |name, info|
-      base[:Sockets][name] = {
-        SockNodeName:    info[:host],
-        SockServiceName: info[:port],
-        SockProtocol:    info[:type].upcase,
-      }
-    end
-  end
-
-  if @cron.present? && @run_type == RUN_TYPE_CRON
-    base[:StartCalendarInterval] = @cron.reject { |_, value| value == "*" }
-  end
-
-  # Adding all session types has as the primary effect that if you initialise it through e.g. a Background session
-  # and you later "physically" sign in to the owning account (Aqua session), things shouldn't flip out.
-  # Also, we're not checking @process_type here because that is used to indicate process priority and not
-  # necessarily if it should run in a specific session type. Like database services could run with ProcessType
-  # Interactive so they have no resource limitations enforced upon them, but they aren't really interactive in the
-  # general sense.
-  base[:LimitLoadToSessionType] = %w[Aqua Background LoginWindow StandardIO System]
-
-  base.to_plist
-end
-
-
- -
-

- - #to_systemd_timerString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a String systemd unit timer.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-
-
# File 'service.rb', line 490
-
-def to_systemd_timer
-  timer = <<~EOS
-    [Unit]
-    Description=Homebrew generated timer for #{@formula.name}
-
-    [Install]
-    WantedBy=timers.target
-
-    [Timer]
-    Unit=#{service_name}
-  EOS
-
-  options = []
-  options << "Persistent=true" if @run_type == RUN_TYPE_CRON
-  options << "OnUnitActiveSec=#{@interval}" if @run_type == RUN_TYPE_INTERVAL
-
-  if @run_type == RUN_TYPE_CRON
-    minutes = (@cron[:Minute] == "*") ? "*" : format("%02d", @cron[:Minute])
-    hours   = (@cron[:Hour] == "*") ? "*" : format("%02d", @cron[:Hour])
-    options << "OnCalendar=#{@cron[:Weekday]}-*-#{@cron[:Month]}-#{@cron[:Day]} #{hours}:#{minutes}:00"
-  end
-
-  timer + options.join("\n")
-end
-
-
- -
-

- - #to_systemd_unitString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a String systemd unit.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-
-
# File 'service.rb', line 456
-
-def to_systemd_unit
-  unit = <<~EOS
-    [Unit]
-    Description=Homebrew generated unit for #{@formula.name}
-
-    [Install]
-    WantedBy=default.target
-
-    [Service]
-  EOS
-
-  # command needs to be first because it initializes all other values
-  cmd = command&.map { |arg| Utils::Shell.sh_quote(arg) }
-               &.join(" ")
-
-  options = []
-  options << "Type=#{(@launch_only_once == true) ? "oneshot" : "simple"}"
-  options << "ExecStart=#{cmd}"
-
-  options << "Restart=always" if @keep_alive.present? && @keep_alive[:always].present?
-  options << "RestartSec=#{restart_delay}" if @restart_delay.present?
-  options << "WorkingDirectory=#{File.expand_path(@working_dir)}" if @working_dir.present?
-  options << "RootDirectory=#{File.expand_path(@root_dir)}" if @root_dir.present?
-  options << "StandardInput=file:#{File.expand_path(@input_path)}" if @input_path.present?
-  options << "StandardOutput=append:#{File.expand_path(@log_path)}" if @log_path.present?
-  options << "StandardError=append:#{File.expand_path(@error_log_path)}" if @error_log_path.present?
-  options += @environment_variables.map { |k, v| "Environment=\"#{k}=#{v}\"" } if @environment_variables.present?
-
-  unit + options.join("\n")
-end
-
-
- -
-

- - #var(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-412
-
-
# File 'sorbet/rbi/parlour.rbi', line 412
-
-def var(*args, **options, &block); end
-
-
- -
-

- - #working_dir(path = nil) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-95
-96
-97
-98
-99
-100
-101
-102
-
-
# File 'service.rb', line 95
-
-def working_dir(path = nil)
-  case path
-  when nil
-    @working_dir
-  when String, Pathname
-    @working_dir = path.to_s
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Settings.html b/docs/Homebrew/Settings.html deleted file mode 100644 index f8619e12c..000000000 --- a/docs/Homebrew/Settings.html +++ /dev/null @@ -1,362 +0,0 @@ - - - - - - - Module: Homebrew::Settings - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Settings - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
settings.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for reading and writing settings.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .delete(setting, repo: HOMEBREW_REPOSITORY) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'settings.rb', line 29
-
-def self.delete(setting, repo: HOMEBREW_REPOSITORY)
-  return unless (repo/".git/config").exist?
-
-  return if read(setting, repo:).nil?
-
-  Kernel.system("git", "-C", repo.to_s, "config", "--unset-all", "homebrew.#{setting}", exception: true)
-end
-
-
- -
-

- - .read(setting, repo: HOMEBREW_REPOSITORY) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-
-
# File 'settings.rb', line 9
-
-def self.read(setting, repo: HOMEBREW_REPOSITORY)
-  return unless (repo/".git/config").exist?
-
-  value = Utils.popen_read("git", "-C", repo.to_s, "config", "--get", "homebrew.#{setting}").chomp
-
-  return if value.strip.empty?
-
-  value
-end
-
-
- -
-

- - .write(setting, value, repo: HOMEBREW_REPOSITORY) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'settings.rb', line 19
-
-def self.write(setting, value, repo: HOMEBREW_REPOSITORY)
-  return unless (repo/".git/config").exist?
-
-  value = value.to_s
-
-  return if read(setting, repo:) == value
-
-  Kernel.system("git", "-C", repo.to_s, "config", "--replace-all", "homebrew.#{setting}", value, exception: true)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/SimulateSystem.html b/docs/Homebrew/SimulateSystem.html deleted file mode 100644 index bb35b790c..000000000 --- a/docs/Homebrew/SimulateSystem.html +++ /dev/null @@ -1,855 +0,0 @@ - - - - - - - Class: Homebrew::SimulateSystem - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::SimulateSystem - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
simulate_system.rb,
- extend/os/mac/simulate_system.rb,
extend/os/linux/simulate_system.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper module for simulating different system configurations.

- - -
-
-
- - -
- - - -

Class Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - - - -
-

Class Attribute Details

- - - -
-

- - .archObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'simulate_system.rb', line 8
-
-def arch
-  @arch
-end
-
-
- - - -
-

- - .osSymbol? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-
-
# File 'extend/os/linux/simulate_system.rb', line 12
-
-def os
-  return :macos if @os.blank? && Homebrew::EnvConfig.simulate_macos_on_linux?
-
-  @os
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .clearvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'simulate_system.rb', line 50
-
-def clear
-  @os = @arch = nil
-end
-
-
- -
-

- - .current_archSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-65
-66
-67
-
-
# File 'simulate_system.rb', line 65
-
-def current_arch
-  @arch || Hardware::CPU.type
-end
-
-
- -
-

- - .current_osSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'extend/os/mac/simulate_system.rb', line 16
-
-def current_os
-  os || MacOS.version.to_sym
-end
-
-
- -
-

- - .simulating_or_running_on_linux?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'extend/os/linux/simulate_system.rb', line 19
-
-def simulating_or_running_on_linux?
-  os.blank? || os == :linux
-end
-
-
- -
-

- - .simulating_or_running_on_macos?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'extend/os/mac/simulate_system.rb', line 11
-
-def simulating_or_running_on_macos?
-  os.blank? || [:macos, *MacOSVersion::SYMBOLS.keys].include?(os)
-end
-
-
- -
-

- - .with(os: T.unsafe(nil), arch: T.unsafe(nil), &_block) ⇒ T.type_parameter(:U) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - os - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - arch - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - _block - - - (T.proc.returns(T.type_parameter(:U))) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.type_parameter(:U)) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'simulate_system.rb', line 17
-
-def with(os: T.unsafe(nil), arch: T.unsafe(nil), &_block)
-  raise ArgumentError, "At least one of `os` or `arch` must be specified." if !os && !arch
-
-  old_os = self.os
-  old_arch = self.arch
-
-  begin
-    self.os = os if os && os != current_os
-    self.arch = arch if arch && arch != current_arch
-
-    yield
-  ensure
-    @os = old_os
-    @arch = old_arch
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/SourceLocation.html b/docs/Homebrew/SourceLocation.html deleted file mode 100644 index eb759fcca..000000000 --- a/docs/Homebrew/SourceLocation.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - - Class: Homebrew::SourceLocation - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::SourceLocation - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
source_location.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A location in source code.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(line, column = T.unsafe(nil)) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - line - - - (Integer) - - - -
  • - -
  • - - column - - - (Integer, nil) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- - -
- - - - -
-
-
-
-14
-15
-16
-17
-
-
# File 'source_location.rb', line 14
-
-def initialize(line, column = T.unsafe(nil))
-  @line = line
-  @column = column
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #columnInteger? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'source_location.rb', line 11
-
-def column
-  @column
-end
-
-
- - - -
-

- - #lineInteger (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'source_location.rb', line 8
-
-def line
-  @line
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Style.html b/docs/Homebrew/Style.html deleted file mode 100644 index 6dd5140b0..000000000 --- a/docs/Homebrew/Style.html +++ /dev/null @@ -1,1620 +0,0 @@ - - - - - - - Module: Homebrew::Style - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Style - - - Private -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
style.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for running RuboCop.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Offense, Offenses - - -

- - -

- Constant Summary - collapse -

- -
- -
RUBOCOP = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_LIBRARY_PATH/"utils/rubocop.rb").freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .actionlintObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-320
-321
-322
-323
-
-
# File 'style.rb', line 320
-
-def self.actionlint
-  ensure_formula_installed!("actionlint", latest: true,
-                                          reason: "GitHub Actions checks").opt_bin/"actionlint"
-end
-
-
- -
-

- - .check_style_and_print(files, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks style for a list of files, printing simple RuboCop output. -Returns true if violations were found, false otherwise.

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'style.rb', line 15
-
-def self.check_style_and_print(files, **options)
-  success = check_style_impl(files, :print, **options)
-
-  if GitHub::Actions.env_set? && !success
-    check_style_json(files, **options).each do |path, offenses|
-      offenses.each do |o|
-        line = o.location.line
-        column = o.location.line
-
-        annotation = GitHub::Actions::Annotation.new(:error, o.message, file: path, line:, column:)
-        puts annotation if annotation.relevant?
-      end
-    end
-  end
-
-  success
-end
-
-
- -
-

- - .check_style_impl(files, output_type, fix: false, except_cops: nil, only_cops: nil, display_cop_names: false, reset_cache: false, debug: false, verbose: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-
-
# File 'style.rb', line 39
-
-def self.check_style_impl(files, output_type,
-                          fix: false,
-                          except_cops: nil, only_cops: nil,
-                          display_cop_names: false,
-                          reset_cache: false,
-                          debug: false, verbose: false)
-  raise ArgumentError, "Invalid output type: #{output_type.inspect}" if [:print, :json].exclude?(output_type)
-
-  ruby_files = []
-  shell_files = []
-  actionlint_files = []
-  Array(files).map(&method(:Pathname))
-              .each do |path|
-    case path.extname
-    when ".rb"
-      ruby_files << path
-    when ".sh"
-      shell_files << path
-    when ".yml"
-      actionlint_files << path if path.realpath.to_s.include?("/.github/workflows/")
-    else
-      shell_files << path if path.realpath == HOMEBREW_BREW_FILE.realpath
-    end
-  end
-
-  rubocop_result = if files.present? && ruby_files.empty?
-    (output_type == :json) ? [] : true
-  else
-    run_rubocop(ruby_files, output_type,
-                fix:,
-                except_cops:, only_cops:,
-                display_cop_names:,
-                reset_cache:,
-                debug:, verbose:)
-  end
-
-  shellcheck_result = if files.present? && shell_files.empty?
-    (output_type == :json) ? [] : true
-  else
-    run_shellcheck(shell_files, output_type, fix:)
-  end
-
-  shfmt_result = if files.present? && shell_files.empty?
-    true
-  else
-    run_shfmt(shell_files, fix:)
-  end
-
-  actionlint_result = if files.present? && actionlint_files.empty?
-    true
-  else
-    run_actionlint(actionlint_files)
-  end
-
-  if output_type == :json
-    Offenses.new(rubocop_result + shellcheck_result)
-  else
-    rubocop_result && shellcheck_result && shfmt_result && actionlint_result
-  end
-end
-
-
- -
-

- - .check_style_json(files, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks style for a list of files, returning results as an Offenses -object parsed from its JSON output.

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'style.rb', line 35
-
-def self.check_style_json(files, **options)
-  check_style_impl(files, :json, **options)
-end
-
-
- -
-

- - .github_workflow_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-300
-301
-302
-
-
# File 'style.rb', line 300
-
-def self.github_workflow_files
-  HOMEBREW_REPOSITORY.glob(".github/workflows/*.yml")
-end
-
-
- -
-

- - .json_result!(result) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-272
-273
-274
-275
-276
-277
-278
-279
-
-
# File 'style.rb', line 272
-
-def self.json_result!(result)
-  # An exit status of 1 just means violations were found; other numbers mean
-  # execution errors.
-  # JSON needs to be at least 2 characters.
-  result.assert_success! if !(0..1).cover?(result.status.exitstatus) || result.stdout.length < 2
-
-  JSON.parse(result.stdout)
-end
-
-
- -
-

- - .rubocopObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-304
-305
-306
-307
-
-
# File 'style.rb', line 304
-
-def self.rubocop
-  ensure_formula_installed!("rubocop", latest: true,
-                                       reason: "Ruby style checks").opt_bin/"rubocop"
-end
-
-
- -
-

- - .run_actionlint(files) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-264
-265
-266
-267
-268
-269
-270
-
-
# File 'style.rb', line 264
-
-def self.run_actionlint(files)
-  files = github_workflow_files if files.blank?
-  system actionlint, "-shellcheck", shellcheck,
-         "-config-file", HOMEBREW_REPOSITORY/".github/actionlint.yaml",
-         *files
-  $CHILD_STATUS.success?
-end
-
-
- -
-

- - .run_rubocop(files, output_type, fix: false, except_cops: nil, only_cops: nil, display_cop_names: false, reset_cache: false, debug: false, verbose: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-
-
# File 'style.rb', line 102
-
-def self.run_rubocop(files, output_type,
-                     fix: false, except_cops: nil, only_cops: nil, display_cop_names: false, reset_cache: false,
-                     debug: false, verbose: false)
-  require "warnings"
-
-  Warnings.ignore :parser_syntax do
-    require "rubocop"
-  end
-
-  require "rubocops/all"
-
-  args = %w[
-    --force-exclusion
-  ]
-  args << if fix
-    "--autocorrect-all"
-  else
-    "--parallel"
-  end
-
-  args += ["--extra-details"] if verbose
-
-  if except_cops
-    except_cops.map! { |cop| RuboCop::Cop::Cop.registry.qualified_cop_name(cop.to_s, "") }
-    cops_to_exclude = except_cops.select do |cop|
-      RuboCop::Cop::Cop.registry.names.include?(cop) ||
-        RuboCop::Cop::Cop.registry.departments.include?(cop.to_sym)
-    end
-
-    args << "--except" << cops_to_exclude.join(",") unless cops_to_exclude.empty?
-  elsif only_cops
-    only_cops.map! { |cop| RuboCop::Cop::Cop.registry.qualified_cop_name(cop.to_s, "") }
-    cops_to_include = only_cops.select do |cop|
-      RuboCop::Cop::Cop.registry.names.include?(cop) ||
-        RuboCop::Cop::Cop.registry.departments.include?(cop.to_sym)
-    end
-
-    odie "RuboCops #{only_cops.join(",")} were not found" if cops_to_include.empty?
-
-    args << "--only" << cops_to_include.join(",")
-  end
-
-  files&.map!(&:expand_path)
-  if files.blank? || files == [HOMEBREW_REPOSITORY]
-    files = [HOMEBREW_LIBRARY_PATH]
-  elsif files.any? { |f| f.to_s.start_with? HOMEBREW_REPOSITORY/"docs" }
-    args << "--config" << (HOMEBREW_REPOSITORY/"docs/.rubocop.yml")
-  elsif files.none? { |f| f.to_s.start_with? HOMEBREW_LIBRARY_PATH }
-    args << "--config" << (HOMEBREW_LIBRARY/".rubocop.yml")
-  end
-
-  args += files
-
-  cache_env = { "XDG_CACHE_HOME" => "#{HOMEBREW_CACHE}/style" }
-
-  FileUtils.rm_rf cache_env["XDG_CACHE_HOME"] if reset_cache
-
-  ruby_args = HOMEBREW_RUBY_EXEC_ARGS.dup
-  case output_type
-  when :print
-    args << "--debug" if debug
-
-    # Don't show the default formatter's progress dots
-    # on CI or if only checking a single file.
-    args << "--format" << "clang" if ENV["CI"] || files.count { |f| !f.directory? } == 1
-
-    args << "--color" if Tty.color?
-
-    system cache_env, *ruby_args, "--", RUBOCOP, *args
-    $CHILD_STATUS.success?
-  when :json
-    result = system_command ruby_args.shift,
-                            args: [*ruby_args, "--", RUBOCOP, "--format", "json", *args],
-                            env:  cache_env
-    json = json_result!(result)
-    json["files"]
-  end
-end
-
-
- -
-

- - .run_shellcheck(files, output_type, fix: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-
-
# File 'style.rb', line 181
-
-def self.run_shellcheck(files, output_type, fix: false)
-  files = shell_scripts if files.blank?
-
-  files = files.map(&:realpath) # use absolute file paths
-
-  args = [
-    "--shell=bash",
-    "--enable=all",
-    "--external-sources",
-    "--source-path=#{HOMEBREW_LIBRARY}",
-    "--",
-    *files,
-  ]
-
-  if fix
-    # patch options:
-    #   -g 0 (--get=0)       : suppress environment variable `PATCH_GET`
-    #   -f   (--force)       : we know what we are doing, force apply patches
-    #   -d / (--directory=/) : change to root directory, since we use absolute file paths
-    #   -p0  (--strip=0)     : do not strip path prefixes, since we are at root directory
-    # NOTE: We use short flags for compatibility.
-    patch_command = %w[patch -g 0 -f -d / -p0]
-    patches = system_command(shellcheck, args: ["--format=diff", *args]).stdout
-    Utils.safe_popen_write(*patch_command) { |p| p.write(patches) } if patches.present?
-  end
-
-  case output_type
-  when :print
-    system shellcheck, "--format=tty", *args
-    $CHILD_STATUS.success?
-  when :json
-    result = system_command shellcheck, args: ["--format=json", *args]
-    json = json_result!(result)
-
-    # Convert to same format as RuboCop offenses.
-    severity_hash = { "style" => "refactor", "info" => "convention" }
-    json.group_by { |v| v["file"] }
-        .map do |k, v|
-      {
-        "path"     => k,
-        "offenses" => v.map do |o|
-          o.delete("file")
-
-          o["cop_name"] = "SC#{o.delete("code")}"
-
-          level = o.delete("level")
-          o["severity"] = severity_hash.fetch(level, level)
-
-          line = o.delete("line")
-          column = o.delete("column")
-
-          o["corrected"] = false
-          o["correctable"] = o.delete("fix").present?
-
-          o["location"] = {
-            "start_line"   => line,
-            "start_column" => column,
-            "last_line"    => o.delete("endLine"),
-            "last_column"  => o.delete("endColumn"),
-            "line"         => line,
-            "column"       => column,
-          }
-
-          o
-        end,
-      }
-    end
-  end
-end
-
-
- -
-

- - .run_shfmt(files, fix: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-
-
# File 'style.rb', line 251
-
-def self.run_shfmt(files, fix: false)
-  files = shell_scripts if files.blank?
-  # Do not format completions and Dockerfile
-  files.delete(HOMEBREW_REPOSITORY/"completions/bash/brew")
-  files.delete(HOMEBREW_REPOSITORY/"Dockerfile")
-
-  args = ["--language-dialect", "bash", "--indent", "2", "--case-indent", "--", *files]
-  args.unshift("--write") if fix # need to add before "--"
-
-  system shfmt, *args
-  $CHILD_STATUS.success?
-end
-
-
- -
-

- - .shell_scriptsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-
-
# File 'style.rb', line 281
-
-def self.shell_scripts
-  [
-    HOMEBREW_BREW_FILE,
-    HOMEBREW_REPOSITORY/"completions/bash/brew",
-    HOMEBREW_REPOSITORY/"Dockerfile",
-    *HOMEBREW_REPOSITORY.glob(".devcontainer/**/*.sh"),
-    *HOMEBREW_REPOSITORY.glob("package/scripts/*"),
-    *HOMEBREW_LIBRARY.glob("Homebrew/**/*.sh").reject { |path| path.to_s.include?("/vendor/") },
-    *HOMEBREW_LIBRARY.glob("Homebrew/shims/**/*").map(&:realpath).uniq
-                     .reject(&:directory?)
-                     .reject { |path| path.basename.to_s == "cc" }
-                     .select do |path|
-                       %r{^#! ?/bin/(?:ba)?sh( |$)}.match?(path.read(13))
-                     end,
-    *HOMEBREW_LIBRARY.glob("Homebrew/{dev-,}cmd/*.sh"),
-    *HOMEBREW_LIBRARY.glob("Homebrew/{cask/,}utils/*.sh"),
-  ]
-end
-
-
- -
-

- - .shellcheckObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-309
-310
-311
-312
-
-
# File 'style.rb', line 309
-
-def self.shellcheck
-  ensure_formula_installed!("shellcheck", latest: true,
-                                          reason: "shell style checks").opt_bin/"shellcheck"
-end
-
-
- -
-

- - .shfmtObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-314
-315
-316
-317
-318
-
-
# File 'style.rb', line 314
-
-def self.shfmt
-  ensure_formula_installed!("shfmt", latest: true,
-                                     reason: "formatting shell scripts")
-  HOMEBREW_LIBRARY/"Homebrew/utils/shfmt.sh"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Style/Offense.html b/docs/Homebrew/Style/Offense.html deleted file mode 100644 index 3ce28410d..000000000 --- a/docs/Homebrew/Style/Offense.html +++ /dev/null @@ -1,747 +0,0 @@ - - - - - - - Class: Homebrew::Style::Offense - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Style::Offense - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
style.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A style offense.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(json) ⇒ Offense - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Offense.

- - -
-
-
- - -
- - - - -
-
-
-
-352
-353
-354
-355
-356
-357
-358
-359
-
-
# File 'style.rb', line 352
-
-def initialize(json)
-  @severity = json["severity"]
-  @message = json["message"]
-  @cop_name = json["cop_name"]
-  @corrected = json["corrected"]
-  location = json["location"]
-  @location = SourceLocation.new(location.fetch("line"), location["column"])
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #cop_nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-350
-351
-352
-
-
# File 'style.rb', line 350
-
-def cop_name
-  @cop_name
-end
-
-
- - - -
-

- - #correctedObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-350
-351
-352
-
-
# File 'style.rb', line 350
-
-def corrected
-  @corrected
-end
-
-
- - - -
-

- - #locationObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-350
-351
-352
-
-
# File 'style.rb', line 350
-
-def location
-  @location
-end
-
-
- - - -
-

- - #messageObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-350
-351
-352
-
-
# File 'style.rb', line 350
-
-def message
-  @message
-end
-
-
- - - -
-

- - #severityObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-350
-351
-352
-
-
# File 'style.rb', line 350
-
-def severity
-  @severity
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #corrected?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-365
-366
-367
-
-
# File 'style.rb', line 365
-
-def corrected?
-  @corrected
-end
-
-
- -
-

- - #severity_codeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-361
-362
-363
-
-
# File 'style.rb', line 361
-
-def severity_code
-  @severity[0].upcase
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Style/Offenses.html b/docs/Homebrew/Style/Offenses.html deleted file mode 100644 index 30aad76b4..000000000 --- a/docs/Homebrew/Style/Offenses.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - Class: Homebrew::Style::Offenses - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Style::Offenses - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Enumerable
-
- - - - - - -
-
Defined in:
-
style.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Collection of style offenses.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Enumerable

-

#compact_blank, #exclude?

-
-

Constructor Details

- -
-

- - #initialize(paths) ⇒ Offenses - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Offenses.

- - -
-
-
- - -
- - - - -
-
-
-
-329
-330
-331
-332
-333
-334
-335
-336
-337
-
-
# File 'style.rb', line 329
-
-def initialize(paths)
-  @offenses = {}
-  paths.each do |f|
-    next if f["offenses"].empty?
-
-    path = Pathname(f["path"]).realpath
-    @offenses[path] = f["offenses"].map { |x| Offense.new(x) }
-  end
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #each(*args, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-343
-344
-345
-
-
# File 'style.rb', line 343
-
-def each(*args, &block)
-  @offenses.each(*args, &block)
-end
-
-
- -
-

- - #for_path(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-339
-340
-341
-
-
# File 'style.rb', line 339
-
-def for_path(path)
-  @offenses.fetch(Pathname(path), [])
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/TapAuditor.html b/docs/Homebrew/TapAuditor.html deleted file mode 100644 index 10a2e647c..000000000 --- a/docs/Homebrew/TapAuditor.html +++ /dev/null @@ -1,1378 +0,0 @@ - - - - - - - Class: Homebrew::TapAuditor - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::TapAuditor - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
tap_auditor.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Auditor for checking common violations in Taps.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(tap, strict:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tap - - - (Tap) - - - -
  • - -
  • - - strict - - - (Boolean, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'tap_auditor.rb', line 11
-
-def initialize(tap, strict:)
-  Homebrew.with_no_api_env do
-    @name                      = tap.name
-    @path                      = tap.path
-    @tap_audit_exceptions      = tap.audit_exceptions
-    @tap_style_exceptions      = tap.style_exceptions
-    @tap_pypi_formula_mappings = tap.pypi_formula_mappings
-    @problems                  = []
-
-    @cask_tokens = tap.cask_tokens.map do |cask_token|
-      cask_token.split("/").last
-    end
-    @formula_aliases = tap.aliases.map do |formula_alias|
-      formula_alias.split("/").last
-    end
-    @formula_renames = tap.formula_renames
-    @formula_names = tap.formula_names.map do |formula_name|
-      formula_name.split("/").last
-    end
-  end
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #cask_tokensObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def cask_tokens
-  @cask_tokens
-end
-
-
- - - -
-

- - #formula_aliasesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def formula_aliases
-  @formula_aliases
-end
-
-
- - - -
-

- - #formula_namesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def formula_names
-  @formula_names
-end
-
-
- - - -
-

- - #formula_renamesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def formula_renames
-  @formula_renames
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def name
-  @name
-end
-
-
- - - -
-

- - #pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def path
-  @path
-end
-
-
- - - -
-

- - #problemsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def problems
-  @problems
-end
-
-
- - - -
-

- - #tap_audit_exceptionsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def tap_audit_exceptions
-  @tap_audit_exceptions
-end
-
-
- - - -
-

- - #tap_pypi_formula_mappingsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def tap_pypi_formula_mappings
-  @tap_pypi_formula_mappings
-end
-
-
- - - -
-

- - #tap_style_exceptionsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'tap_auditor.rb', line 7
-
-def tap_style_exceptions
-  @tap_style_exceptions
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #auditvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-
-
# File 'tap_auditor.rb', line 34
-
-def audit
-  audit_json_files
-  audit_tap_formula_lists
-  audit_aliases_renames_duplicates
-end
-
-
- -
-

- - #audit_aliases_renames_duplicatesvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-
-
# File 'tap_auditor.rb', line 58
-
-def audit_aliases_renames_duplicates
-  duplicates = formula_aliases & formula_renames.keys
-  return if duplicates.none?
-
-  problem "The following should either be an alias or a rename, not both: #{duplicates.to_sentence}"
-end
-
-
- -
-

- - #audit_json_filesvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-
-
# File 'tap_auditor.rb', line 41
-
-def audit_json_files
-  json_patterns = Tap::HOMEBREW_TAP_JSON_FILES.map { |pattern| @path/pattern }
-  Pathname.glob(json_patterns).each do |file|
-    JSON.parse file.read
-  rescue JSON::ParserError
-    problem "#{file.to_s.delete_prefix("#{@path}/")} contains invalid JSON"
-  end
-end
-
-
- -
-

- - #audit_tap_formula_listsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-
-
# File 'tap_auditor.rb', line 51
-
-def audit_tap_formula_lists
-  check_formula_list_directory "audit_exceptions", @tap_audit_exceptions
-  check_formula_list_directory "style_exceptions", @tap_style_exceptions
-  check_formula_list "pypi_formula_mappings", @tap_pypi_formula_mappings
-end
-
-
- -
-

- - #problem(message) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - message - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'tap_auditor.rb', line 66
-
-def problem(message)
-  @problems << ({ message:, location: nil, corrected: false })
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Uninstall.html b/docs/Homebrew/Uninstall.html deleted file mode 100644 index 9c2e1dc3a..000000000 --- a/docs/Homebrew/Uninstall.html +++ /dev/null @@ -1,603 +0,0 @@ - - - - - - - Module: Homebrew::Uninstall - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Uninstall - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
uninstall.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for uninstalling kegs.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: DependentsMessage, DeveloperDependentsMessage, NondeveloperDependentsMessage - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .check_for_dependents(kegs, casks: [], named_args: []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-
-
# File 'uninstall.rb', line 106
-
-def self.check_for_dependents(kegs, casks: [], named_args: [])
-  return false unless (result = InstalledDependents.find_some_installed_dependents(kegs, casks:))
-
-  if Homebrew::EnvConfig.developer?
-    DeveloperDependentsMessage.new(*result, named_args:).output
-  else
-    NondeveloperDependentsMessage.new(*result, named_args:).output
-  end
-
-  true
-end
-
-
- -
-

- - .handle_unsatisfied_dependents(kegs_by_rack, casks: [], ignore_dependencies: false, named_args: []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'uninstall.rb', line 96
-
-def self.handle_unsatisfied_dependents(kegs_by_rack, casks: [], ignore_dependencies: false, named_args: [])
-  return if ignore_dependencies
-
-  all_kegs = kegs_by_rack.values.flatten(1)
-  check_for_dependents(all_kegs, casks:, named_args:)
-rescue MethodDeprecatedError
-  # Silently ignore deprecations when uninstalling.
-  nil
-end
-
-
- -
-

- - .rm_pin(rack) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-160
-161
-162
-163
-164
-
-
# File 'uninstall.rb', line 160
-
-def self.rm_pin(rack)
-  Formulary.from_rack(rack).unpin
-rescue
-  nil
-end
-
-
- -
-

- - .uninstall_kegs(kegs_by_rack, casks: [], force: false, ignore_dependencies: false, named_args: []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-
-
# File 'uninstall.rb', line 9
-
-def self.uninstall_kegs(kegs_by_rack, casks: [], force: false, ignore_dependencies: false, named_args: [])
-  handle_unsatisfied_dependents(kegs_by_rack,
-                                casks:,
-                                ignore_dependencies:,
-                                named_args:)
-  return if Homebrew.failed?
-
-  kegs_by_rack.each do |rack, kegs|
-    if force
-      name = rack.basename
-
-      if rack.directory?
-        puts "Uninstalling #{name}... (#{rack.abv})"
-        kegs.each do |keg|
-          keg.unlink
-          keg.uninstall
-        end
-      end
-
-      rm_pin rack
-    else
-      kegs.each do |keg|
-        begin
-          f = Formulary.from_rack(rack)
-          if f.pinned?
-            onoe "#{f.full_name} is pinned. You must unpin it to uninstall."
-            break # exit keg loop and move on to next rack
-          end
-        rescue
-          nil
-        end
-
-        keg.lock do
-          puts "Uninstalling #{keg}... (#{keg.abv})"
-          keg.unlink
-          keg.uninstall
-          rack = keg.rack
-          rm_pin rack
-
-          if rack.directory?
-            versions = rack.subdirs.map(&:basename)
-            puts <<~EOS
-              #{keg.name} #{versions.to_sentence} #{(versions.count == 1) ? "is" : "are"} still installed.
-              To remove all versions, run:
-                brew uninstall --force #{keg.name}
-            EOS
-          end
-
-          next unless f
-
-          paths = f.pkgetc.find.map(&:to_s) if f.pkgetc.exist?
-          if paths.present?
-            puts
-            opoo <<~EOS
-              The following #{f.name} configuration files have not been removed!
-              If desired, remove them manually with `rm -rf`:
-                #{paths.sort.uniq.join("\n  ")}
-            EOS
-          end
-
-          unversioned_name = f.name.gsub(/@.+$/, "")
-          maybe_paths = Dir.glob("#{f.etc}/*#{unversioned_name}*")
-          maybe_paths -= paths if paths.present?
-          if maybe_paths.present?
-            puts
-            opoo <<~EOS
-              The following may be #{f.name} configuration files and have not been removed!
-              If desired, remove them manually with `rm -rf`:
-                #{maybe_paths.sort.uniq.join("\n  ")}
-            EOS
-          end
-        end
-      end
-    end
-  end
-rescue MultipleVersionsInstalledError => e
-  ofail e
-ensure
-  # If we delete Cellar/newname, then Cellar/oldname symlink
-  # can become broken and we have to remove it.
-  if HOMEBREW_CELLAR.directory?
-    HOMEBREW_CELLAR.children.each do |rack|
-      rack.unlink if rack.symlink? && !rack.resolved_path_exists?
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Uninstall/DependentsMessage.html b/docs/Homebrew/Uninstall/DependentsMessage.html deleted file mode 100644 index 65860b517..000000000 --- a/docs/Homebrew/Uninstall/DependentsMessage.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - - Class: Homebrew::Uninstall::DependentsMessage - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Uninstall::DependentsMessage - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
uninstall.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(requireds, dependents, named_args: []) ⇒ DependentsMessage - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of DependentsMessage.

- - -
-
-
- - -
- - - - -
-
-
-
-121
-122
-123
-124
-125
-
-
# File 'uninstall.rb', line 121
-
-def initialize(requireds, dependents, named_args: [])
-  @reqs = requireds
-  @deps = dependents
-  @named_args = named_args
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #depsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-119
-120
-121
-
-
# File 'uninstall.rb', line 119
-
-def deps
-  @deps
-end
-
-
- - - -
-

- - #named_argsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-119
-120
-121
-
-
# File 'uninstall.rb', line 119
-
-def named_args
-  @named_args
-end
-
-
- - - -
-

- - #reqsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-119
-120
-121
-
-
# File 'uninstall.rb', line 119
-
-def reqs
-  @reqs
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Uninstall/DeveloperDependentsMessage.html b/docs/Homebrew/Uninstall/DeveloperDependentsMessage.html deleted file mode 100644 index e62358bf5..000000000 --- a/docs/Homebrew/Uninstall/DeveloperDependentsMessage.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - Class: Homebrew::Uninstall::DeveloperDependentsMessage - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Uninstall::DeveloperDependentsMessage - - - Private -

-
- -
-
Inherits:
-
- DependentsMessage - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
uninstall.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from DependentsMessage

-

#deps, #named_args, #reqs

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from DependentsMessage

-

#initialize

-
-

Constructor Details

- -

This class inherits a constructor from Homebrew::Uninstall::DependentsMessage

- -
- - -
-

Instance Method Details

- - -
-

- - #outputObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-140
-141
-142
-143
-144
-145
-146
-
-
# File 'uninstall.rb', line 140
-
-def output
-  opoo <<~EOS
-    #{reqs.to_sentence} #{are_required_by_deps}.
-    You can silence this warning with:
-      #{sample_command}
-  EOS
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Uninstall/NondeveloperDependentsMessage.html b/docs/Homebrew/Uninstall/NondeveloperDependentsMessage.html deleted file mode 100644 index f32263a85..000000000 --- a/docs/Homebrew/Uninstall/NondeveloperDependentsMessage.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - Class: Homebrew::Uninstall::NondeveloperDependentsMessage - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::Uninstall::NondeveloperDependentsMessage - - - Private -

-
- -
-
Inherits:
-
- DependentsMessage - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
uninstall.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from DependentsMessage

-

#deps, #named_args, #reqs

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from DependentsMessage

-

#initialize

-
-

Constructor Details

- -

This class inherits a constructor from Homebrew::Uninstall::DependentsMessage

- -
- - -
-

Instance Method Details

- - -
-

- - #outputObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-150
-151
-152
-153
-154
-155
-156
-157
-
-
# File 'uninstall.rb', line 150
-
-def output
-  ofail <<~EOS
-    Refusing to uninstall #{reqs.to_sentence}
-    because #{(reqs.count == 1) ? "it" : "they"} #{are_required_by_deps}.
-    You can override this and force removal with:
-      #{sample_command}
-  EOS
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Unlink.html b/docs/Homebrew/Unlink.html deleted file mode 100644 index c40180c89..000000000 --- a/docs/Homebrew/Unlink.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - Module: Homebrew::Unlink - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Unlink - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
unlink.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Provides helper methods for unlinking formulae and kegs with consistent output.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'unlink.rb', line 18
-
-def self.unlink(keg, dry_run: false, verbose: false)
-  options = { dry_run:, verbose: }
-
-  keg.lock do
-    print "Unlinking #{keg}... "
-    puts if verbose
-    puts "#{keg.unlink(**options)} symlinks removed."
-  end
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'unlink.rb', line 7
-
-def self.unlink_versioned_formulae(formula, verbose: false)
-  formula.versioned_formulae
-         .select(&:keg_only?)
-         .select(&:linked?)
-         .filter_map(&:any_installed_keg)
-         .select(&:directory?)
-         .each do |keg|
-    unlink(keg, verbose:)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/UnversionedCaskChecker.html b/docs/Homebrew/UnversionedCaskChecker.html deleted file mode 100644 index 7eb48bbce..000000000 --- a/docs/Homebrew/UnversionedCaskChecker.html +++ /dev/null @@ -1,1933 +0,0 @@ - - - - - - - Class: Homebrew::UnversionedCaskChecker - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Homebrew::UnversionedCaskChecker - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
unversioned_cask_checker.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Check unversioned casks for updates by extracting their -contents and guessing the version from contained files.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

-
-

Constructor Details

- -
-

- - #initialize(cask) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'unversioned_cask_checker.rb', line 19
-
-def initialize(cask)
-  @cask = cask
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #caskCask::Cask (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'unversioned_cask_checker.rb', line 16
-
-def cask
-  @cask
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #all_versionsHash{String => BundleVersion} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-
-
# File 'unversioned_cask_checker.rb', line 103
-
-def all_versions
-  versions = {}
-
-  parse_info_plist = proc do |info_plist_path|
-    plist = system_command!("plutil", args: ["-convert", "xml1", "-o", "-", info_plist_path]).plist
-
-    id = plist["CFBundleIdentifier"]
-    version = BundleVersion.from_info_plist_content(plist)
-
-    versions[id] = version if id && version
-  end
-
-  Dir.mktmpdir("cask-checker", HOMEBREW_TEMP) do |dir|
-    dir = Pathname(dir)
-
-    installer.extract_primary_container(to: dir)
-
-    info_plist_paths = [
-      *apps,
-      *keyboard_layouts,
-      *mdimporters,
-      *colorpickers,
-      *dictionaries,
-      *qlplugins,
-      *installers,
-      *screen_savers,
-    ].flat_map do |artifact|
-      sources = if artifact.is_a?(Cask::Artifact::Installer)
-        # Installers are sometimes contained within an `.app`, so try both.
-        installer_path = artifact.path
-        installer_path.ascend
-                      .select { |path| path == installer_path || path.extname == ".app" }
-                      .sort
-      else
-        [artifact.source.basename]
-      end
-
-      sources.flat_map do |source|
-        top_level_info_plists(Pathname.glob(dir/"**"/source/"Contents"/"Info.plist")).sort
-      end
-    end
-
-    info_plist_paths.each(&parse_info_plist)
-
-    pkg_paths = pkgs.flat_map { |pkg| Pathname.glob(dir/"**"/pkg.path.basename).sort }
-    pkg_paths = Pathname.glob(dir/"**"/"*.pkg").sort if pkg_paths.empty?
-
-    pkg_paths.each do |pkg_path|
-      Dir.mktmpdir("cask-checker", HOMEBREW_TEMP) do |extract_dir|
-        extract_dir = Pathname(extract_dir)
-        FileUtils.rmdir extract_dir
-
-        system_command! "pkgutil", args: ["--expand-full", pkg_path, extract_dir]
-
-        top_level_info_plist_paths = top_level_info_plists(Pathname.glob(extract_dir/"**/Contents/Info.plist"))
-
-        top_level_info_plist_paths.each(&parse_info_plist)
-      ensure
-        Cask::Utils.gain_permissions_remove(extract_dir)
-        Pathname(extract_dir).mkpath
-      end
-    end
-
-    nil
-  end
-
-  versions
-end
-
-
- -
-

- - #appsArray<Cask::Artifact::App> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'unversioned_cask_checker.rb', line 29
-
-def apps
-  @apps ||= @cask.artifacts.select { |a| a.is_a?(Cask::Artifact::App) }
-end
-
-
- -
-

- - #colorpickersArray<Cask::Artifact::Colorpicker> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-54
-55
-56
-
-
# File 'unversioned_cask_checker.rb', line 54
-
-def colorpickers
-  @colorpickers ||= @cask.artifacts.select { |a| a.is_a?(Cask::Artifact::Colorpicker) }
-end
-
-
- -
-

- - #dictionariesArray<Cask::Artifact::Dictionary> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-44
-45
-46
-
-
# File 'unversioned_cask_checker.rb', line 44
-
-def dictionaries
-  @dictionaries ||= @cask.artifacts.select { |a| a.is_a?(Cask::Artifact::Dictionary) }
-end
-
-
- -
-

- - #guess_cask_versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-
-
# File 'unversioned_cask_checker.rb', line 173
-
-def guess_cask_version
-  if apps.empty? && pkgs.empty? && qlplugins.empty?
-    opoo "Cask #{cask} does not contain any apps, qlplugins or PKG installers."
-    return
-  end
-
-  Dir.mktmpdir("cask-checker", HOMEBREW_TEMP) do |dir|
-    dir = Pathname(dir)
-
-    installer.then do |i|
-      i.extract_primary_container(to: dir)
-    rescue ErrorDuringExecution => e
-      onoe e
-      return nil
-    end
-
-    info_plist_paths = apps.flat_map do |app|
-      top_level_info_plists(Pathname.glob(dir/"**"/app.source.basename/"Contents"/"Info.plist")).sort
-    end
-
-    info_plist_paths.each do |info_plist_path|
-      if (version = BundleVersion.from_info_plist(info_plist_path))
-        return version.nice_version
-      end
-    end
-
-    pkg_paths = pkgs.flat_map do |pkg|
-      Pathname.glob(dir/"**"/pkg.path.basename).sort
-    end
-
-    pkg_paths.each do |pkg_path|
-      packages =
-        system_command!("installer", args: ["-plist", "-pkginfo", "-pkg", pkg_path])
-        .plist
-        .map { |package| package.fetch("Package") }
-
-      Dir.mktmpdir("cask-checker", HOMEBREW_TEMP) do |extract_dir|
-        extract_dir = Pathname(extract_dir)
-        FileUtils.rmdir extract_dir
-
-        begin
-          system_command! "pkgutil", args: ["--expand-full", pkg_path, extract_dir]
-        rescue ErrorDuringExecution => e
-          onoe "Failed to extract #{pkg_path.basename}: #{e}"
-          next
-        end
-
-        top_level_info_plist_paths = top_level_info_plists(Pathname.glob(extract_dir/"**/Contents/Info.plist"))
-
-        unique_info_plist_versions =
-          top_level_info_plist_paths.filter_map { |i| BundleVersion.from_info_plist(i)&.nice_version }
-                                    .uniq
-        return unique_info_plist_versions.first if unique_info_plist_versions.count == 1
-
-        package_info_path = extract_dir/"PackageInfo"
-        if package_info_path.exist?
-          if (version = BundleVersion.from_package_info(package_info_path))
-            return version.nice_version
-          end
-        elsif packages.count == 1
-          onoe "#{pkg_path.basename} does not contain a `PackageInfo` file."
-        end
-
-        distribution_path = extract_dir/"Distribution"
-        if distribution_path.exist?
-          require "rexml/document"
-
-          xml = REXML::Document.new(distribution_path.read)
-
-          product = xml.get_elements("//installer-gui-script//product").first
-          product_version = product["version"] if product
-          return product_version if product_version.present?
-        end
-
-        opoo "#{pkg_path.basename} contains multiple packages: #{packages}" if packages.count != 1
-
-        $stderr.puts Pathname.glob(extract_dir/"**/*")
-                             .map { |path|
-                               regex = %r{\A(.*?\.(app|qlgenerator|saver|plugin|kext|bundle|osax))/.*\Z}
-                               path.to_s.sub(regex, '\1')
-                             }.uniq
-      ensure
-        Cask::Utils.gain_permissions_remove(extract_dir)
-        Pathname(extract_dir).mkpath
-      end
-    end
-
-    nil
-  end
-end
-
-
- -
-

- - #installerCask::Installer - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'unversioned_cask_checker.rb', line 24
-
-def installer
-  @installer ||= Cask::Installer.new(cask, verify_download_integrity: false)
-end
-
-
- -
-

- - #installersArray<Cask::Artifact::Installer> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-64
-65
-66
-
-
# File 'unversioned_cask_checker.rb', line 64
-
-def installers
-  @installers ||= @cask.artifacts.select { |a| a.is_a?(Cask::Artifact::Installer) }
-end
-
-
- -
-

- - #keyboard_layoutsArray<Cask::Artifact::KeyboardLayout> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'unversioned_cask_checker.rb', line 34
-
-def keyboard_layouts
-  @keyboard_layouts ||= @cask.artifacts.select { |a| a.is_a?(Cask::Artifact::KeyboardLayout) }
-end
-
-
- -
-

- - #mdimportersArray<Cask::Artifact::Mdimporter> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'unversioned_cask_checker.rb', line 59
-
-def mdimporters
-  @mdimporters ||= @cask.artifacts.select { |a| a.is_a?(Cask::Artifact::Mdimporter) }
-end
-
-
- -
-

- - #pkgsArray<Cask::Artifact::Pkg> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'unversioned_cask_checker.rb', line 69
-
-def pkgs
-  @pkgs ||= @cask.artifacts.select { |a| a.is_a?(Cask::Artifact::Pkg) }
-end
-
-
- -
-

- - #qlpluginsArray<Cask::Artifact::Qlplugin> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'unversioned_cask_checker.rb', line 39
-
-def qlplugins
-  @qlplugins ||= @cask.artifacts.select { |a| a.is_a?(Cask::Artifact::Qlplugin) }
-end
-
-
- -
-

- - #screen_saversArray<Cask::Artifact::ScreenSaver> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'unversioned_cask_checker.rb', line 49
-
-def screen_savers
-  @screen_savers ||= @cask.artifacts.select { |a| a.is_a?(Cask::Artifact::ScreenSaver) }
-end
-
-
- -
-

- - #single_app_cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-74
-75
-76
-
-
# File 'unversioned_cask_checker.rb', line 74
-
-def single_app_cask?
-  apps.count == 1
-end
-
-
- -
-

- - #single_pkg_cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-85
-86
-
-
# File 'unversioned_cask_checker.rb', line 84
-
-def single_pkg_cask?
-  pkgs.count == 1
-end
-
-
- -
-

- - #single_qlplugin_cask?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-79
-80
-81
-
-
# File 'unversioned_cask_checker.rb', line 79
-
-def single_qlplugin_cask?
-  qlplugins.count == 1
-end
-
-
- -
-

- - #top_level_info_plists(paths) ⇒ Array<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Filter paths to Info.plist files so that ones belonging -to e.g. nested .apps are ignored.

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-
-
# File 'unversioned_cask_checker.rb', line 91
-
-def top_level_info_plists(paths)
-  # Go from `./Contents/Info.plist` to `./`.
-  top_level_paths = paths.map { |path| path.parent.parent }
-
-  paths.reject do |path|
-    top_level_paths.any? do |_other_top_level_path|
-      path.ascend.drop(3).any? { |parent_path| top_level_paths.include?(parent_path) }
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Homebrew/Upgrade.html b/docs/Homebrew/Upgrade.html deleted file mode 100644 index 5d4bdf621..000000000 --- a/docs/Homebrew/Upgrade.html +++ /dev/null @@ -1,1291 +0,0 @@ - - - - - - - Module: Homebrew::Upgrade - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Homebrew::Upgrade - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
upgrade.rb,
- upgrade.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .check_broken_dependents(installed_formulae) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-
-
# File 'upgrade.rb', line 252
-
-def check_broken_dependents(installed_formulae)
-  CacheStoreDatabase.use(:linkage) do |db|
-    installed_formulae.flat_map(&:runtime_installed_formula_dependents)
-                      .uniq
-                      .select do |f|
-      keg = f.any_installed_keg
-      next unless keg
-      next unless keg.directory?
-
-      LinkageChecker.new(keg, cache_db: db)
-                    .broken_library_linkage?
-    end.compact
-  end
-end
-
-
- -
-

- - .check_installed_dependents(formulae, flags:, dry_run: false, installed_on_request: false, force_bottle: false, build_from_source_formulae: [], interactive: false, keep_tmp: false, debug_symbols: false, force: false, debug: false, quiet: false, verbose: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-
-
# File 'upgrade.rb', line 277
-
-def check_installed_dependents(
-  formulae,
-  flags:,
-  dry_run: false,
-  installed_on_request: false,
-  force_bottle: false,
-  build_from_source_formulae: [],
-  interactive: false,
-  keep_tmp: false,
-  debug_symbols: false,
-  force: false,
-  debug: false,
-  quiet: false,
-  verbose: false
-)
-  if Homebrew::EnvConfig.no_installed_dependents_check?
-    unless Homebrew::EnvConfig.no_env_hints?
-      opoo <<~EOS
-        HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set: not checking for outdated
-        dependents or dependents with broken linkage!
-      EOS
-    end
-    return
-  end
-
-  installed_formulae = (dry_run ? formulae : FormulaInstaller.installed.to_a).dup
-  installed_formulae.reject! { |f| f.core_formula? && f.versioned_formula? }
-  return if installed_formulae.empty?
-
-  already_broken_dependents = check_broken_dependents(installed_formulae)
-
-  # TODO: this should be refactored to use FormulaInstaller new logic
-  outdated_dependents =
-    installed_formulae.flat_map(&:runtime_installed_formula_dependents)
-                      .uniq
-                      .select(&:outdated?)
-
-  # Ensure we never attempt a source build for outdated dependents of upgraded formulae.
-  outdated_dependents, skipped_dependents = outdated_dependents.partition do |dependent|
-    dependent.bottled? && dependent.deps.map(&:to_formula).all?(&:bottled?)
-  end
-
-  if skipped_dependents.present?
-    opoo <<~EOS
-      The following dependents of upgraded formulae are outdated but will not
-      be upgraded because they are not bottled:
-        #{skipped_dependents * "\n  "}
-    EOS
-  end
-
-  return if outdated_dependents.blank? && already_broken_dependents.blank?
-
-  outdated_dependents -= installed_formulae if dry_run
-
-  upgradeable_dependents =
-    outdated_dependents.reject(&:pinned?)
-                       .sort { |a, b| depends_on(a, b) }
-  pinned_dependents =
-    outdated_dependents.select(&:pinned?)
-                       .sort { |a, b| depends_on(a, b) }
-
-  if pinned_dependents.present?
-    plural = Utils.pluralize("dependent", pinned_dependents.count)
-    opoo "Not upgrading #{pinned_dependents.count} pinned #{plural}:"
-    puts(pinned_dependents.map do |f|
-      "#{f.full_specified_name} #{f.pkg_version}"
-    end.join(", "))
-  end
-
-  # Print the upgradable dependents.
-  if upgradeable_dependents.blank?
-    ohai "No outdated dependents to upgrade!" unless dry_run
-  else
-    formula_plural = Utils.pluralize("formula", installed_formulae.count, plural: "e")
-    upgrade_verb = dry_run ? "Would upgrade" : "Upgrading"
-    ohai "#{upgrade_verb} #{Utils.pluralize("dependent", upgradeable_dependents.count,
-                                            include_count: true)} of upgraded #{formula_plural}:"
-    Upgrade.puts_no_installed_dependents_check_disable_message_if_not_already!
-    formulae_upgrades = upgradeable_dependents.map do |f|
-      name = f.full_specified_name
-      if f.optlinked?
-        "#{name} #{Keg.new(f.opt_prefix).version} -> #{f.pkg_version}"
-      else
-        "#{name} #{f.pkg_version}"
-      end
-    end
-    puts formulae_upgrades.join(", ")
-  end
-
-  unless dry_run
-    upgrade_formulae(
-      upgradeable_dependents,
-      flags:,
-      installed_on_request:,
-      force_bottle:,
-      build_from_source_formulae:,
-      dependents:                 true,
-      interactive:,
-      keep_tmp:,
-      debug_symbols:,
-      force:,
-      debug:,
-      quiet:,
-      verbose:,
-    )
-  end
-
-  # Update installed formulae after upgrading
-  installed_formulae = FormulaInstaller.installed.to_a
-
-  # Assess the dependents tree again now we've upgraded.
-  unless dry_run
-    oh1 "Checking for dependents of upgraded formulae..."
-    Upgrade.puts_no_installed_dependents_check_disable_message_if_not_already!
-  end
-
-  broken_dependents = check_broken_dependents(installed_formulae)
-  if broken_dependents.blank?
-    if dry_run
-      ohai "No currently broken dependents found!"
-      opoo "If they are broken by the upgrade they will also be upgraded or reinstalled."
-    else
-      ohai "No broken dependents found!"
-    end
-    return
-  end
-
-  reinstallable_broken_dependents =
-    broken_dependents.reject(&:outdated?)
-                     .reject(&:pinned?)
-                     .sort { |a, b| depends_on(a, b) }
-  outdated_pinned_broken_dependents =
-    broken_dependents.select(&:outdated?)
-                     .select(&:pinned?)
-                     .sort { |a, b| depends_on(a, b) }
-
-  # Print the pinned dependents.
-  if outdated_pinned_broken_dependents.present?
-    count = outdated_pinned_broken_dependents.count
-    plural = Utils.pluralize("dependent", outdated_pinned_broken_dependents.count)
-    onoe "Not reinstalling #{count} broken and outdated, but pinned #{plural}:"
-    $stderr.puts(outdated_pinned_broken_dependents.map do |f|
-      "#{f.full_specified_name} #{f.pkg_version}"
-    end.join(", "))
-  end
-
-  # Print the broken dependents.
-  if reinstallable_broken_dependents.blank?
-    ohai "No broken dependents to reinstall!"
-  else
-    ohai "Reinstalling #{Utils.pluralize("dependent", reinstallable_broken_dependents.count,
-                                         include_count: true)} with broken linkage from source:"
-    Upgrade.puts_no_installed_dependents_check_disable_message_if_not_already!
-    puts reinstallable_broken_dependents.map(&:full_specified_name)
-                                        .join(", ")
-  end
-
-  return if dry_run
-
-  reinstallable_broken_dependents.each do |formula|
-    Homebrew.reinstall_formula(
-      formula,
-      flags:,
-      force_bottle:,
-      build_from_source_formulae: build_from_source_formulae + [formula.full_name],
-      interactive:,
-      keep_tmp:,
-      debug_symbols:,
-      force:,
-      debug:,
-      quiet:,
-      verbose:,
-    )
-  rescue FormulaInstallationAlreadyAttemptedError
-    # We already attempted to reinstall f as part of the dependency tree of
-    # another formula. In that case, don't generate an error, just move on.
-    nil
-  rescue CannotInstallFormulaError, DownloadError => e
-    ofail e
-  rescue BuildError => e
-    e.dump(verbose:)
-    puts
-    Homebrew.failed = true
-  end
-end
-
-
- -
-

- - .install_formula(formula_installer, upgrade:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-
-
# File 'upgrade.rb', line 218
-
-def install_formula(formula_installer, upgrade:)
-  formula = formula_installer.formula
-
-  formula_installer.check_installation_already_attempted
-
-  if upgrade
-    print_upgrade_message(formula, formula_installer.options)
-
-    kegs = outdated_kegs(formula)
-    linked_kegs = kegs.select(&:linked?)
-  else
-    formula.print_tap_action
-  end
-
-  # first we unlink the currently active keg for this formula otherwise it is
-  # possible for the existing build to interfere with the build we are about to
-  # do! Seriously, it happens!
-  kegs.each(&:unlink) if kegs.present?
-
-  formula_installer.install
-  formula_installer.finish
-rescue FormulaInstallationAlreadyAttemptedError
-  # We already attempted to upgrade f as part of the dependency tree of
-  # another formula. In that case, don't generate an error, just move on.
-  nil
-ensure
-  # restore previous installation state if build failed
-  begin
-    linked_kegs&.each(&:link) unless formula.latest_version_installed?
-  rescue
-    nil
-  end
-end
-
-
- -
-

- - .outdated_kegs(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-125
-126
-127
-128
-129
-
-
# File 'upgrade.rb', line 125
-
-def outdated_kegs(formula)
-  [formula, *formula.old_installed_formulae].map(&:linked_keg)
-                                            .select(&:directory?)
-                                            .map { |k| Keg.new(k.resolved_path) }
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-131
-132
-133
-134
-135
-136
-137
-138
-139
-
-
# File 'upgrade.rb', line 131
-
-def print_upgrade_message(formula, fi_options)
-  version_upgrade = if formula.optlinked?
-    "#{Keg.new(formula.opt_prefix).version} -> #{formula.pkg_version}"
-  else
-    "-> #{formula.pkg_version}"
-  end
-  oh1 "Upgrading #{Formatter.identifier(formula.full_specified_name)}"
-  puts "  #{version_upgrade} #{fi_options.to_a.join(" ")}"
-end
-
-
- -
-

- - .puts_no_installed_dependents_check_disable_message_if_not_already!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-267
-268
-269
-270
-271
-272
-273
-274
-275
-
-
# File 'upgrade.rb', line 267
-
-def self.puts_no_installed_dependents_check_disable_message_if_not_already!
-  return if Homebrew::EnvConfig.no_env_hints?
-  return if Homebrew::EnvConfig.no_installed_dependents_check?
-  return if @puts_no_installed_dependents_check_disable_message_if_not_already
-
-  puts "Disable this behaviour by setting HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK."
-  puts "Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`)."
-  @puts_no_installed_dependents_check_disable_message_if_not_already = true
-end
-
-
- -
-

- - .upgrade_formulae(formulae_to_install, flags:, dry_run: false, installed_on_request: false, force_bottle: false, build_from_source_formulae: [], dependents: false, interactive: false, keep_tmp: false, debug_symbols: false, force: false, overwrite: false, debug: false, quiet: false, verbose: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-
-
# File 'upgrade.rb', line 16
-
-def upgrade_formulae(
-  formulae_to_install,
-  flags:,
-  dry_run: false,
-  installed_on_request: false,
-  force_bottle: false,
-  build_from_source_formulae: [],
-  dependents: false,
-  interactive: false,
-  keep_tmp: false,
-  debug_symbols: false,
-  force: false,
-  overwrite: false,
-  debug: false,
-  quiet: false,
-  verbose: false
-)
-  return if formulae_to_install.empty?
-
-  # Sort keg-only before non-keg-only formulae to avoid any needless conflicts
-  # with outdated, non-keg-only versions of formulae being upgraded.
-  formulae_to_install.sort! do |a, b|
-    if !a.keg_only? && b.keg_only?
-      1
-    elsif a.keg_only? && !b.keg_only?
-      -1
-    else
-      0
-    end
-  end
-
-  dependency_graph = Utils::TopologicalHash.graph_package_dependencies(formulae_to_install)
-  begin
-    formulae_to_install = dependency_graph.tsort & formulae_to_install
-  rescue TSort::Cyclic
-    raise CyclicDependencyError, dependency_graph.strongly_connected_components if Homebrew::EnvConfig.developer?
-  end
-
-  formula_installers = formulae_to_install.filter_map do |formula|
-    Migrator.migrate_if_needed(formula, force:, dry_run:)
-    begin
-      fi = create_formula_installer(
-        formula,
-        flags:,
-        installed_on_request:,
-        force_bottle:,
-        build_from_source_formulae:,
-        interactive:,
-        keep_tmp:,
-        debug_symbols:,
-        force:,
-        overwrite:,
-        debug:,
-        quiet:,
-        verbose:,
-      )
-      unless dry_run
-        fi.prelude
-
-        # Don't need to install this bottle if all of the runtime
-        # dependencies have the same or newer version already installed.
-        next if dependents && fi.bottle_tab_runtime_dependencies.presence&.all? do |dependency, hash|
-          dependency_formula = begin
-            Formula[dependency]
-          rescue FormulaUnavailableError
-            nil
-          end
-          next false if dependency_formula.nil?
-
-          next true if dependency_formula.latest_version_installed?
-
-          installed_version = dependency_formula.any_installed_version
-          next false unless installed_version
-
-          next false if hash["version"].blank?
-
-          # Tabs prior to 4.1.18 did not have revision or pkg_version fields.
-          # As a result, we have to be more conversative when we do not have
-          # a revision in the tab and assume that if the formula has a
-          # the same version and a non-zero revision that it needs upgraded.
-          tab_version = Version.new(hash["version"])
-          if hash["revision"].present?
-            tab_pkg_version = PkgVersion.new(tab_version, hash["revision"])
-            installed_version >= tab_pkg_version
-          elsif installed_version.version == tab_version
-            dependency_formula.revision.zero?
-          else
-            installed_version.version > tab_version
-          end
-        end
-
-        fi.fetch
-      end
-      fi
-    rescue CannotInstallFormulaError => e
-      ofail e
-      nil
-    rescue UnsatisfiedRequirements, DownloadError => e
-      ofail "#{formula}: #{e}"
-      nil
-    end
-  end
-
-  formula_installers.each do |fi|
-    upgrade_formula(fi, dry_run:, verbose:)
-    Cleanup.install_formula_clean!(fi.formula, dry_run:)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/HomebrewCurlDownloadStrategy.html b/docs/HomebrewCurlDownloadStrategy.html deleted file mode 100644 index cbf1a6037..000000000 --- a/docs/HomebrewCurlDownloadStrategy.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - Class: HomebrewCurlDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: HomebrewCurlDownloadStrategy - - - -

-
- -
-
Inherits:
-
- CurlDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a file using homebrew's curl.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CurlDownloadStrategy

-

#mirrors

- - - -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - - - - - - - -

Method Summary

- -

Methods inherited from CurlDownloadStrategy

-

#clear_cache, #fetch, #initialize, #resolved_time_file_size

- - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from AbstractFileDownloadStrategy

-

#basename, #cached_location, #symlink_location, #temporary_path

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #initialize, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -

This class inherits a constructor from CurlDownloadStrategy

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/HomebrewCurlDownloadStrategyError.html b/docs/HomebrewCurlDownloadStrategyError.html deleted file mode 100644 index 19fedf9b9..000000000 --- a/docs/HomebrewCurlDownloadStrategyError.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - Exception: HomebrewCurlDownloadStrategyError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: HomebrewCurlDownloadStrategyError - - - Private -

-
- -
-
Inherits:
-
- CurlDownloadStrategyError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised in CurlDownloadStrategy#fetch.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(url) ⇒ HomebrewCurlDownloadStrategyError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of HomebrewCurlDownloadStrategyError.

- - -
-
-
- - -
- - - - -
-
-
-
-637
-638
-639
-
-
# File 'exceptions.rb', line 637
-
-def initialize(url)
-  super "Homebrew-installed `curl` is not installed for: #{url}"
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/IO.html b/docs/IO.html deleted file mode 100644 index 35eed44d6..000000000 --- a/docs/IO.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - Class: IO - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: IO - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/io.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #readline_nonblock(sep = $INPUT_RECORD_SEPARATOR) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-
-
# File 'extend/io.rb', line 5
-
-def readline_nonblock(sep = $INPUT_RECORD_SEPARATOR)
-  line = +""
-  buffer = +""
-
-  begin
-    loop do
-      break if buffer == sep
-
-      read_nonblock(1, buffer)
-      line.concat(buffer)
-    end
-
-    line.freeze
-  rescue IO::WaitReadable, EOFError
-    raise if line.empty?
-
-    line.freeze
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/IRB.html b/docs/IRB.html deleted file mode 100644 index 20ffa454d..000000000 --- a/docs/IRB.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - Module: IRB - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: IRB - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
debrew/irb.rb
-
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .start_within(binding) ⇒ Object - - - - - -

- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'debrew/irb.rb', line 7
-
-def self.start_within(binding)
-  unless @setup_done
-    setup(nil, argv: [])
-    @setup_done = true
-  end
-
-  workspace = WorkSpace.new(binding)
-  irb = Irb.new(workspace)
-
-  @CONF[:IRB_RC]&.call(irb.context)
-  @CONF[:MAIN_CONTEXT] = irb.context
-
-  prev_trap = trap("SIGINT") do
-    irb.signal_handle
-  end
-
-  begin
-    catch(:IRB_EXIT) do
-      irb.eval_input
-    end
-  ensure
-    trap("SIGINT", prev_trap)
-    irb_at_exit
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Ignorable.html b/docs/Ignorable.html deleted file mode 100644 index f1b75d9cb..000000000 --- a/docs/Ignorable.html +++ /dev/null @@ -1,412 +0,0 @@ - - - - - - - Module: Ignorable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Ignorable - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
ignorable.rb,
- ignorable.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: ExceptionMixin - - - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .hook_raiseObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'ignorable.rb', line 21
-
-def self.hook_raise
-  Object.class_eval do
-    alias_method :original_raise, :raise
-
-    def raise(*)
-      callcc do |continuation|
-        super
-      rescue Exception => e # rubocop:disable Lint/RescueException
-        unless e.is_a?(ScriptError)
-          e.extend(ExceptionMixin)
-          T.cast(e, ExceptionMixin).continuation = continuation
-        end
-        super(e)
-      end
-    end
-
-    alias_method :fail, :raise
-  end
-
-  return unless block_given?
-
-  yield
-  unhook_raise
-end
-
-
- -
-

- - .raiseObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This is a workaround to enable raise to be aliased

- - -
-
- - - - - -
-
-
-
-7
-
-
# File 'ignorable.rbi', line 7
-
-def self.raise(*); end
-
-
- -
-

- - .unhook_raiseObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-
-
# File 'ignorable.rb', line 46
-
-def self.unhook_raise
-  Object.class_eval do
-    alias_method :raise, :original_raise
-    alias_method :fail, :original_raise
-    undef :original_raise
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Ignorable/ExceptionMixin.html b/docs/Ignorable/ExceptionMixin.html deleted file mode 100644 index 5a9448537..000000000 --- a/docs/Ignorable/ExceptionMixin.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - Module: Ignorable::ExceptionMixin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Ignorable::ExceptionMixin - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
ignorable.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Marks exceptions which can be ignored and provides -the ability to jump back to where it was raised.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Instance Attribute Details

- - - -
-

- - #continuationObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'ignorable.rb', line 14
-
-def continuation
-  @continuation
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #ignoreObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'ignorable.rb', line 16
-
-def ignore
-  continuation.call
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/InstallRenamed.html b/docs/InstallRenamed.html deleted file mode 100644 index 39768b5aa..000000000 --- a/docs/InstallRenamed.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - Module: InstallRenamed - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: InstallRenamed - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
install_renamed.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for installing default files.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #+(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'install_renamed.rb', line 23
-
-def +(other)
-  super.extend(InstallRenamed)
-end
-
-
- -
-

- - #/(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'install_renamed.rb', line 27
-
-def /(other)
-  super.extend(InstallRenamed)
-end
-
-
- -
-

- - #cp_path_sub(pattern, replacement) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-
-
# File 'install_renamed.rb', line 17
-
-def cp_path_sub(pattern, replacement)
-  super do |src, dst|
-    append_default_if_different(src, dst)
-  end
-end
-
-
- -
-

- - #install_p(_, new_basename) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-
-
# File 'install_renamed.rb', line 6
-
-def install_p(_, new_basename)
-  super do |src, dst|
-    if src.directory?
-      dst.install(src.children)
-      next
-    else
-      append_default_if_different(src, dst)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/InstalledDependents.html b/docs/InstalledDependents.html deleted file mode 100644 index fa4d5c663..000000000 --- a/docs/InstalledDependents.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - Module: InstalledDependents - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: InstalledDependents - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
installed_dependents.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for installed dependents.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .find_some_installed_dependents(kegs, casks: []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Given an array of kegs, this method will try to find some other kegs -or casks that depend on them. If it does, it returns:

- -
    -
  • some kegs in the passed array that have installed dependents
  • -
  • some installed dependents of those kegs.
  • -
- -

If it doesn't, it returns nil.

- -

Note that nil will be returned if the only installed dependents of the -passed kegs are other kegs in the array or casks present in the casks -parameter.

- -

For efficiency, we don't bother trying to get complete data.

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-
-
# File 'installed_dependents.rb', line 23
-
-def find_some_installed_dependents(kegs, casks: [])
-  keg_names = kegs.select(&:optlinked?).map(&:name)
-  keg_formulae = []
-  kegs_by_source = kegs.group_by do |keg|
-    # First, attempt to resolve the keg to a formula
-    # to get up-to-date name and tap information.
-    f = keg.to_formula
-    keg_formulae << f
-    [f.name, f.tap]
-  rescue
-    # If the formula for the keg can't be found,
-    # fall back to the information in the tab.
-    [keg.name, keg.tab.tap]
-  end
-
-  all_required_kegs = Set.new
-  all_dependents = []
-
-  # Don't include dependencies of kegs that were in the given array.
-  dependents_to_check = (Formula.installed - keg_formulae) + (Cask::Caskroom.casks - casks)
-
-  dependents_to_check.each do |dependent|
-    required = case dependent
-    when Formula
-      dependent.missing_dependencies(hide: keg_names)
-    when Cask::Cask
-      # When checking for cask dependents, we don't care about missing or non-runtime dependencies
-      CaskDependent.new(dependent).runtime_dependencies.map(&:to_formula)
-    end
-
-    required_kegs = required.filter_map do |f|
-      f_kegs = kegs_by_source[[f.name, f.tap]]
-      next unless f_kegs
-
-      f_kegs.max_by(&:scheme_and_version)
-    end
-
-    next if required_kegs.empty?
-
-    all_required_kegs += required_kegs
-    all_dependents << dependent.to_s
-  end
-
-  return if all_required_kegs.empty?
-  return if all_dependents.empty?
-
-  [all_required_kegs.to_a, all_dependents.sort]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Keg.html b/docs/Keg.html deleted file mode 100644 index aadfc2712..000000000 --- a/docs/Keg.html +++ /dev/null @@ -1,7310 +0,0 @@ - - - - - - - Class: Keg - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Keg - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Cachable, Forwardable
-
- - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
extend/os/linux/keg.rb,
- extend/os/mac/keg.rb,
extend/os/mac/keg_relocate.rb,
extend/os/linux/keg_relocate.rb,
keg.rb,
os/mac/keg.rb,
keg_relocate.rb
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: AlreadyLinkedError, ConflictError, DirectoryNotWritableError, LinkError, Relocation - - -

- - -

- Constant Summary - collapse -

- -
- - -
(remove_const :KEG_LINK_DIRECTORIES).freeze
- - -
%w[
-  bin etc include lib sbin share var
-].freeze
- -
GENERIC_MUST_EXIST_SUBDIRECTORIES = - -
-
(remove_const :MUST_EXIST_SUBDIRECTORIES).freeze
- -
MUST_EXIST_SUBDIRECTORIES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(
-  KEG_LINK_DIRECTORIES - %w[var] + %w[
-    opt
-    var/homebrew/linked
-  ]
-).map { |dir| HOMEBREW_PREFIX/dir }.sort.uniq.freeze
- -
GENERIC_MUST_EXIST_DIRECTORIES = - -
-
(remove_const :MUST_EXIST_DIRECTORIES).freeze
- -
MUST_EXIST_DIRECTORIES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Keep relatively in sync with -https://github.com/Homebrew/install/blob/HEAD/install.sh

- - -
-
-
- - -
-
-
(MUST_EXIST_SUBDIRECTORIES + [
-  HOMEBREW_CELLAR,
-].sort.uniq).freeze
- -
GENERIC_MUST_BE_WRITABLE_DIRECTORIES = - -
-
(remove_const :MUST_BE_WRITABLE_DIRECTORIES).freeze
- -
MUST_BE_WRITABLE_DIRECTORIES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(
-  %w[
-    etc/bash_completion.d lib/pkgconfig
-    share/aclocal share/doc share/info share/locale share/man
-    share/man/man1 share/man/man2 share/man/man3 share/man/man4
-    share/man/man5 share/man/man6 share/man/man7 share/man/man8
-    share/zsh share/zsh/site-functions
-    var/log
-  ].map { |dir| HOMEBREW_PREFIX/dir } + MUST_EXIST_SUBDIRECTORIES + [
-    HOMEBREW_CACHE,
-    HOMEBREW_CELLAR,
-    HOMEBREW_LOCKS,
-    HOMEBREW_LOGS,
-    HOMEBREW_REPOSITORY,
-    Language::Python.homebrew_site_packages,
-  ]
-).sort.uniq.freeze
- -
VARIABLE_REFERENCE_RX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/^@(loader_|executable_|r)path/
- -
FRAMEWORK_RX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Matches framework references like XXX.framework/Versions/YYY/XXX and -XXX.framework/XXX, both with or without a slash-delimited prefix.

- - -
-
-
- - -
-
-
%r{(?:^|/)(([^/]+)\.framework/(?:Versions/[^/]+/)?\2)$}
- -
LOCALEDIR_RX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Locale-specific directories have the form language[_territory][.codeset][@modifier]

- - -
-
-
- - -
-
-
%r{(locale|man)/([a-z]{2}|C|POSIX)(_[A-Z]{2})?(\.[a-zA-Z\-0-9]+(@.+)?)?}
- -
INFOFILE_RX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%r{info/([^.].*?\.info|dir)$}
- -
SHARE_PATHS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

These paths relative to the keg's share directory should always be real -directories in the prefix, never symlinks.

- - -
-
-
- - -
-
-
%w[
-  aclocal doc info java locale man
-  man/man1 man/man2 man/man3 man/man4
-  man/man5 man/man6 man/man7 man/man8
-  man/cat1 man/cat2 man/cat3 man/cat4
-  man/cat5 man/cat6 man/cat7 man/cat8
-  applications gnome gnome/help icons
-  mime-info pixmaps sounds postgresql
-].freeze
- -
ELISP_EXTENSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[.el .elc].freeze
- -
PYC_EXTENSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[.pyc .pyo].freeze
- -
LIBTOOL_EXTENSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[.la .lai].freeze
- -
PREFIX_PLACEHOLDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"@@HOMEBREW_PREFIX@@"
- -
CELLAR_PLACEHOLDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"@@HOMEBREW_CELLAR@@"
- -
REPOSITORY_PLACEHOLDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"@@HOMEBREW_REPOSITORY@@"
- -
LIBRARY_PLACEHOLDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"@@HOMEBREW_LIBRARY@@"
- -
PERL_PLACEHOLDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"@@HOMEBREW_PERL@@"
- -
JAVA_PLACEHOLDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"@@HOMEBREW_JAVA@@"
- -
NULL_BYTE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"\x00"
- -
NULL_BYTE_STRING = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"\\x00"
- -
JAVA_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%r{#{HOMEBREW_PREFIX}/opt/openjdk(@\d+(\.\d+)*)?/libexec(/openjdk\.jdk/Contents/Home)?}
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

-
-

Constructor Details

- -
-

- - #initialize(path) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Pathname) - - - -
  • - -
- - -
- - - - -
-
-
-
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-
-
# File 'keg.rb', line 160
-
-def initialize(path)
-  path = path.resolved_path if path.to_s.start_with?("#{HOMEBREW_PREFIX}/opt/")
-  raise "#{path} is not a valid keg" if path.parent.parent.realpath != HOMEBREW_CELLAR.realpath
-  raise "#{path} is not a directory" unless path.directory?
-
-  @path = path
-  @name = path.parent.basename.to_s
-  @linked_keg_record = HOMEBREW_LINKED_KEGS/name
-  @opt_record = HOMEBREW_PREFIX/"opt/#{name}"
-  @oldname_opt_records = []
-  @require_relocation = false
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #linked_keg_recordObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-149
-150
-151
-
-
# File 'keg.rb', line 149
-
-def linked_keg_record
-  @linked_keg_record
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-149
-150
-151
-
-
# File 'keg.rb', line 149
-
-def name
-  @name
-end
-
-
- - - -
-

- - #opt_recordObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-149
-150
-151
-
-
# File 'keg.rb', line 149
-
-def opt_record
-  @opt_record
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .allObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-145
-146
-147
-
-
# File 'keg.rb', line 145
-
-def self.all
-  Formula.racks.flat_map(&:subdirs).map { |d| new(d) }
-end
-
-
- -
-

- - .file_linked_libraries(_file, _string) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'extend/os/mac/keg_relocate.rb', line 8
-
-def file_linked_libraries(file, string)
-  # Check dynamic library linkage. Importantly, do not perform for static
-  # libraries, which will falsely report "linkage" to themselves.
-  if file.mach_o_executable? || file.dylib? || file.mach_o_bundle?
-    file.dynamically_linked_libraries.select { |lib| lib.include? string }
-  else
-    []
-  end
-end
-
-
- -
-

- - .for(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - - - - - — -

    if this is a file in a keg, returns the containing Keg object.

    -
    - -
  • - -
- -

Raises:

-
    - -
  • - - - (Errno::ENOENT) - - - -
  • - -
- -
- - - - -
-
-
-
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-
-
# File 'keg.rb', line 131
-
-def self.for(path)
-  original_path = path
-  raise Errno::ENOENT, original_path.to_s unless original_path.exist?
-
-  if (path = original_path.realpath)
-    until path.root?
-      return Keg.new(path) if path.parent.parent == HOMEBREW_CELLAR.realpath
-
-      path = path.parent.realpath # realpath() prevents root? failing
-    end
-  end
-  raise NotAKegError, "#{original_path} is not inside a keg"
-end
-
-
- -
-

- - .text_matches_in_file(file, string, ignores, linked_libraries, formula_and_runtime_deps_names) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-
-
# File 'keg_relocate.rb', line 325
-
-def self.text_matches_in_file(file, string, ignores, linked_libraries, formula_and_runtime_deps_names)
-  text_matches = []
-  path_regex = Relocation.path_to_regex(string)
-  Utils.popen_read("strings", "-t", "x", "-", file.to_s) do |io|
-    until io.eof?
-      str = io.readline.chomp
-      next if ignores.any? { |i| str.match?(i) }
-      next unless str.match? path_regex
-
-      offset, match = str.split(" ", 2)
-
-      # Some binaries contain strings with lists of files
-      # e.g. `/usr/local/lib/foo:/usr/local/share/foo:/usr/lib/foo`
-      # Each item in the list should be checked separately
-      match.split(":").each do |sub_match|
-        # Not all items in the list may be matches
-        next unless sub_match.match? path_regex
-        next if linked_libraries.include? sub_match # Don't bother reporting a string if it was found by otool
-
-        # Do not report matches to files that do not exist.
-        next unless File.exist? sub_match
-
-        # Do not report matches to build dependencies.
-        if formula_and_runtime_deps_names.present?
-          begin
-            keg_name = Keg.for(Pathname.new(sub_match)).name
-            next unless formula_and_runtime_deps_names.include? keg_name
-          rescue NotAKegError
-            nil
-          end
-        end
-
-        text_matches << [match, offset] unless text_matches.any? { |text| text.last == offset }
-      end
-    end
-  end
-  text_matches
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #aliasesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-518
-519
-520
-
-
# File 'keg.rb', line 518
-
-def aliases
-  tab.aliases || []
-end
-
-
- -
-

- - #appsArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-365
-366
-367
-368
-
-
# File 'keg.rb', line 365
-
-def apps
-  app_prefix = optlinked? ? opt_record : path
-  Pathname.glob("#{app_prefix}/{,libexec/}*.app")
-end
-
-
- -
-

- - #binary_executable_or_library_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'extend/os/mac/keg.rb', line 29
-
-def binary_executable_or_library_files
-  mach_o_files
-end
-
-
- -
-

- - #binary_file?(file) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-243
-244
-245
-246
-247
-248
-249
-250
-
-
# File 'keg_relocate.rb', line 243
-
-def binary_file?(file)
-  grep_bin, grep_args = egrep_args
-
-  # We need to pass NULL_BYTE_STRING, the literal string "\x00", to grep
-  # rather than NULL_BYTE, a literal null byte, because grep will internally
-  # convert the literal string "\x00" to a null byte.
-  Utils.popen_read(grep_bin, *grep_args, NULL_BYTE_STRING, file).present?
-end
-
-
- -
-

- - #change_dylib_id(id, file) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - id - - - (String) - - - -
  • - -
  • - - file - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-
-
# File 'os/mac/keg.rb', line 6
-
-def change_dylib_id(id, file)
-  return false if file.dylib_id == id
-
-  @require_relocation = true
-  odebug "Changing dylib ID of #{file}\n  from #{file.dylib_id}\n    to #{id}"
-  file.change_dylib_id(id, strict: false)
-  true
-rescue MachO::MachOError
-  onoe <<~EOS
-    Failed changing dylib ID of #{file}
-      from #{file.dylib_id}
-        to #{id}
-  EOS
-  raise
-end
-
-
- -
-

- - #change_install_name(old, new, file) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - old - - - (String) - - - -
  • - -
  • - - new - - - (String) - - - -
  • - -
  • - - file - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'os/mac/keg.rb', line 23
-
-def change_install_name(old, new, file)
-  return false if old == new
-
-  @require_relocation = true
-  odebug "Changing install name in #{file}\n  from #{old}\n    to #{new}"
-  file.change_install_name(old, new, strict: false)
-  true
-rescue MachO::MachOError
-  onoe <<~EOS
-    Failed changing install name in #{file}
-      from #{old}
-        to #{new}
-  EOS
-  raise
-end
-
-
- -
-

- - #change_rpath(old, new, file) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'extend/os/linux/keg_relocate.rb', line 20
-
-def change_rpath(file, old_prefix, new_prefix)
-  return false if !file.elf? || !file.dynamic_elf?
-
-  updated = {}
-  old_rpath = file.rpath
-  new_rpath = if old_rpath
-    rpath = old_rpath.split(":")
-                     .map { |x| x.sub(old_prefix, new_prefix) }
-                     .select { |x| x.start_with?(new_prefix, "$ORIGIN") }
-
-    lib_path = "#{new_prefix}/lib"
-    rpath << lib_path unless rpath.include? lib_path
-
-    # Add GCC's lib directory (as of GCC 12+) to RPATH when there is existing versioned linkage.
-    # This prevents broken linkage when pouring bottles built with an old GCC formula.
-    unless name.match?(Version.formula_optionally_versioned_regex(:gcc))
-      rpath.map! { |rp| rp.sub(%r{lib/gcc/\d+$}, "lib/gcc/current") }
-    end
-
-    rpath.join(":")
-  end
-  updated[:rpath] = new_rpath if old_rpath != new_rpath
-
-  old_interpreter = file.interpreter
-  new_interpreter = if old_interpreter.nil?
-    nil
-  elsif File.readable? "#{new_prefix}/lib/ld.so"
-    "#{new_prefix}/lib/ld.so"
-  else
-    old_interpreter.sub old_prefix, new_prefix
-  end
-  updated[:interpreter] = new_interpreter if old_interpreter != new_interpreter
-
-  file.patch!(interpreter: updated[:interpreter], rpath: updated[:rpath])
-  true
-end
-
-
- -
-

- - #codesign_patched_binary(file) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'extend/os/mac/keg.rb', line 33
-
-def codesign_patched_binary(file)
-  return if MacOS.version < :big_sur
-
-  unless Hardware::CPU.arm?
-    result = system_command("codesign", args: ["--verify", file], print_stderr: false)
-    return unless result.stderr.match?(/invalid signature/i)
-  end
-
-  odebug "Codesigning #{file}"
-  prepare_codesign_writable_files(file) do
-    # Use quiet_system to squash notifications about resigning binaries
-    # which already have valid signatures.
-    return if quiet_system("codesign", "--sign", "-", "--force",
-                           "--preserve-metadata=entitlements,requirements,flags,runtime",
-                           file)
-
-    # If the codesigning fails, it may be a bug in Apple's codesign utility
-    # A known workaround is to copy the file to another inode, then move it back
-    # erasing the previous file. Then sign again.
-    #
-    # TODO: remove this once the bug in Apple's codesign utility is fixed
-    Dir::Tmpname.create("workaround") do |tmppath|
-      FileUtils.cp file, tmppath
-      FileUtils.mv tmppath, file, force: true
-    end
-
-    # Try signing again
-    odebug "Codesigning (2nd try) #{file}"
-    result = system_command("codesign", args: [
-      "--sign", "-", "--force",
-      "--preserve-metadata=entitlements,requirements,flags,runtime",
-      file
-    ], print_stderr: false)
-    return if result.success?
-
-    # If it fails again, error out
-    onoe <<~EOS
-      Failed applying an ad-hoc signature to #{file}:
-      #{result.stderr}
-    EOS
-  end
-end
-
-
- -
-

- - #completion_installed?(shell) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-
-
# File 'keg.rb', line 335
-
-def completion_installed?(shell)
-  dir = case shell
-  when :bash then path/"etc/bash_completion.d"
-  when :fish then path/"share/fish/vendor_completions.d"
-  when :zsh
-    dir = path/"share/zsh/site-functions"
-    dir if dir.directory? && dir.children.any? { |f| f.basename.to_s.start_with?("_") }
-  end
-  dir&.directory? && !dir.children.empty?
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Needed to make symlink permissions consistent on macOS and Linux for -reproducible bottles.

- - -
-
-
- - -
- - - - -
-
-
-
-118
-119
-120
-121
-122
-
-
# File 'extend/os/mac/keg.rb', line 118
-
-def consistent_reproducible_symlink_permissions!
-  path.find do |file|
-    File.lchmod 0777, file if file.symlink?
-  end
-end
-
-
- -
-

- - #delete_pyc_files!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-537
-538
-539
-540
-
-
# File 'keg.rb', line 537
-
-def delete_pyc_files!
-  path.find { |pn| pn.delete if PYC_EXTENSIONS.include?(pn.extname) }
-  path.find { |pn| FileUtils.rm_rf pn if pn.basename.to_s == "__pycache__" }
-end
-
-
- -
-

- - #delete_rpath(rpath, file) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - rpath - - - (String) - - - -
  • - -
  • - - file - - - (MachOShim) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'os/mac/keg.rb', line 56
-
-def delete_rpath(rpath, file)
-  odebug "Deleting rpath #{rpath} in #{file}"
-  file.delete_rpath(rpath, strict: false)
-  true
-rescue MachO::MachOError
-  onoe <<~EOS
-    Failed deleting rpath #{rpath} in #{file}
-  EOS
-  raise
-end
-
-
- -
-

- - #detect_cxx_stdlibs(_options = {}) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'extend/os/linux/keg_relocate.rb', line 57
-
-def detect_cxx_stdlibs(options = {})
-  skip_executables = options.fetch(:skip_executables, false)
-  results = Set.new
-  elf_files.each do |file|
-    next unless file.dynamic_elf?
-    next if file.binary_executable? && skip_executables
-
-    dylibs = file.dynamically_linked_libraries
-    results << :libcxx if dylibs.any? { |s| s.include? "libc++.so" }
-    results << :libstdcxx if dylibs.any? { |s| s.include? "libstdc++.so" }
-  end
-  results.to_a
-end
-
-
- -
-

- - #dylib_id_for(file) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-141
-142
-143
-144
-145
-146
-147
-
-
# File 'extend/os/mac/keg_relocate.rb', line 141
-
-def dylib_id_for(file)
-  # The new dylib ID should have the same basename as the old dylib ID, not
-  # the basename of the file itself.
-  basename = File.basename(file.dylib_id)
-  relative_dirname = file.dirname.relative_path_from(path)
-  (opt_record/relative_dirname/basename).to_s
-end
-
-
- -
-

- - #each_linkage_for(file, linkage_type, resolve_variable_references: false, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-135
-136
-137
-138
-139
-
-
# File 'extend/os/mac/keg_relocate.rb', line 135
-
-def each_linkage_for(file, linkage_type, resolve_variable_references: false, &block)
-  file.public_send(linkage_type, resolve_variable_references:)
-      .grep_v(VARIABLE_REFERENCE_RX)
-      .each(&block)
-end
-
-
- -
-

- - #each_unique_file_matching(string) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-
-
# File 'keg_relocate.rb', line 227
-
-def each_unique_file_matching(string)
-  Utils.popen_read("fgrep", recursive_fgrep_args, string, to_s) do |io|
-    hardlinks = Set.new
-
-    until io.eof?
-      file = Pathname.new(io.readline.chomp)
-      # Don't return symbolic links.
-      next if file.symlink?
-
-      # To avoid returning hardlinks, only return files with unique inodes.
-      # Hardlinks will have the same inode as the file they point to.
-      yield file if hardlinks.add? file.stat.ino
-    end
-  end
-end
-
-
- -
-

- - #egrep_argsObject - - - - Also known as: - generic_egrep_args - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-228
-229
-230
-231
-232
-
-
# File 'extend/os/mac/keg_relocate.rb', line 228
-
-def egrep_args
-  grep_bin = "egrep"
-  grep_args = "--files-with-matches"
-  [grep_bin, grep_args]
-end
-
-
- -
-

- - #elf_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-
-
# File 'extend/os/linux/keg_relocate.rb', line 71
-
-def elf_files
-  hardlinks = Set.new
-  elf_files = []
-  path.find do |pn|
-    next if pn.symlink? || pn.directory?
-    next if !pn.dylib? && !pn.binary_executable?
-
-    # If we've already processed a file, ignore its hardlinks (which have the
-    # same dev ID and inode). This prevents relocations from being performed
-    # on a binary more than once.
-    next unless hardlinks.add? [pn.stat.dev, pn.stat.ino]
-
-    elf_files << pn
-  end
-  elf_files
-end
-
-
- -
-

- - #elisp_installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-370
-371
-372
-373
-374
-
-
# File 'keg.rb', line 370
-
-def elisp_installed?
-  return false unless (path/"share/emacs/site-lisp"/name).exist?
-
-  (path/"share/emacs/site-lisp"/name).children.any? { |f| ELISP_EXTENSIONS.include? f.extname }
-end
-
-
- -
-

- - #empty_installation?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-
-
# File 'keg.rb', line 191
-
-def empty_installation?
-  Pathname.glob("#{path}/*") do |file|
-    return false if file.directory? && !file.children.reject(&:ds_store?).empty?
-
-    basename = file.basename.to_s
-    next if Metafiles.copy?(basename)
-    next if %w[.DS_Store INSTALL_RECEIPT.json].include?(basename)
-
-    return false
-  end
-
-  true
-end
-
-
- -
-

- - #find_dylib(bad_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-172
-173
-174
-175
-176
-177
-
-
# File 'extend/os/mac/keg_relocate.rb', line 172
-
-def find_dylib(bad_name)
-  return unless lib.directory?
-
-  suffix = "/#{find_dylib_suffix_from(bad_name)}"
-  lib.find { |pn| break pn if pn.to_s.end_with?(suffix) }
-end
-
-
- -
-

- - #find_dylib_suffix_from(bad_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-164
-165
-166
-167
-168
-169
-170
-
-
# File 'extend/os/mac/keg_relocate.rb', line 164
-
-def find_dylib_suffix_from(bad_name)
-  if (framework = bad_name.match(FRAMEWORK_RX))
-    framework[1]
-  else
-    File.basename(bad_name)
-  end
-end
-
-
- -
-

- - #fix_dynamic_linkageObject - - - - Also known as: - generic_fix_dynamic_linkage - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-
-
# File 'extend/os/mac/keg_relocate.rb', line 51
-
-def fix_dynamic_linkage
-  mach_o_files.each do |file|
-    file.ensure_writable do
-      modified = T.let(false, T::Boolean)
-      needs_codesigning = T.let(false, T::Boolean)
-
-      modified = change_dylib_id(dylib_id_for(file), file) if file.dylib?
-      needs_codesigning ||= modified
-
-      each_linkage_for(file, :dynamically_linked_libraries) do |bad_name|
-        # Don't fix absolute paths unless they are rooted in the build directory.
-        new_name = if bad_name.start_with?("/") && !rooted_in_build_directory?(bad_name)
-          bad_name
-        else
-          fixed_name(file, bad_name)
-        end
-        loader_name = loader_name_for(file, new_name)
-        modified = change_install_name(bad_name, loader_name, file) if loader_name != bad_name
-        needs_codesigning ||= modified
-      end
-
-      each_linkage_for(file, :rpaths) do |bad_name|
-        new_name = opt_name_for(bad_name)
-        loader_name = loader_name_for(file, new_name)
-        next if loader_name == bad_name
-
-        modified = change_rpath(bad_name, loader_name, file)
-        needs_codesigning ||= modified
-      end
-
-      # Strip duplicate rpaths and rpaths rooted in the build directory.
-      # We do this separately from the rpath relocation above to avoid
-      # failing to relocate an rpath whose variable duplicate we deleted.
-      each_linkage_for(file, :rpaths, resolve_variable_references: true) do |bad_name|
-        next if !rooted_in_build_directory?(bad_name) && file.rpaths.count(bad_name) == 1
-
-        modified = delete_rpath(bad_name, file)
-        needs_codesigning ||= modified
-      end
-
-      # codesign the file if needed
-      codesign_patched_binary(file) if needs_codesigning
-    end
-  end
-
-  generic_fix_dynamic_linkage
-end
-
-
- -
-

- - #fixed_name(file, bad_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If file is a dylib or bundle itself, look for the dylib named by -bad_name relative to the lib directory, so that we can skip the more -expensive recursive search if possible.

- - -
-
-
- - -
- - - - -
-
-
-
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-
-
# File 'extend/os/mac/keg_relocate.rb', line 114
-
-def fixed_name(file, bad_name)
-  if bad_name.start_with? PREFIX_PLACEHOLDER
-    bad_name.sub(PREFIX_PLACEHOLDER, HOMEBREW_PREFIX)
-  elsif bad_name.start_with? CELLAR_PLACEHOLDER
-    bad_name.sub(CELLAR_PLACEHOLDER, HOMEBREW_CELLAR)
-  elsif (file.dylib? || file.mach_o_bundle?) && (file.dirname/bad_name).exist?
-    "@loader_path/#{bad_name}"
-  elsif file.mach_o_executable? && (lib/bad_name).exist?
-    "#{lib}/#{bad_name}"
-  elsif file.mach_o_executable? && (libexec/"lib"/bad_name).exist?
-    "#{libexec}/lib/#{bad_name}"
-  elsif (abs_name = find_dylib(bad_name)) && abs_name.exist?
-    abs_name.to_s
-  else
-    opoo "Could not fix #{bad_name} in #{file}"
-    bad_name
-  end
-end
-
-
- -
-

- - #functions_installed?(shell) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-
-
# File 'keg.rb', line 346
-
-def functions_installed?(shell)
-  case shell
-  when :fish
-    dir = path/"share/fish/vendor_functions.d"
-    dir.directory? && !dir.children.empty?
-  when :zsh
-    # Check for non completion functions (i.e. files not started with an underscore),
-    # since those can be checked separately
-    dir = path/"share/zsh/site-functions"
-    dir.directory? && dir.children.any? { |f| !f.basename.to_s.start_with?("_") }
-  end
-end
-
-
- -
-

- - #libObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-252
-253
-254
-
-
# File 'keg_relocate.rb', line 252
-
-def lib
-  path/"lib"
-end
-
-
- -
-

- - #libexecObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-256
-257
-258
-
-
# File 'keg_relocate.rb', line 256
-
-def libexec
-  path/"libexec"
-end
-
-
- -
-

- - #libtool_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-
-
# File 'keg_relocate.rb', line 305
-
-def libtool_files
-  libtool_files = []
-
-  path.find do |pn|
-    next if pn.symlink? || pn.directory? || Keg::LIBTOOL_EXTENSIONS.exclude?(pn.extname)
-
-    libtool_files << pn
-  end
-  libtool_files
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-
-
# File 'keg.rb', line 407
-
-def link(verbose: false, dry_run: false, overwrite: false)
-  raise AlreadyLinkedError, self if linked_keg_record.directory?
-
-  ObserverPathnameExtension.reset_counts!
-
-  optlink(verbose:, dry_run:, overwrite:) unless dry_run
-
-  # yeah indeed, you have to force anything you need in the main tree into
-  # these dirs REMEMBER that *NOT* everything needs to be in the main tree
-  link_dir("etc", verbose:, dry_run:, overwrite:) { :mkpath }
-  link_dir("bin", verbose:, dry_run:, overwrite:) { :skip_dir }
-  link_dir("sbin", verbose:, dry_run:, overwrite:) { :skip_dir }
-  link_dir("include", verbose:, dry_run:, overwrite:) do |relative_path|
-    case relative_path.to_s
-    when /^postgresql@\d+/
-      :mkpath
-    else
-      :link
-    end
-  end
-
-  link_dir("share", verbose:, dry_run:, overwrite:) do |relative_path|
-    case relative_path.to_s
-    when INFOFILE_RX then :info
-    when "locale/locale.alias",
-         %r{^icons/.*/icon-theme\.cache$}
-      :skip_file
-    when LOCALEDIR_RX,
-         %r{^icons/}, # all icons subfolders should also mkpath
-         /^zsh/,
-         /^fish/,
-         %r{^lua/}, #  Lua, Lua51, Lua53 all need the same handling.
-         %r{^guile/},
-         /^postgresql@\d+/,
-         *SHARE_PATHS
-      :mkpath
-    else
-      :link
-    end
-  end
-
-  link_dir("lib", verbose:, dry_run:, overwrite:) do |relative_path|
-    case relative_path.to_s
-    when "charset.alias"
-      :skip_file
-    when "pkgconfig", # pkg-config database gets explicitly created
-         "cmake",     # cmake database gets explicitly created
-         "dtrace",    # lib/language folders also get explicitly created
-         /^gdk-pixbuf/,
-         "ghc",
-         /^gio/,
-         /^lua/,
-         /^mecab/,
-         /^node/,
-         /^ocaml/,
-         /^perl5/,
-         "php",
-         /^postgresql@\d+/,
-         /^python[23]\.\d+/,
-         /^R/,
-         /^ruby/
-      :mkpath
-    else
-      # Everything else is symlinked to the cellar
-      :link
-    end
-  end
-
-  link_dir("Frameworks", verbose:, dry_run:, overwrite:) do |relative_path|
-    # Frameworks contain symlinks pointing into a subdir, so we have to use
-    # the :link strategy. However, for Foo.framework and
-    # Foo.framework/Versions we have to use :mkpath so that multiple formulae
-    # can link their versions into it and `brew [un]link` works.
-    if relative_path.to_s.match?(%r{[^/]*\.framework(/Versions)?$})
-      :mkpath
-    else
-      :link
-    end
-  end
-  make_relative_symlink(linked_keg_record, path, verbose:, dry_run:, overwrite:) unless dry_run
-rescue LinkError
-  unlink(verbose:)
-  raise
-else
-  ObserverPathnameExtension.n
-end
-
-
- -
-

- - #linked?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-209
-210
-211
-212
-213
-
-
# File 'keg.rb', line 209
-
-def linked?
-  linked_keg_record.symlink? &&
-    linked_keg_record.directory? &&
-    path == linked_keg_record.resolved_path
-end
-
-
- -
-

- - #loader_name_for(file, target) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-
-
# File 'extend/os/mac/keg_relocate.rb', line 99
-
-def loader_name_for(file, target)
-  # Use @loader_path-relative install names for other Homebrew-installed binaries.
-  if ENV["HOMEBREW_RELOCATABLE_INSTALL_NAMES"] && target.start_with?(HOMEBREW_PREFIX)
-    dylib_suffix = find_dylib_suffix_from(target)
-    target_dir = Pathname.new(target.delete_suffix(dylib_suffix)).cleanpath
-
-    "@loader_path/#{target_dir.relative_path_from(file.dirname)/dylib_suffix}"
-  else
-    target
-  end
-end
-
-
- -
-

- - #lockObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-
-
# File 'keg.rb', line 323
-
-def lock
-  FormulaLock.new(name).with_lock do
-    oldname_locks = oldname_opt_records.map do |record|
-      FormulaLock.new(record.basename.to_s)
-    end
-    oldname_locks.each(&:lock)
-    yield
-  ensure
-    oldname_locks&.each(&:unlock)
-  end
-end
-
-
- -
-

- - #mach_o_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-
-
# File 'extend/os/mac/keg_relocate.rb', line 179
-
-def mach_o_files
-  hardlinks = Set.new
-  mach_o_files = []
-  path.find do |pn|
-    next if pn.symlink? || pn.directory?
-    next if !pn.dylib? && !pn.mach_o_bundle? && !pn.mach_o_executable?
-    # if we've already processed a file, ignore its hardlinks (which have the same dev ID and inode)
-    # this prevents relocations from being performed on a binary more than once
-    next unless hardlinks.add? [pn.stat.dev, pn.stat.ino]
-
-    mach_o_files << pn
-  end
-
-  mach_o_files
-end
-
-
- -
-

- - #oldname_opt_recordsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-
-
# File 'keg.rb', line 395
-
-def oldname_opt_records
-  return @oldname_opt_records unless @oldname_opt_records.empty?
-
-  @oldname_opt_records = if (opt_dir = HOMEBREW_PREFIX/"opt").directory?
-    opt_dir.subdirs.select do |dir|
-      dir.symlink? && dir != opt_record && path.parent == dir.resolved_path.parent
-    end
-  else
-    []
-  end
-end
-
-
- -
-

- - #openjdk_dep_name_if_applicableObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-134
-135
-136
-137
-138
-139
-140
-
-
# File 'keg_relocate.rb', line 134
-
-def openjdk_dep_name_if_applicable
-  deps = runtime_dependencies
-  return if deps.blank?
-
-  dep_names = deps.map { |d| d["full_name"] }
-  dep_names.find { |d| d.match? Version.formula_optionally_versioned_regex(:openjdk) }
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-535
-
-
# File 'keg.rb', line 522
-
-def optlink(verbose: false, dry_run: false, overwrite: false)
-  opt_record.delete if opt_record.symlink? || opt_record.exist?
-  make_relative_symlink(opt_record, path, verbose:, dry_run:, overwrite:)
-  aliases.each do |a|
-    alias_opt_record = opt_record.parent/a
-    alias_opt_record.delete if alias_opt_record.symlink? || alias_opt_record.exist?
-    make_relative_symlink(alias_opt_record, path, verbose:, dry_run:, overwrite:)
-  end
-
-  oldname_opt_records.each do |record|
-    record.delete
-    make_relative_symlink(record, path, verbose:, dry_run:, overwrite:)
-  end
-end
-
-
- -
-

- - #optlinked?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-220
-221
-222
-
-
# File 'keg.rb', line 220
-
-def optlinked?
-  opt_record.symlink? && path == opt_record.resolved_path
-end
-
-
- -
-

- - #plist_installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-360
-361
-362
-
-
# File 'keg.rb', line 360
-
-def plist_installed?
-  !Dir["#{path}/*.plist"].empty?
-end
-
-
- -
-

- - #prepare_codesign_writable_files(file) ⇒ Object - - - - - -

- - - - -
-
-
-
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'extend/os/mac/keg.rb', line 76
-
-def prepare_codesign_writable_files(file)
-  result = system_command("codesign", args: [
-    "--display", "--file-list", "-", file
-  ], print_stderr: false)
-  return unless result.success?
-
-  files = result.stdout.lines.map { |f| Pathname(f.chomp) }
-  saved_perms = {}
-  files.each do |f|
-    unless f.writable?
-      saved_perms[f] = f.stat.mode
-      FileUtils.chmod "u+rw", f.to_path
-    end
-  end
-  yield
-ensure
-  saved_perms&.each do |f, p|
-    f.chmod p if p
-  end
-end
-
-
- -
-

- - #prepare_debug_symbolsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-
-
# File 'extend/os/mac/keg.rb', line 99
-
-def prepare_debug_symbols
-  binary_executable_or_library_files.each do |file|
-    odebug "Extracting symbols #{file}"
-
-    result = system_command("dsymutil", args: [file], print_stderr: false)
-    next if result.success?
-
-    # If it fails again, error out
-    ofail <<~EOS
-      Failed to extract symbols from #{file}:
-      #{result.stderr}
-    EOS
-  end
-end
-
-
- -
-

- - #prepare_relocation_to_locationsObject - - - - Also known as: - generic_prepare_relocation_to_locations - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-
-
# File 'extend/os/mac/keg_relocate.rb', line 195
-
-def prepare_relocation_to_locations
-  relocation = generic_prepare_relocation_to_locations
-
-  brewed_perl = runtime_dependencies&.any? { |dep| dep["full_name"] == "perl" && dep["declared_directly"] }
-  perl_path = if brewed_perl || name == "perl"
-    "#{HOMEBREW_PREFIX}/opt/perl/bin/perl"
-  elsif tab.built_on.present?
-    perl_path = "/usr/bin/perl#{tab.built_on["preferred_perl"]}"
-
-    # For `:all` bottles, we could have built this bottle with a Perl we don't have.
-    # Such bottles typically don't have strict version requirements.
-    perl_path = "/usr/bin/perl#{MacOS.preferred_perl_version}" unless File.exist?(perl_path)
-
-    perl_path
-  else
-    "/usr/bin/perl#{MacOS.preferred_perl_version}"
-  end
-  relocation.add_replacement_pair(:perl, PERL_PLACEHOLDER, perl_path)
-
-  if (openjdk = openjdk_dep_name_if_applicable)
-    openjdk_path = HOMEBREW_PREFIX/"opt"/openjdk/"libexec/openjdk.jdk/Contents/Home"
-    relocation.add_replacement_pair(:java, JAVA_PLACEHOLDER, openjdk_path.to_s)
-  end
-
-  relocation
-end
-
-
- -
-

- - #prepare_relocation_to_placeholdersObject - - - - Also known as: - generic_prepare_relocation_to_placeholders - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'keg_relocate.rb', line 88
-
-def prepare_relocation_to_placeholders
-  relocation = Relocation.new
-  relocation.add_replacement_pair(:prefix, HOMEBREW_PREFIX.to_s, PREFIX_PLACEHOLDER, path: true)
-  relocation.add_replacement_pair(:cellar, HOMEBREW_CELLAR.to_s, CELLAR_PLACEHOLDER, path: true)
-  # when HOMEBREW_PREFIX == HOMEBREW_REPOSITORY we should use HOMEBREW_PREFIX for all relocations to avoid
-  # being unable to differentiate between them.
-  if HOMEBREW_PREFIX != HOMEBREW_REPOSITORY
-    relocation.add_replacement_pair(:repository, HOMEBREW_REPOSITORY.to_s, REPOSITORY_PLACEHOLDER, path: true)
-  end
-  relocation.add_replacement_pair(:library, HOMEBREW_LIBRARY.to_s, LIBRARY_PLACEHOLDER, path: true)
-  relocation.add_replacement_pair(:perl,
-                                  %r{\A#!(?:/usr/bin/perl\d\.\d+|#{HOMEBREW_PREFIX}/opt/perl/bin/perl)( |$)}o,
-                                  "#!#{PERL_PLACEHOLDER}\\1")
-  relocation.add_replacement_pair(:java, JAVA_REGEX, JAVA_PLACEHOLDER)
-
-  relocation
-end
-
-
- -
-

- - #rackObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-173
-174
-175
-
-
# File 'keg.rb', line 173
-
-def rack
-  path.parent
-end
-
-
- -
-

- - #recursive_fgrep_argsObject - - - - Also known as: - generic_recursive_fgrep_args - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-222
-223
-224
-225
-226
-
-
# File 'extend/os/mac/keg_relocate.rb', line 222
-
-def recursive_fgrep_args
-  # Don't recurse into symlinks; the man page says this is the default, but
-  # it's wrong. -O is a BSD-grep-only option.
-  "-lrO"
-end
-
-
- -
-

- - #relocate_build_prefix(keg, old_prefix, new_prefix) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-
-
# File 'keg_relocate.rb', line 166
-
-def relocate_build_prefix(keg, old_prefix, new_prefix)
-  each_unique_file_matching(old_prefix) do |file|
-    # Skip files which are not binary, as they do not need null padding.
-    next unless keg.binary_file?(file)
-
-    # Skip sharballs, which appear to break if patched.
-    next if file.text_executable?
-
-    # Split binary by null characters into array and substitute new prefix for old prefix.
-    # Null padding is added if the new string is too short.
-    file.ensure_writable do
-      binary = File.binread file
-      odebug "Replacing build prefix in: #{file}"
-      binary_strings = binary.split(/#{NULL_BYTE}/o, -1)
-      match_indices = binary_strings.each_index.select { |i| binary_strings.fetch(i).include?(old_prefix) }
-
-      # Only perform substitution on strings which match prefix regex.
-      match_indices.each do |i|
-        s = binary_strings.fetch(i)
-        binary_strings[i] = s.gsub(old_prefix, new_prefix)
-                             .ljust(s.size, NULL_BYTE)
-      end
-
-      # Rejoin strings by null bytes.
-      patched_binary = binary_strings.join(NULL_BYTE)
-      if patched_binary.size != binary.size
-        raise <<~EOS
-          Patching failed!  Original and patched binary sizes do not match.
-          Original size: #{binary.size}
-          Patched size: #{patched_binary.size}
-        EOS
-      end
-
-      file.atomic_write patched_binary
-    end
-    codesign_patched_binary(file)
-  end
-end
-
-
- -
-

- - #relocate_dynamic_linkage(_relocation) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-
-
# File 'extend/os/mac/keg_relocate.rb', line 21
-
-def relocate_dynamic_linkage(relocation)
-  mach_o_files.each do |file|
-    file.ensure_writable do
-      modified = T.let(false, T::Boolean)
-      needs_codesigning = T.let(false, T::Boolean)
-
-      if file.dylib?
-        id = relocated_name_for(file.dylib_id, relocation)
-        modified = change_dylib_id(id, file)
-        needs_codesigning ||= modified
-      end
-
-      each_linkage_for(file, :dynamically_linked_libraries) do |old_name|
-        new_name = relocated_name_for(old_name, relocation)
-        modified = change_install_name(old_name, new_name, file) if new_name
-        needs_codesigning ||= modified
-      end
-
-      each_linkage_for(file, :rpaths) do |old_name|
-        new_name = relocated_name_for(old_name, relocation)
-        modified = change_rpath(old_name, new_name, file) if new_name
-        needs_codesigning ||= modified
-      end
-
-      # codesign the file if needed
-      codesign_patched_binary(file) if needs_codesigning
-    end
-  end
-end
-
-
- -
-

- - #relocated_name_for(old_name, relocation) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-
-
# File 'extend/os/mac/keg_relocate.rb', line 149
-
-def relocated_name_for(old_name, relocation)
-  old_prefix, new_prefix = relocation.replacement_pair_for(:prefix)
-  old_cellar, new_cellar = relocation.replacement_pair_for(:cellar)
-
-  if old_name.start_with? old_cellar
-    old_name.sub(old_cellar, new_cellar)
-  elsif old_name.start_with? old_prefix
-    old_name.sub(old_prefix, new_prefix)
-  end
-end
-
-
- -
-

- - #remove_linked_keg_recordObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-215
-216
-217
-218
-
-
# File 'keg.rb', line 215
-
-def remove_linked_keg_record
-  linked_keg_record.unlink
-  linked_keg_record.parent.rmdir_if_possible
-end
-
-
- -
-

- - #remove_old_aliasesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-
-
# File 'keg.rb', line 224
-
-def remove_old_aliases
-  opt = opt_record.parent
-  linkedkegs = linked_keg_record.parent
-
-  tap = begin
-    to_formula.tap
-  rescue
-    # If the formula can't be found, just ignore aliases for now.
-    nil
-  end
-
-  if tap
-    bad_tap_opt = opt/tap.user
-    FileUtils.rm_rf bad_tap_opt if !bad_tap_opt.symlink? && bad_tap_opt.directory?
-  end
-
-  aliases.each do |a|
-    # versioned aliases are handled below
-    next if a.match?(/.+@./)
-
-    remove_alias_symlink(opt/a, opt_record)
-    remove_alias_symlink(linkedkegs/a, linked_keg_record)
-  end
-
-  Pathname.glob("#{opt_record}@*").each do |a|
-    a = a.basename.to_s
-    next if aliases.include?(a)
-
-    remove_alias_symlink(opt/a, rack)
-    remove_alias_symlink(linkedkegs/a, rack)
-  end
-end
-
-
- -
-

- - #remove_oldname_opt_recordsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-498
-499
-500
-501
-502
-503
-504
-505
-506
-
-
# File 'keg.rb', line 498
-
-def remove_oldname_opt_records
-  oldname_opt_records.reject! do |record|
-    return false if record.resolved_path != path
-
-    record.unlink
-    record.parent.rmdir_if_possible
-    true
-  end
-end
-
-
- -
-

- - #remove_opt_recordObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-257
-258
-259
-260
-
-
# File 'keg.rb', line 257
-
-def remove_opt_record
-  opt_record.unlink
-  opt_record.parent.rmdir_if_possible
-end
-
-
- -
-

- - #replace_locations_with_placeholdersObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-107
-108
-109
-110
-111
-
-
# File 'keg_relocate.rb', line 107
-
-def replace_locations_with_placeholders
-  relocation = prepare_relocation_to_placeholders.freeze
-  relocate_dynamic_linkage(relocation)
-  replace_text_in_files(relocation)
-end
-
-
- -
-

- - #replace_placeholders_with_locations(files, skip_linkage: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-128
-129
-130
-131
-132
-
-
# File 'keg_relocate.rb', line 128
-
-def replace_placeholders_with_locations(files, skip_linkage: false)
-  relocation = prepare_relocation_to_locations.freeze
-  relocate_dynamic_linkage(relocation) unless skip_linkage
-  replace_text_in_files(relocation, files:)
-end
-
-
- -
-

- - #replace_text_in_files(relocation, files: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-
-
# File 'keg_relocate.rb', line 142
-
-def replace_text_in_files(relocation, files: nil)
-  files ||= text_files | libtool_files
-
-  changed_files = T.let([], Array)
-  files.map { path.join(_1) }.group_by { |f| f.stat.ino }.each_value do |first, *rest|
-    s = first.open("rb", &:read)
-
-    next unless relocation.replace_text(s)
-
-    changed_files += [first, *rest].map { |file| file.relative_path_from(path) }
-
-    begin
-      first.atomic_write(s)
-    rescue SystemCallError
-      first.ensure_writable do
-        first.open("wb") { |f| f.write(s) }
-      end
-    else
-      rest.each { |file| FileUtils.ln(first, file, force: true) }
-    end
-  end
-  changed_files
-end
-
-
- -
-

- - #require_relocation?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-205
-206
-207
-
-
# File 'keg.rb', line 205
-
-def require_relocation?
-  @require_relocation
-end
-
-
- -
-

- - #runtime_dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-513
-514
-515
-516
-
-
# File 'keg.rb', line 513
-
-def runtime_dependencies
-  Keg.cache[:runtime_dependencies] ||= {}
-  Keg.cache[:runtime_dependencies][path] ||= tab.runtime_dependencies
-end
-
-
- -
-

- - #scheme_and_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

For ordering kegs by version with .sort_by, .max_by, etc.

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-387
-388
-389
-
-
# File 'keg.rb', line 387
-
-def scheme_and_version
-  [version_scheme, version]
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-316
-317
-318
-319
-320
-321
-322
-323
-
-
# File 'keg_relocate.rb', line 316
-
-def symlink_files
-  symlink_files = []
-  path.find do |pn|
-    symlink_files << pn if pn.symlink?
-  end
-
-  symlink_files
-end
-
-
- -
-

- - #tabTab - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Tab) - - - -
  • - -
- -
- - - - -
-
-
-
-509
-510
-511
-
-
# File 'keg.rb', line 509
-
-def tab
-  Tab.for_keg(self)
-end
-
-
- -
-

- - #text_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-
-
# File 'keg_relocate.rb', line 260
-
-def text_files
-  text_files = []
-  return text_files if !which("file") || !which("xargs")
-
-  # file has known issues with reading files on other locales. Has
-  # been fixed upstream for some time, but a sufficiently new enough
-  # file with that fix is only available in macOS Sierra.
-  # https://bugs.gw.com/view.php?id=292
-  with_custom_locale("C") do
-    files = Set.new path.find.reject { |pn|
-      next true if pn.symlink?
-      next true if pn.directory?
-      next false if pn.basename.to_s == "orig-prefix.txt" # for python virtualenvs
-      next true if pn == self/".brew/#{name}.rb"
-      next true if Metafiles::EXTENSIONS.include?(pn.extname)
-
-      if pn.text_executable?
-        text_files << pn
-        next true
-      end
-      false
-    }
-    output, _status = Open3.capture2("xargs -0 file --no-dereference --print0",
-                                     stdin_data: files.to_a.join("\0"))
-    # `file` output sometimes contains data from the file, which may include
-    # invalid UTF-8 entities, so tell Ruby this is just a bytestring
-    output.force_encoding(Encoding::ASCII_8BIT)
-    output.each_line do |line|
-      path, info = line.split("\0", 2)
-      # `file` sometimes prints more than one line of output per file;
-      # subsequent lines do not contain a null-byte separator, so `info`
-      # will be `nil` for those lines
-      next unless info
-      next unless info.include?("text")
-
-      path = Pathname.new(path)
-      next unless files.include?(path)
-
-      text_files << path
-    end
-  end
-
-  text_files
-end
-
-
- -
-

- - #to_formulaObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-391
-392
-393
-
-
# File 'keg.rb', line 391
-
-def to_formula
-  Formulary.from_keg(self)
-end
-
-
- -
-

- - #uninstall(raise_failures: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-
-
# File 'keg.rb', line 262
-
-def uninstall(raise_failures: false)
-  CacheStoreDatabase.use(:linkage) do |db|
-    break unless db.created?
-
-    LinkageCacheStore.new(path, db).delete!
-  end
-
-  path.rmtree
-  path.parent.rmdir_if_possible
-  remove_opt_record if optlinked?
-  remove_linked_keg_record if linked?
-  remove_old_aliases
-  remove_oldname_opt_records
-rescue Errno::EACCES, Errno::ENOTEMPTY
-  raise if raise_failures
-
-  odie <<~EOS
-    Could not remove #{name} keg! Do so manually:
-      sudo rm -rf #{path}
-  EOS
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-
-
# File 'keg.rb', line 284
-
-def unlink(verbose: false, dry_run: false)
-  ObserverPathnameExtension.reset_counts!
-
-  dirs = []
-
-  keg_directories = KEG_LINK_DIRECTORIES.map { |d| path/d }
-                                        .select(&:exist?)
-  keg_directories.each do |dir|
-    dir.find do |src|
-      dst = HOMEBREW_PREFIX + src.relative_path_from(path)
-      dst.extend(ObserverPathnameExtension)
-
-      dirs << dst if dst.directory? && !dst.symlink?
-
-      # check whether the file to be unlinked is from the current keg first
-      next unless dst.symlink?
-      next if src != dst.resolved_path
-
-      if dry_run
-        puts dst
-        Find.prune if src.directory?
-        next
-      end
-
-      dst.uninstall_info if dst.to_s.match?(INFOFILE_RX)
-      dst.unlink
-      Find.prune if src.directory?
-    end
-  end
-
-  unless dry_run
-    remove_old_aliases
-    remove_linked_keg_record if linked?
-    dirs.reverse_each(&:rmdir_if_possible)
-  end
-
-  ObserverPathnameExtension.n
-end
-
-
- -
-

- - #versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-376
-377
-378
-379
-
-
# File 'keg.rb', line 376
-
-def version
-  require "pkg_version"
-  PkgVersion.parse(path.basename.to_s)
-end
-
-
- -
-

- - #version_schemeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-381
-382
-383
-
-
# File 'keg.rb', line 381
-
-def version_scheme
-  @version_scheme ||= tab.version_scheme
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Keg/AlreadyLinkedError.html b/docs/Keg/AlreadyLinkedError.html deleted file mode 100644 index 263b7c227..000000000 --- a/docs/Keg/AlreadyLinkedError.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - Exception: Keg::AlreadyLinkedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Keg::AlreadyLinkedError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
keg.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error for when a keg is already linked.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(keg) ⇒ AlreadyLinkedError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of AlreadyLinkedError.

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-
-
# File 'keg.rb', line 15
-
-def initialize(keg)
-  super <<~EOS
-    Cannot link #{keg.name}
-    Another version is already linked: #{keg.linked_keg_record.resolved_path}
-  EOS
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Keg/ConflictError.html b/docs/Keg/ConflictError.html deleted file mode 100644 index a61dc926f..000000000 --- a/docs/Keg/ConflictError.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - Exception: Keg::ConflictError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Keg::ConflictError - - - Private -

-
- -
-
Inherits:
-
- LinkError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
keg.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error for when a file already exists or belongs to another keg.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from LinkError

-

#dst, #keg, #src

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from LinkError

-

#initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Keg::LinkError

- -
- - -
-

Instance Method Details

- - -
-

- - #suggestionString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-
-
# File 'keg.rb', line 40
-
-def suggestion
-  conflict = Keg.for(dst)
-rescue NotAKegError, Errno::ENOENT
-  "already exists. You may want to remove it:\n  rm '#{dst}'\n"
-else
-  <<~EOS
-    is a symlink belonging to #{conflict.name}. You can unlink it:
-      brew unlink #{conflict.name}
-  EOS
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Keg/DirectoryNotWritableError.html b/docs/Keg/DirectoryNotWritableError.html deleted file mode 100644 index 0780ac3be..000000000 --- a/docs/Keg/DirectoryNotWritableError.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - Exception: Keg::DirectoryNotWritableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Keg::DirectoryNotWritableError - - - Private -

-
- -
-
Inherits:
-
- LinkError - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
keg.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error for when a directory is not writable.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from LinkError

-

#dst, #keg, #src

- - - - - - - - - -

Method Summary

- -

Methods inherited from LinkError

-

#initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Keg::LinkError

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Keg/LinkError.html b/docs/Keg/LinkError.html deleted file mode 100644 index ac119def3..000000000 --- a/docs/Keg/LinkError.html +++ /dev/null @@ -1,461 +0,0 @@ - - - - - - - Exception: Keg::LinkError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Keg::LinkError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
keg.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error for when a keg cannot be linked.

- - -
-
-
- - -
-

Direct Known Subclasses

-

ConflictError, DirectoryNotWritableError

-
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #dst ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #keg ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #src ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(keg, src, dst, cause) ⇒ LinkError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of LinkError.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'keg.rb', line 27
-
-def initialize(keg, src, dst, cause)
-  @src = src
-  @dst = dst
-  @keg = keg
-  @cause = cause
-  super(cause.message)
-  set_backtrace(cause.backtrace)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #dstObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'keg.rb', line 25
-
-def dst
-  @dst
-end
-
-
- - - -
-

- - #kegObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'keg.rb', line 25
-
-def keg
-  @keg
-end
-
-
- - - -
-

- - #srcObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'keg.rb', line 25
-
-def src
-  @src
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Keg/Relocation.html b/docs/Keg/Relocation.html deleted file mode 100644 index fb33dc7ba..000000000 --- a/docs/Keg/Relocation.html +++ /dev/null @@ -1,765 +0,0 @@ - - - - - - - Class: Keg::Relocation - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Keg::Relocation - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
keg_relocate.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
RELOCATABLE_PATH_REGEX_PREFIX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/(?:(?<=-F|-I|-L|-isystem)|(?<![a-zA-Z0-9]))/
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initializeRelocation - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Relocation.

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'keg_relocate.rb', line 17
-
-def initialize
-  @replacement_map = {}
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .path_to_regex(path) ⇒ Regexp - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Regexp) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Regexp) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-60
-61
-62
-
-
# File 'keg_relocate.rb', line 54
-
-def self.path_to_regex(path)
-  path = case path
-  when String
-    Regexp.escape(path)
-  when Regexp
-    path.source
-  end
-  Regexp.new(RELOCATABLE_PATH_REGEX_PREFIX.source + path)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #add_replacement_pair(key, old_value, new_value, path: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - key - - - (Symbol) - - - -
  • - -
  • - - old_value - - - (String, Regexp) - - - -
  • - -
  • - - new_value - - - (String) - - - -
  • - -
  • - - path - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-27
-28
-29
-30
-
-
# File 'keg_relocate.rb', line 27
-
-def add_replacement_pair(key, old_value, new_value, path: false)
-  old_value = self.class.path_to_regex(old_value) if path
-  @replacement_map[key] = [old_value, new_value]
-end
-
-
- -
-

- - #freezeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-24
-
-
# File 'keg_relocate.rb', line 21
-
-def freeze
-  @replacement_map.freeze
-  super
-end
-
-
- -
-

- - #replace_text(text) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - text - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'keg_relocate.rb', line 38
-
-def replace_text(text)
-  replacements = @replacement_map.values.to_h
-
-  sorted_keys = replacements.keys.sort_by do |key|
-    key.is_a?(String) ? key.length : 999
-  end.reverse
-
-  any_changed = T.let(nil, T.nilable(String))
-  sorted_keys.each do |key|
-    changed = text.gsub!(key, replacements[key])
-    any_changed ||= changed
-  end
-  !any_changed.nil?
-end
-
-
- -
-

- - #replacement_pair_for(key) ⇒ Array<String, Regexp> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (Symbol) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'keg_relocate.rb', line 33
-
-def replacement_pair_for(key)
-  @replacement_map.fetch(key)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/KegOnlyReason.html b/docs/KegOnlyReason.html deleted file mode 100644 index bff458571..000000000 --- a/docs/KegOnlyReason.html +++ /dev/null @@ -1,784 +0,0 @@ - - - - - - - Class: KegOnlyReason - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: KegOnlyReason - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/mac/formula_support.rb,
- formula_support.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Used to annotate formulae that duplicate macOS-provided software -or cause conflicts when linked in.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(reason, explanation) ⇒ KegOnlyReason - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of KegOnlyReason.

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-
-
# File 'formula_support.rb', line 12
-
-def initialize(reason, explanation)
-  @reason = reason
-  @explanation = explanation
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #reasonObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'formula_support.rb', line 10
-
-def reason
-  @reason
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #applicable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'extend/os/mac/formula_support.rb', line 6
-
-def applicable?
-  true
-end
-
-
- -
-

- - #by_macos?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'formula_support.rb', line 29
-
-def by_macos?
-  provided_by_macos? || shadowed_by_macos?
-end
-
-
- -
-

- - #provided_by_macos?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'formula_support.rb', line 21
-
-def provided_by_macos?
-  @reason == :provided_by_macos
-end
-
-
- -
-

- - #shadowed_by_macos?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'formula_support.rb', line 25
-
-def shadowed_by_macos?
-  @reason == :shadowed_by_macos
-end
-
-
- -
-

- - #to_hashObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'formula_support.rb', line 63
-
-def to_hash
-  reason_string = if @reason.is_a?(Symbol)
-    @reason.inspect
-  else
-    @reason.to_s
-  end
-
-  {
-    "reason"      => reason_string,
-    "explanation" => @explanation,
-  }
-end
-
-
- -
-

- - #versioned_formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'formula_support.rb', line 17
-
-def versioned_formula?
-  @reason == :versioned_formula
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/KegUnspecifiedError.html b/docs/KegUnspecifiedError.html deleted file mode 100644 index 933c530dc..000000000 --- a/docs/KegUnspecifiedError.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - Exception: KegUnspecifiedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: KegUnspecifiedError - - - Private -

-
- -
-
Inherits:
-
- UsageError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a command expects a keg and none was specified.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from UsageError

-

#reason

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initializeKegUnspecifiedError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of KegUnspecifiedError.

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'exceptions.rb', line 43
-
-def initialize
-  super "this command requires a keg argument"
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Kernel.html b/docs/Kernel.html deleted file mode 100644 index 0525fab51..000000000 --- a/docs/Kernel.html +++ /dev/null @@ -1,3368 +0,0 @@ - - - - - - - Module: Kernel - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Kernel - - - Private -

- - -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- -
- TODO: -

move these out of Kernel.

-
-
- -

Contains shorthand Homebrew utility methods like ohai, opoo, odisabled.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #disk_usage_readable(size_in_bytes) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-
-
# File 'extend/kernel.rb', line 442
-
-def disk_usage_readable(size_in_bytes)
-  if size_in_bytes >= 1_073_741_824
-    size = size_in_bytes.to_f / 1_073_741_824
-    unit = "GB"
-  elsif size_in_bytes >= 1_048_576
-    size = size_in_bytes.to_f / 1_048_576
-    unit = "MB"
-  elsif size_in_bytes >= 1_024
-    size = size_in_bytes.to_f / 1_024
-    unit = "KB"
-  else
-    size = size_in_bytes
-    unit = "B"
-  end
-
-  # avoid trailing zero after decimal point
-  if ((size * 10).to_i % 10).zero?
-    "#{size.to_i}#{unit}"
-  else
-    "#{format("%<size>.1f", size:)}#{unit}"
-  end
-end
-
-
- -
-

- - #ensure_executable!(name, formula_name = nil, reason: "") ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Ensure the given executable is exist otherwise install the brewed version

- - -
-
-
- - -
- - - - -
-
-
-
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-
-
# File 'extend/kernel.rb', line 422
-
-def ensure_executable!(name, formula_name = nil, reason: "")
-  formula_name ||= name
-
-  executable = [
-    which(name),
-    which(name, ORIGINAL_PATHS),
-    # We prefer the opt_bin path to a formula's executable over the prefix
-    # path where available, since the former is stable during upgrades.
-    HOMEBREW_PREFIX/"opt/#{formula_name}/bin/#{name}",
-    HOMEBREW_PREFIX/"bin/#{name}",
-  ].compact.first
-  return executable if executable.exist?
-
-  ensure_formula_installed!(formula_name, reason:).opt_bin/name
-end
-
-
- -
-

- - #ensure_formula_installed!(formula_or_name, reason: "", latest: false, output_to_stderr: true, quiet: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Ensure the given formula is installed -This is useful for installing a utility formula (e.g. shellcheck for brew style)

- - -
-
-
- - -
- - - - -
-
-
-
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-
-
# File 'extend/kernel.rb', line 383
-
-def ensure_formula_installed!(formula_or_name, reason: "", latest: false,
-                              output_to_stderr: true, quiet: false)
-  if output_to_stderr || quiet
-    file = if quiet
-      File::NULL
-    else
-      $stderr
-    end
-    # Call this method itself with redirected stdout
-    redirect_stdout(file) do
-      return ensure_formula_installed!(formula_or_name, latest:,
-                                       reason:, output_to_stderr: false)
-    end
-  end
-
-  require "formula"
-
-  formula = if formula_or_name.is_a?(Formula)
-    formula_or_name
-  else
-    Formula[formula_or_name]
-  end
-
-  reason = " for #{reason}" if reason.present?
-
-  unless formula.any_version_installed?
-    ohai "Installing `#{formula.name}`#{reason}..."
-    safe_system HOMEBREW_BREW_FILE, "install", "--formula", formula.full_name
-  end
-
-  if latest && !formula.latest_version_installed?
-    ohai "Upgrading `#{formula.name}`#{reason}..."
-    safe_system HOMEBREW_BREW_FILE, "upgrade", "--formula", formula.full_name
-  end
-
-  formula
-end
-
-
- -
-

- - #exec_browser(*args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-
-
# File 'extend/kernel.rb', line 334
-
-def exec_browser(*args)
-  browser = Homebrew::EnvConfig.browser
-  browser ||= OS::PATH_OPEN if defined?(OS::PATH_OPEN)
-  return unless browser
-
-  ENV["DISPLAY"] = Homebrew::EnvConfig.display
-
-  with_env(DBUS_SESSION_BUS_ADDRESS: ENV.fetch("HOMEBREW_DBUS_SESSION_BUS_ADDRESS", nil)) do
-    safe_system(browser, *args)
-  end
-end
-
-
- -
-

- - #exec_editor(*args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-329
-330
-331
-332
-
-
# File 'extend/kernel.rb', line 329
-
-def exec_editor(*args)
-  puts "Editing #{args.join "\n"}"
-  with_homebrew_path { safe_system(*which_editor.shellsplit, *args) }
-end
-
-
- -
-

- - #ignore_interrupts(_opt = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-
-
# File 'extend/kernel.rb', line 346
-
-def ignore_interrupts(_opt = nil)
-  # rubocop:disable Style/GlobalVars
-  $ignore_interrupts_nesting_level = 0 unless defined?($ignore_interrupts_nesting_level)
-  $ignore_interrupts_nesting_level += 1
-
-  $ignore_interrupts_interrupted = false unless defined?($ignore_interrupts_interrupted)
-  old_sigint_handler = trap(:INT) do
-    $ignore_interrupts_interrupted = true
-    $stderr.print "\n"
-    $stderr.puts "One sec, cleaning up..."
-  end
-
-  begin
-    yield
-  ensure
-    trap(:INT, old_sigint_handler)
-
-    $ignore_interrupts_nesting_level -= 1
-    if $ignore_interrupts_nesting_level == 0 && $ignore_interrupts_interrupted
-      $ignore_interrupts_interrupted = false
-      raise Interrupt
-    end
-  end
-  # rubocop:enable Style/GlobalVars
-end
-
-
- -
-

- - #interactive_shell(formula = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-
-
# File 'extend/kernel.rb', line 232
-
-def interactive_shell(formula = nil)
-  unless formula.nil?
-    ENV["HOMEBREW_DEBUG_PREFIX"] = formula.prefix
-    ENV["HOMEBREW_DEBUG_INSTALL"] = formula.full_name
-  end
-
-  if Utils::Shell.preferred == :zsh && (home = Dir.home).start_with?(HOMEBREW_TEMP.resolved_path.to_s)
-    FileUtils.mkdir_p home
-    FileUtils.touch "#{home}/.zshrc"
-  end
-
-  Process.wait fork { exec Utils::Shell.preferred_path(default: "/bin/bash") }
-
-  return if $CHILD_STATUS.success?
-  raise "Aborted due to non-zero exit status (#{$CHILD_STATUS.exitstatus})" if $CHILD_STATUS.exited?
-
-  raise $CHILD_STATUS.inspect
-end
-
-
- -
-

- - #number_readable(number) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-465
-466
-467
-468
-469
-
-
# File 'extend/kernel.rb', line 465
-
-def number_readable(number)
-  numstr = number.to_i.to_s
-  (numstr.size - 3).step(1, -3) { |i| numstr.insert(i, ",") }
-  numstr
-end
-
-
- -
-

- - #odebug(title, *sput, always_display: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'extend/kernel.rb', line 33
-
-def odebug(title, *sput, always_display: false)
-  debug = if respond_to?(:debug)
-    T.unsafe(self).debug?
-  else
-    Context.current.debug?
-  end
-
-  return if !debug && !always_display
-
-  $stderr.puts Formatter.headline(title, color: :magenta)
-  $stderr.puts sput unless sput.empty?
-end
-
-
- -
-

- - #odeprecated(method, replacement = nil, disable: false, disable_on: nil, disable_for_developers: true, caller: send(:caller)) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Output a deprecation warning/error message.

- - -
-
-
- - -
- - - - -
-
-
-
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-
-
# File 'extend/kernel.rb', line 102
-
-def odeprecated(method, replacement = nil,
-                disable:                false,
-                disable_on:             nil,
-                disable_for_developers: true,
-                caller:                 send(:caller))
-  replacement_message = if replacement
-    "Use #{replacement} instead."
-  else
-    "There is no replacement."
-  end
-
-  unless disable_on.nil?
-    if disable_on > Time.now
-      will_be_disabled_message = " and will be disabled on #{disable_on.strftime("%Y-%m-%d")}"
-    else
-      disable = true
-    end
-  end
-
-  verb = if disable
-    "disabled"
-  else
-    "deprecated#{will_be_disabled_message}"
-  end
-
-  # Try to show the most relevant location in message, i.e. (if applicable):
-  # - Location in a formula.
-  # - Location of caller of deprecated method (if all else fails).
-  backtrace = caller
-
-  # Don't throw deprecations at all for cached, .brew or .metadata files.
-  return if backtrace.any? do |line|
-    next true if line.include?(HOMEBREW_CACHE.to_s)
-    next true if line.include?("/.brew/")
-    next true if line.include?("/.metadata/")
-
-    next false unless line.match?(HOMEBREW_TAP_PATH_REGEX)
-
-    path = Pathname(line.split(":", 2).first)
-    next false unless path.file?
-    next false unless path.readable?
-
-    formula_contents = path.read
-    formula_contents.include?(" deprecate! ") || formula_contents.include?(" disable! ")
-  end
-
-  tap_message = T.let(nil, T.nilable(String))
-
-  backtrace.each do |line|
-    next unless (match = line.match(HOMEBREW_TAP_PATH_REGEX))
-
-    tap = Tap.fetch(match[:user], match[:repo])
-    tap_message = +"\nPlease report this issue to the #{tap.full_name} tap"
-    tap_message += " (not Homebrew/brew or Homebrew/homebrew-core)" unless tap.official?
-    tap_message += ", or even better, submit a PR to fix it" if replacement
-    tap_message << ":\n  #{line.sub(/^(.*:\d+):.*$/, '\1')}\n\n"
-    break
-  end
-  file, line, = backtrace.first.split(":")
-  line = line.to_i if line.present?
-
-  message = +"Calling #{method} is #{verb}! #{replacement_message}"
-  message << tap_message if tap_message
-  message.freeze
-
-  disable = true if disable_for_developers && Homebrew::EnvConfig.developer?
-  if disable || Homebrew.raise_deprecation_exceptions?
-    GitHub::Actions.puts_annotation_if_env_set(:error, message, file:, line:)
-    exception = MethodDeprecatedError.new(message)
-    exception.set_backtrace(backtrace)
-    raise exception
-  elsif !Homebrew.auditing?
-    GitHub::Actions.puts_annotation_if_env_set(:warning, message, file:, line:)
-    opoo message
-  end
-end
-
-
- -
-

- - #odie(error) ⇒ T.noreturn - - - - - -

-
-

Print an error message and fail immediately.

- - -
-
-
-

Parameters:

-
    - -
  • - - error - - - (String, Exception) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.noreturn) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-97
-98
-99
-
-
# File 'extend/kernel.rb', line 96
-
-def odie(error)
-  onoe error
-  exit 1
-end
-
-
- -
-

- - #odisabled(method, replacement = nil, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-179
-180
-181
-182
-183
-
-
# File 'extend/kernel.rb', line 179
-
-def odisabled(method, replacement = nil, **options)
-  options = { disable: true, caller: }.merge(options)
-  # This odeprecated should stick around indefinitely.
-  odeprecated(method, replacement, **options)
-end
-
-
- -
-

- - #ofail(error) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Print an error message and fail at the end of the program.

- - -
-
-
-

Parameters:

-
    - -
  • - - error - - - (String, Exception) - - - -
  • - -
- - -
- - - - -
-
-
-
-87
-88
-89
-90
-
-
# File 'extend/kernel.rb', line 87
-
-def ofail(error)
-  onoe error
-  Homebrew.failed = true
-end
-
-
- -
-

- - #oh1(title, truncate: :auto) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-57
-58
-59
-
-
# File 'extend/kernel.rb', line 57
-
-def oh1(title, truncate: :auto)
-  puts oh1_title(title, truncate:)
-end
-
-
- -
-

- - #oh1_title(title, truncate: :auto) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'extend/kernel.rb', line 46
-
-def oh1_title(title, truncate: :auto)
-  verbose = if respond_to?(:verbose?)
-    T.unsafe(self).verbose?
-  else
-    Context.current.verbose?
-  end
-
-  title = Tty.truncate(title.to_s) if $stdout.tty? && !verbose && truncate == :auto
-  Formatter.headline(title, color: :green)
-end
-
-
- -
-

- - #ohai(title, *sput) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-
-
# File 'extend/kernel.rb', line 28
-
-def ohai(title, *sput)
-  puts ohai_title(title)
-  puts sput
-end
-
-
- -
-

- - #ohai_title(title) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'extend/kernel.rb', line 17
-
-def ohai_title(title)
-  verbose = if respond_to?(:verbose?)
-    T.unsafe(self).verbose?
-  else
-    Context.current.verbose?
-  end
-
-  title = Tty.truncate(title.to_s) if $stdout.tty? && !verbose
-  Formatter.headline(title, color: :blue)
-end
-
-
- -
-

- - #onoe(message) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Print an error message.

- - -
-
-
-

Parameters:

-
    - -
  • - - message - - - (String, Exception) - - - -
  • - -
- - -
- - - - -
-
-
-
-76
-77
-78
-79
-80
-81
-
-
# File 'extend/kernel.rb', line 76
-
-def onoe(message)
-  Tty.with($stderr) do |stderr|
-    stderr.puts Formatter.error(message, label: "Error")
-    GitHub::Actions.puts_annotation_if_env_set(:error, message.to_s)
-  end
-end
-
-
- -
-

- - #opoo(message) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Print a warning message.

- - -
-
-
-

Parameters:

-
    - -
  • - - message - - - (String, Exception) - - - -
  • - -
- - -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-
-
# File 'extend/kernel.rb', line 65
-
-def opoo(message)
-  Tty.with($stderr) do |stderr|
-    stderr.puts Formatter.warning(message, label: "Warning")
-    GitHub::Actions.puts_annotation_if_env_set(:warning, message.to_s)
-  end
-end
-
-
- -
-

- - #pathsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-438
-439
-440
-
-
# File 'extend/kernel.rb', line 438
-
-def paths
-  @paths ||= ORIGINAL_PATHS.uniq.map(&:to_s)
-end
-
-
- -
-

- - #pretty_duration(seconds) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-
-
# File 'extend/kernel.rb', line 215
-
-def pretty_duration(seconds)
-  seconds = seconds.to_i
-  res = +""
-
-  if seconds > 59
-    minutes = seconds / 60
-    seconds %= 60
-    res = +Utils.pluralize("minute", minutes, include_count: true)
-    return res.freeze if seconds.zero?
-
-    res << " "
-  end
-
-  res << Utils.pluralize("second", seconds, include_count: true)
-  res.freeze
-end
-
-
- -
-

- - #pretty_installed(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-185
-186
-187
-188
-189
-190
-191
-192
-193
-
-
# File 'extend/kernel.rb', line 185
-
-def pretty_installed(formula)
-  if !$stdout.tty?
-    formula.to_s
-  elsif Homebrew::EnvConfig.no_emoji?
-    Formatter.success("#{Tty.bold}#{formula} (installed)#{Tty.reset}")
-  else
-    "#{Tty.bold}#{formula} #{Formatter.success("")}#{Tty.reset}"
-  end
-end
-
-
- -
-

- - #pretty_outdated(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-195
-196
-197
-198
-199
-200
-201
-202
-203
-
-
# File 'extend/kernel.rb', line 195
-
-def pretty_outdated(formula)
-  if !$stdout.tty?
-    formula.to_s
-  elsif Homebrew::EnvConfig.no_emoji?
-    Formatter.error("#{Tty.bold}#{formula} (outdated)#{Tty.reset}")
-  else
-    "#{Tty.bold}#{formula} #{Formatter.warning("")}#{Tty.reset}"
-  end
-end
-
-
- -
-

- - #pretty_uninstalled(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-205
-206
-207
-208
-209
-210
-211
-212
-213
-
-
# File 'extend/kernel.rb', line 205
-
-def pretty_uninstalled(formula)
-  if !$stdout.tty?
-    formula.to_s
-  elsif Homebrew::EnvConfig.no_emoji?
-    Formatter.error("#{Tty.bold}#{formula} (uninstalled)#{Tty.reset}")
-  else
-    "#{Tty.bold}#{formula} #{Formatter.error("")}#{Tty.reset}"
-  end
-end
-
-
- -
-

- - #quiet_system(cmd, *args) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Run a system command without any output.

- - -
-
-
- - -
- - - - -
-
-
-
-269
-270
-271
-272
-273
-274
-275
-276
-
-
# File 'extend/kernel.rb', line 269
-
-def quiet_system(cmd, *args)
-  Homebrew._system(cmd, *args) do
-    # Redirect output streams to `/dev/null` instead of closing as some programs
-    # will fail to execute if they can't write to an open stream.
-    $stdout.reopen("/dev/null")
-    $stderr.reopen("/dev/null")
-  end
-end
-
-
- -
-

- - #redact_secrets(input, secrets) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-546
-547
-548
-549
-550
-
-
# File 'extend/kernel.rb', line 546
-
-def redact_secrets(input, secrets)
-  secrets.compact
-         .reduce(input) { |str, secret| str.gsub secret, "******" }
-         .freeze
-end
-
-
- -
-

- - #redirect_stdout(file) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-372
-373
-374
-375
-376
-377
-378
-379
-
-
# File 'extend/kernel.rb', line 372
-
-def redirect_stdout(file)
-  out = $stdout.dup
-  $stdout.reopen(file)
-  yield
-ensure
-  $stdout.reopen(out)
-  out.close
-end
-
-
- -
-

- - #require?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-15
-
-
# File 'extend/kernel.rb', line 7
-
-def require?(path)
-  return false if path.nil?
-
-  require path
-  true
-rescue LoadError => e
-  # we should raise on syntax errors but not if the file doesn't exist.
-  raise unless e.message.include?(path)
-end
-
-
- -
-

- - #safe_system(cmd, *args, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Kernel.system but with exceptions.

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-260
-261
-262
-263
-264
-
-
# File 'extend/kernel.rb', line 260
-
-def safe_system(cmd, *args, **options)
-  return if Homebrew.system(cmd, *args, **options)
-
-  raise ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS)
-end
-
-
- -
-

- - #tap_and_name_comparisonObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-
-
# File 'extend/kernel.rb', line 534
-
-def tap_and_name_comparison
-  proc do |a, b|
-    if a.include?("/") && b.exclude?("/")
-      1
-    elsif a.exclude?("/") && b.include?("/")
-      -1
-    else
-      a <=> b
-    end
-  end
-end
-
-
- -
-

- - #truncate_text_to_approximate_size(str, max_bytes, options = {}) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Truncates a text string to fit within a byte size constraint, -preserving character encoding validity. The returned string will -be not much longer than the specified max_bytes, though the exact -shortfall or overrun may vary.

- - -
-
-
- - -
- - - - -
-
-
-
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-
-
# File 'extend/kernel.rb', line 475
-
-def truncate_text_to_approximate_size(str, max_bytes, options = {})
-  front_weight = options.fetch(:front_weight, 0.5)
-  raise "opts[:front_weight] must be between 0.0 and 1.0" if front_weight < 0.0 || front_weight > 1.0
-  return str if str.bytesize <= max_bytes
-
-  glue = "\n[...snip...]\n"
-  max_bytes_in = [max_bytes - glue.bytesize, 1].max
-  bytes = str.dup.force_encoding("BINARY")
-  glue_bytes = glue.encode("BINARY")
-  n_front_bytes = (max_bytes_in * front_weight).floor
-  n_back_bytes = max_bytes_in - n_front_bytes
-  if n_front_bytes.zero?
-    front = bytes[1..0]
-    back = bytes[-max_bytes_in..]
-  elsif n_back_bytes.zero?
-    front = bytes[0..(max_bytes_in - 1)]
-    back = bytes[1..0]
-  else
-    front = bytes[0..(n_front_bytes - 1)]
-    back = bytes[-n_back_bytes..]
-  end
-  out = front + glue_bytes + back
-  out.force_encoding("UTF-8")
-  out.encode!("UTF-16", invalid: :replace)
-  out.encode!("UTF-8")
-  out
-end
-
-
- -
-

- - #which(cmd, path = ENV.fetch("PATH")) ⇒ Object - - - - - -

-
-

Find a command.

- - -
-
-
- - -
- - - - -
-
-
-
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-
-
# File 'extend/kernel.rb', line 281
-
-def which(cmd, path = ENV.fetch("PATH"))
-  PATH.new(path).each do |p|
-    begin
-      pcmd = File.expand_path(cmd, p)
-    rescue ArgumentError
-      # File.expand_path will raise an ArgumentError if the path is malformed.
-      # See https://github.com/Homebrew/legacy-homebrew/issues/32789
-      next
-    end
-    return Pathname.new(pcmd) if File.file?(pcmd) && File.executable?(pcmd)
-  end
-  nil
-end
-
-
- -
-

- - #which_all(cmd, path = ENV.fetch("PATH")) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-
-
# File 'extend/kernel.rb', line 295
-
-def which_all(cmd, path = ENV.fetch("PATH"))
-  PATH.new(path).filter_map do |p|
-    begin
-      pcmd = File.expand_path(cmd, p)
-    rescue ArgumentError
-      # File.expand_path will raise an ArgumentError if the path is malformed.
-      # See https://github.com/Homebrew/legacy-homebrew/issues/32789
-      next
-    end
-    Pathname.new(pcmd) if File.file?(pcmd) && File.executable?(pcmd)
-  end.uniq
-end
-
-
- -
-

- - #which_editor(silent: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-
-
# File 'extend/kernel.rb', line 308
-
-def which_editor(silent: false)
-  editor = Homebrew::EnvConfig.editor
-  return editor if editor
-
-  # Find VS Code, Sublime Text, Textmate, BBEdit, or vim
-  editor = %w[code subl mate bbedit vim].find do |candidate|
-    candidate if which(candidate, ORIGINAL_PATHS)
-  end
-  editor ||= "vim"
-
-  unless silent
-    opoo <<~EOS
-      Using #{editor} because no editor was set in the environment.
-      This may change in the future, so we recommend setting EDITOR
-      or HOMEBREW_EDITOR to your preferred text editor.
-    EOS
-  end
-
-  editor
-end
-
-
- -
-

- - #with_custom_locale(locale, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-255
-256
-257
-
-
# File 'extend/kernel.rb', line 255
-
-def with_custom_locale(locale, &block)
-  with_env(LC_ALL: locale, &block)
-end
-
-
- -
-

- - #with_env(hash) ⇒ Object - - - - - -

-
- -
- Note: -

This method is not thread-safe – other threads -which happen to be scheduled during the block will also -see these environment variables.

-
-
- -

Calls the given block with the passed environment variables -added to ENV, then restores ENV afterwards.

- -

Example

- -
with_env(PATH: "/bin") do
-  system "echo $PATH"
-end
-
- - -
-
-
- - -
- - - - -
-
-
-
-519
-520
-521
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-
-
# File 'extend/kernel.rb', line 519
-
-def with_env(hash)
-  old_values = {}
-  begin
-    hash.each do |key, value|
-      key = key.to_s
-      old_values[key] = ENV.delete(key)
-      ENV[key] = value
-    end
-
-    yield if block_given?
-  ensure
-    ENV.update(old_values)
-  end
-end
-
-
- -
-

- - #with_homebrew_path(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-251
-252
-253
-
-
# File 'extend/kernel.rb', line 251
-
-def with_homebrew_path(&block)
-  with_env(PATH: PATH.new(ORIGINAL_PATHS), &block)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Language.html b/docs/Language.html deleted file mode 100644 index 0bb5f955c..000000000 --- a/docs/Language.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: Language - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/mac/language/java.rb,
- language/go.rb,
language/java.rb,
language/node.rb,
language/perl.rb,
language/python.rb,
language/node.rbi,
language/perl.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Go, Java, Node, Perl, Python - - - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Go.html b/docs/Language/Go.html deleted file mode 100644 index ba8b60bb1..000000000 --- a/docs/Language/Go.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - Module: Language::Go - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language::Go - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
language/go.rb
-
- -
- -

Overview

-
-

Helper functions for Go formulae.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .stage_deps(resources, target) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
Deprecated.

Use Go modules instead.

-
-

This method returns an undefined value.

Given a set of resources, stages them to a gopath for -building Go software. -The resource names should be the import name of the package, -e.g. resource "github.com/foo/bar".

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'language/go.rb', line 16
-
-def self.stage_deps(resources, target)
-  odeprecated "`Language::Go.stage_deps`", "Go modules"
-  if resources.empty?
-    if Homebrew::EnvConfig.developer?
-      odie "Tried to stage empty Language::Go resources array"
-    else
-      opoo "Tried to stage empty Language::Go resources array"
-    end
-  end
-  resources.grep(Resource::Go) { |resource| resource.stage(target) }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Java.html b/docs/Language/Java.html deleted file mode 100644 index 01b724445..000000000 --- a/docs/Language/Java.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - - Module: Language::Java - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language::Java - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
language/java.rb,
- extend/os/mac/language/java.rb
-
-
- -
- -

Overview

-
-

Helper functions for Java formulae.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .java_home(version = nil) ⇒ Pathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-
-
# File 'extend/os/mac/language/java.rb', line 6
-
-def self.java_home(version = nil)
-  openjdk = find_openjdk_formula(version)
-  return unless openjdk
-
-  openjdk.opt_libexec/"openjdk.jdk/Contents/Home"
-end
-
-
- -
-

- - .java_home_env(version = nil) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'language/java.rb', line 43
-
-def self.java_home_env(version = nil)
-  { JAVA_HOME: java_home_shell(version) }
-end
-
-
- -
-

- - .overridable_java_home_env(version = nil) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'language/java.rb', line 48
-
-def self.overridable_java_home_env(version = nil)
-  { JAVA_HOME: "${JAVA_HOME:-#{java_home_shell(version)}}" }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Node.html b/docs/Language/Node.html deleted file mode 100644 index 7a8c25f9b..000000000 --- a/docs/Language/Node.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - - - - Module: Language::Node - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language::Node - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
language/node.rb,
- language/node.rbi
-
-
- -
- -

Overview

-
-

Helper functions for Node formulae.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Shebang - - - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .local_npm_install_argsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-80
-81
-82
-83
-84
-85
-86
-87
-88
-
-
# File 'language/node.rb', line 80
-
-def self.local_npm_install_args
-  setup_npm_environment
-  # npm install args for local style module format
-  %W[
-    -ddd
-    --build-from-source
-    --#{npm_cache_config}
-  ]
-end
-
-
- -
-

- - .npm_cache_configString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'language/node.rb', line 10
-
-def self.npm_cache_config
-  "cache=#{HOMEBREW_CACHE}/npm_cache"
-end
-
-
- -
-

- - .pack_for_installationString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'language/node.rb', line 15
-
-def self.pack_for_installation
-  # Homebrew assumes the buildpath/testpath will always be disposable
-  # and from npm 5.0.0 the logic changed so that when a directory is
-  # fed to `npm install` only symlinks are created linking back to that
-  # directory, consequently breaking that assumption. We require a tarball
-  # because npm install creates a "real" installation when fed a tarball.
-  package = Pathname("package.json")
-  if package.exist?
-    begin
-      pkg_json = JSON.parse(package.read)
-    rescue JSON::ParserError
-      opoo "Could not parse package.json!"
-      raise
-    end
-    prepare_removed = pkg_json["scripts"]&.delete("prepare")
-    prepack_removed = pkg_json["scripts"]&.delete("prepack")
-    postpack_removed = pkg_json["scripts"]&.delete("postpack")
-    package.atomic_write(JSON.pretty_generate(pkg_json)) if prepare_removed || prepack_removed || postpack_removed
-  end
-  output = Utils.popen_read("npm", "pack", "--ignore-scripts")
-  raise "npm failed to pack #{Dir.pwd}" if !$CHILD_STATUS.exitstatus.zero? || output.lines.empty?
-
-  output.lines.last.chomp
-end
-
-
- -
-

- - .setup_npm_environmentvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'language/node.rb', line 41
-
-def self.setup_npm_environment
-  # guard that this is only run once
-  return if @env_set
-
-  @env_set = T.let(true, T.nilable(T::Boolean))
-  # explicitly use our npm and node-gyp executables instead of the user
-  # managed ones in HOMEBREW_PREFIX/lib/node_modules which might be broken
-  begin
-    ENV.prepend_path "PATH", Formula["node"].opt_libexec/"bin"
-  rescue FormulaUnavailableError
-    nil
-  end
-end
-
-
- -
-

- - .std_npm_install_args(libexec) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - libexec - - - (Pathname) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-
-
# File 'language/node.rb', line 56
-
-def self.std_npm_install_args(libexec)
-  setup_npm_environment
-
-  pack = pack_for_installation
-
-  # npm 7 requires that these dirs exist before install
-  (libexec/"lib").mkpath
-
-  # npm install args for global style module format installed into libexec
-  args = %W[
-    -ddd
-    --global
-    --build-from-source
-    --#{npm_cache_config}
-    --prefix=#{libexec}
-    #{Dir.pwd}/#{pack}
-  ]
-
-  args << "--unsafe-perm" if Process.uid.zero?
-
-  args
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Node/Shebang.html b/docs/Language/Node/Shebang.html deleted file mode 100644 index 8f042ca8c..000000000 --- a/docs/Language/Node/Shebang.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - Module: Language::Node::Shebang - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language::Node::Shebang - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
language/node.rb,
- language/node.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Mixin module for Formula adding shebang rewrite features.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NODE_SHEBANG_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A regex to match potential shebang permutations.

- - -
-
-
- - -
-
-
%r{^#! ?/usr/bin/(?:env )?node( |$)}
- -
NODE_SHEBANG_MAX_LENGTH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The length of the longest shebang matching SHEBANG_REGEX.

- - -
-
-
- - -
-
-
T.let("#! /usr/bin/env node ".length, Integer)
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .detected_node_shebang(formula = T.cast(self, Formula)) ⇒ Utils::Shebang::RewriteInfo - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - (defaults to: T.cast(self, Formula)) - - -
  • - -
- -

Returns:

- -

Raises:

- - -
- - - - -
-
-
-
-111
-112
-113
-114
-115
-116
-117
-
-
# File 'language/node.rb', line 111
-
-def detected_node_shebang(formula = T.cast(self, Formula))
-  node_deps = formula.deps.map(&:name).grep(/^node(@.+)?$/)
-  raise ShebangDetectionError.new("Node", "formula does not depend on Node") if node_deps.empty?
-  raise ShebangDetectionError.new("Node", "formula has multiple Node dependencies") if node_deps.length > 1
-
-  node_shebang_rewrite_info(Formula[node_deps.first].opt_bin/"node")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Perl.html b/docs/Language/Perl.html deleted file mode 100644 index 18b9f2eee..000000000 --- a/docs/Language/Perl.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - Module: Language::Perl - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language::Perl - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
language/perl.rb,
- language/perl.rbi
-
-
- -
- -

Overview

-
-

Helper functions for Perl formulae.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Shebang - - - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Perl/Shebang.html b/docs/Language/Perl/Shebang.html deleted file mode 100644 index 6d8d90558..000000000 --- a/docs/Language/Perl/Shebang.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - Module: Language::Perl::Shebang - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language::Perl::Shebang - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
language/perl.rb,
- language/perl.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for replacing perl shebangs.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PERL_SHEBANG_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A regex to match potential shebang permutations.

- - -
-
-
- - -
-
-
%r{^#! ?/usr/bin/(?:env )?perl( |$)}
- -
PERL_SHEBANG_MAX_LENGTH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The length of the longest shebang matching SHEBANG_REGEX.

- - -
-
-
- - -
-
-
T.let("#! /usr/bin/env perl ".length, Integer)
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .detected_perl_shebang(formula = T.cast(self, Formula)) ⇒ Utils::Shebang::RewriteInfo - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - (defaults to: T.cast(self, Formula)) - - -
  • - -
- -

Returns:

- -

Raises:

- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'language/perl.rb', line 30
-
-def detected_perl_shebang(formula = T.cast(self, Formula))
-  perl_deps = formula.declared_deps.select { |dep| dep.name == "perl" }
-  raise ShebangDetectionError.new("Perl", "formula does not depend on Perl") if perl_deps.empty?
-
-  perl_path = if perl_deps.any? { |dep| !dep.uses_from_macos? || !dep.use_macos_install? }
-    Formula["perl"].opt_bin/"perl"
-  else
-    "/usr/bin/perl#{MacOS.preferred_perl_version}"
-  end
-
-  perl_shebang_rewrite_info(perl_path)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Python.html b/docs/Language/Python.html deleted file mode 100644 index 341309d4d..000000000 --- a/docs/Language/Python.html +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - - Module: Language::Python - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language::Python - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
language/python.rb,
- language/python.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Shebang, Virtualenv - - - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .each_python(build, &block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - build - - - (BuildOptions, Tab) - - - -
  • - -
  • - - block - - - (T.proc.params(python: String, version: T.nilable(Version)).void, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'language/python.rb', line 37
-
-def self.each_python(build, &block)
-  original_pythonpath = ENV.fetch("PYTHONPATH", nil)
-  pythons = { "python@3" => "python3",
-              "pypy"     => "pypy",
-              "pypy3"    => "pypy3" }
-  pythons.each do |python_formula, python|
-    python_formula = Formulary.factory(python_formula)
-    next if build.without? python_formula.to_s
-
-    version = major_minor_version python
-    ENV["PYTHONPATH"] = if python_formula.latest_version_installed?
-      nil
-    else
-      homebrew_site_packages(python).to_s
-    end
-    block&.call python, version
-  end
-  ENV["PYTHONPATH"] = original_pythonpath
-end
-
-
- -
-

- - .homebrew_site_packages(python = "python3.7") ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - python - - - (String, Pathname) - - - (defaults to: "python3.7") - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'language/python.rb', line 18
-
-def self.homebrew_site_packages(python = "python3.7")
-  HOMEBREW_PREFIX/site_packages(python)
-end
-
-
- -
-

- - .in_sys_path?(python, path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-
-
# File 'language/python.rb', line 77
-
-def self.in_sys_path?(python, path)
-  script = <<~PYTHON
-    import os, sys
-    [os.path.realpath(p) for p in sys.path].index(os.path.realpath("#{path}"))
-  PYTHON
-  quiet_system python, "-c", script
-end
-
-
- -
-

- - .major_minor_version(python) ⇒ Version? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Version, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-
-
# File 'language/python.rb', line 10
-
-def self.major_minor_version(python)
-  version = `#{python} --version 2>&1`.chomp[/(\d\.\d+)/, 1]
-  return unless version
-
-  Version.new(version)
-end
-
-
- -
-

- - .reads_brewed_pth_files?(python) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'language/python.rb', line 58
-
-def self.reads_brewed_pth_files?(python)
-  return false unless homebrew_site_packages(python).directory?
-  return false unless homebrew_site_packages(python).writable?
-
-  probe_file = homebrew_site_packages(python)/"homebrew-pth-probe.pth"
-  begin
-    probe_file.atomic_write("import site; site.homebrew_was_here = True")
-    with_homebrew_path { quiet_system python, "-c", "import site; assert(site.homebrew_was_here)" }
-  ensure
-    probe_file.unlink if probe_file.exist?
-  end
-end
-
-
- -
-

- - .setup_install_args(prefix, python = "python3") ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - prefix - - - (Pathname) - - - -
  • - -
  • - - python - - - (String, Pathname) - - - (defaults to: "python3") - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'language/python.rb', line 86
-
-def self.setup_install_args(prefix, python = "python3")
-  shim = <<~PYTHON
-    import setuptools, tokenize
-    __file__ = 'setup.py'
-    exec(compile(getattr(tokenize, 'open', open)(__file__).read()
-      .replace('\\r\\n', '\\n'), __file__, 'exec'))
-  PYTHON
-  %W[
-    -c
-    #{shim}
-    --no-user-cfg
-    install
-    --prefix=#{prefix}
-    --install-scripts=#{prefix}/bin
-    --install-lib=#{prefix/site_packages(python)}
-    --single-version-externally-managed
-    --record=installed.txt
-  ]
-end
-
-
- -
-

- - .site_packages(python = "python3.7") ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - python - - - (String, Pathname) - - - (defaults to: "python3.7") - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'language/python.rb', line 23
-
-def self.site_packages(python = "python3.7")
-  if (python == "pypy") || (python == "pypy3")
-    "site-packages"
-  else
-    "lib/python#{major_minor_version python}/site-packages"
-  end
-end
-
-
- -
-

- - .user_site_packages(python) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-72
-73
-74
-
-
# File 'language/python.rb', line 72
-
-def self.user_site_packages(python)
-  Pathname.new(`#{python} -c "import site; print(site.getusersitepackages())"`.chomp)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Python/Shebang.html b/docs/Language/Python/Shebang.html deleted file mode 100644 index 1c6ddf629..000000000 --- a/docs/Language/Python/Shebang.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - Module: Language::Python::Shebang - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language::Python::Shebang - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
language/python.rb,
- language/python.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Mixin module for Formula adding shebang rewrite features.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PYTHON_SHEBANG_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

A regex to match potential shebang permutations.

- - -
-
-
- - -
-
-
%r{^#! ?/usr/bin/(?:env )?python(?:[23](?:\.\d{1,2})?)?( |$)}
- -
PYTHON_SHEBANG_MAX_LENGTH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The length of the longest shebang matching SHEBANG_REGEX.

- - -
-
-
- - -
-
-
T.let("#! /usr/bin/env pythonx.yyy ".length, Integer)
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .detected_python_shebang(formula = T.cast(self, Formula), use_python_from_path: false) ⇒ Utils::Shebang::RewriteInfo - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - (defaults to: T.cast(self, Formula)) - - -
  • - -
  • - - use_python_from_path - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-
-
# File 'language/python.rb', line 127
-
-def detected_python_shebang(formula = T.cast(self, Formula), use_python_from_path: false)
-  python_path = if use_python_from_path
-    "/usr/bin/env python3"
-  else
-    python_deps = formula.deps.map(&:name).grep(/^python(@.+)?$/)
-    raise ShebangDetectionError.new("Python", "formula does not depend on Python") if python_deps.empty?
-    if python_deps.length > 1
-      raise ShebangDetectionError.new("Python", "formula has multiple Python dependencies")
-    end
-
-    python_dep = python_deps.first
-    Formula[python_dep].opt_bin/python_dep.sub("@", "")
-  end
-
-  python_shebang_rewrite_info(python_path)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Python/Virtualenv.html b/docs/Language/Python/Virtualenv.html deleted file mode 100644 index 5cde665eb..000000000 --- a/docs/Language/Python/Virtualenv.html +++ /dev/null @@ -1,789 +0,0 @@ - - - - - - - Module: Language::Python::Virtualenv - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Language::Python::Virtualenv - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
language/python.rb,
- language/python.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Mixin module for Formula adding virtualenv support features.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Virtualenv - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #needs_python?(python) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns true if a formula option for the specified python is currently -active or if the specified python is required by the formula. Valid -inputs are "python", "python2" and :python3. Note that -"with-python", "without-python", "with-python@2" and "without-python@2" -formula options are handled correctly even if not associated with any -corresponding depends_on statement.

- - -
-
-
-

Parameters:

-
    - -
  • - - python - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-206
-207
-208
-209
-210
-
-
# File 'language/python.rb', line 206
-
-def needs_python?(python)
-  return true if build.with?(python)
-
-  (requirements.to_a | deps).any? { |r| r.name.split("/").last == python && r.required? }
-end
-
-
- -
-

- - #python_namesArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-262
-263
-264
-
-
# File 'language/python.rb', line 262
-
-def python_names
-  %w[python python3 pypy pypy3] + Formula.names.select { |name| name.start_with? "python@" }
-end
-
-
- -
-

- - #virtualenv_create(venv_root, python = "python", formula = T.cast(self, Formula), system_site_packages: true, without_pip: true) ⇒ Virtualenv - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Instantiates, creates and yields a Virtualenv object for use from -Formula#install, which provides helper methods for instantiating and -installing packages into a Python virtualenv.

- - -
-
-
-

Parameters:

-
    - -
  • - - venv_root - - - (String, Pathname) - - - - — -

    the path to the root of the virtualenv -(often libexec/"venv")

    -
    - -
  • - -
  • - - python - - - (String, Pathname) - - - (defaults to: "python") - - - — -

    which interpreter to use (e.g. "python3" -or "python3.x")

    -
    - -
  • - -
  • - - formula - - - (Formula) - - - (defaults to: T.cast(self, Formula)) - - - — -

    the active Formula

    -
    - -
  • - -
  • - - system_site_packages - - - (Boolean) - - - (defaults to: true) - - -
  • - -
  • - - without_pip - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-
-
# File 'language/python.rb', line 166
-
-def virtualenv_create(venv_root, python = "python", formula = T.cast(self, Formula),
-                      system_site_packages: true, without_pip: true)
-  # Limit deprecation to 3.12+ for now (or if we can't determine the version).
-  # Some used this argument for `setuptools`, which we no longer bundle since 3.12.
-  unless without_pip
-    python_version = Language::Python.major_minor_version(python)
-    if python_version.nil? || python_version.null? || python_version >= "3.12"
-      raise ArgumentError, "virtualenv_create's without_pip is deprecated starting with Python 3.12"
-    end
-  end
-
-  ENV.refurbish_args
-  venv = Virtualenv.new formula, venv_root, python
-  venv.create(system_site_packages:, without_pip:)
-
-  # Find any Python bindings provided by recursive dependencies
-  formula_deps = formula.recursive_dependencies
-  pth_contents = formula_deps.filter_map do |d|
-    next if d.build? || d.test?
-    # Do not add the main site-package provided by the brewed
-    # Python formula, to keep the virtual-env's site-package pristine
-    next if python_names.include? d.name
-
-    dep_site_packages = Formula[d.name].opt_prefix/Language::Python.site_packages(python)
-    next unless dep_site_packages.exist?
-
-    "import site; site.addsitedir('#{dep_site_packages}')\n"
-  end
-  (venv.site_packages/"homebrew_deps.pth").write pth_contents.join unless pth_contents.empty?
-
-  venv
-end
-
-
- -
-

- - #virtualenv_install_with_resources(using: nil, system_site_packages: true, without_pip: true, link_manpages: false, without: nil, start_with: nil, end_with: nil) ⇒ Virtualenv - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Helper method for the common case of installing a Python application. -Creates a virtualenv in libexec, installs all resources defined -on the formula and then installs the formula. An options hash may be -passed (e.g. :using => "python") to override the default, guessed -formula preference for python or python@x.y, or to resolve an ambiguous -case where it's not clear whether python or python@x.y should be the -default guess.

- - -
-
-
-

Parameters:

-
    - -
  • - - using - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - system_site_packages - - - (Boolean) - - - (defaults to: true) - - -
  • - -
  • - - without_pip - - - (Boolean) - - - (defaults to: true) - - -
  • - -
  • - - link_manpages - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - without - - - (String, Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - start_with - - - (String, Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - end_with - - - (String, Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-
-
# File 'language/python.rb', line 230
-
-def virtualenv_install_with_resources(using: nil, system_site_packages: true, without_pip: true,
-                                      link_manpages: false, without: nil, start_with: nil, end_with: nil)
-  python = using
-  if python.nil?
-    wanted = python_names.select { |py| needs_python?(py) }
-    raise FormulaUnknownPythonError, self if wanted.empty?
-    raise FormulaAmbiguousPythonError, self if wanted.size > 1
-
-    python = T.must(wanted.first)
-    python = "python3" if python == "python"
-  end
-
-  venv_resources = if without.nil? && start_with.nil? && end_with.nil?
-    resources
-  else
-    remaining_resources = resources.to_h { |resource| [resource.name, resource] }
-
-    slice_resources!(remaining_resources, Array(without))
-    start_with_resources = slice_resources!(remaining_resources, Array(start_with))
-    end_with_resources = slice_resources!(remaining_resources, Array(end_with))
-
-    start_with_resources + remaining_resources.values + end_with_resources
-  end
-
-  venv = virtualenv_create(libexec, python.delete("@"), system_site_packages:,
-                                                        without_pip:)
-  venv.pip_install venv_resources
-  venv.pip_install_and_link(T.must(buildpath), link_manpages:)
-  venv
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Language/Python/Virtualenv/Virtualenv.html b/docs/Language/Python/Virtualenv/Virtualenv.html deleted file mode 100644 index 9952b0526..000000000 --- a/docs/Language/Python/Virtualenv/Virtualenv.html +++ /dev/null @@ -1,853 +0,0 @@ - - - - - - - Class: Language::Python::Virtualenv::Virtualenv - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Language::Python::Virtualenv::Virtualenv - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
language/python.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Convenience wrapper for creating and installing packages into Python -virtualenvs.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(formula, venv_root, python) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Initializes a Virtualenv instance. This does not create the virtualenv -on disk; #create does that.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - - — -

    the active Formula

    -
    - -
  • - -
  • - - venv_root - - - (String, Pathname) - - - - — -

    the path to the root of the -virtualenv

    -
    - -
  • - -
  • - - python - - - (String, Pathname) - - - - — -

    which interpreter to use, e.g. -"python" or "python2"

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-294
-295
-296
-297
-298
-
-
# File 'language/python.rb', line 294
-
-def initialize(formula, venv_root, python)
-  @formula = formula
-  @venv_root = T.let(Pathname(venv_root), Pathname)
-  @python = python
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #create(system_site_packages: true, without_pip: true) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Obtains a copy of the virtualenv library and creates a new virtualenv on disk.

- - -
-
-
-

Parameters:

-
    - -
  • - - system_site_packages - - - (Boolean) - - - (defaults to: true) - - -
  • - -
  • - - without_pip - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- - -
- - - - -
-
-
-
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-
-
# File 'language/python.rb', line 314
-
-def create(system_site_packages: true, without_pip: true)
-  return if (@venv_root/"bin/python").exist?
-
-  args = ["-m", "venv"]
-  args << "--system-site-packages" if system_site_packages
-  args << "--without-pip" if without_pip
-  @formula.system @python, *args, @venv_root
-
-  # Robustify symlinks to survive python patch upgrades
-  @venv_root.find do |f|
-    next unless f.symlink?
-    next unless (rp = f.realpath.to_s).start_with? HOMEBREW_CELLAR
-
-    version = rp.match %r{^#{HOMEBREW_CELLAR}/python@(.*?)/}o
-    version = "@#{version.captures.first}" unless version.nil?
-
-    new_target = rp.sub %r{#{HOMEBREW_CELLAR}/python#{version}/[^/]+}, Formula["python#{version}"].opt_prefix
-    f.unlink
-    f.make_symlink new_target
-  end
-
-  Pathname.glob(@venv_root/"lib/python*/orig-prefix.txt").each do |prefix_file|
-    prefix_path = prefix_file.read
-
-    version = prefix_path.match %r{^#{HOMEBREW_CELLAR}/python@(.*?)/}o
-    version = "@#{version.captures.first}" unless version.nil?
-
-    prefix_path.sub! %r{^#{HOMEBREW_CELLAR}/python#{version}/[^/]+}, Formula["python#{version}"].opt_prefix
-    prefix_file.atomic_write prefix_path
-  end
-
-  # Remove unnecessary activate scripts
-  (@venv_root/"bin").glob("[Aa]ctivate*").map(&:unlink)
-end
-
-
- -
-

- - #pip_install(targets, build_isolation: true) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Installs packages represented by targets into the virtualenv.

- - -
-
-
-

Parameters:

-
    - -
  • - - targets - - - (String, Pathname, Resource, Array<String, Pathname, Resource>) - - - - — -

    (A) token(s) passed to pip -representing the object to be installed. This can be a directory -containing a setup.py, a Resource which will be staged and -installed, or a package identifier to be fetched from PyPI. -Multiline strings are allowed and treated as though they represent -the contents of a requirements.txt.

    -
    - -
  • - -
  • - - build_isolation - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- - -
- - - - -
-
-
-
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-
-
# File 'language/python.rb', line 365
-
-def pip_install(targets, build_isolation: true)
-  targets = Array(targets)
-  targets.each do |t|
-    if t.is_a?(Resource)
-      t.stage { do_install(Pathname.pwd, build_isolation:) }
-    else
-      t = t.lines.map(&:strip) if t.is_a?(String) && t.include?("\n")
-      do_install(t, build_isolation:)
-    end
-  end
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Installs packages represented by targets into the virtualenv, but -unlike #pip_install also links new scripts to Formula#bin.

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-
-
# File 'language/python.rb', line 389
-
-def pip_install_and_link(targets, link_manpages: false, build_isolation: true)
-  bin_before = Dir[@venv_root/"bin/*"].to_set
-  man_before = Dir[@venv_root/"share/man/man*/*"].to_set if link_manpages
-
-  pip_install(targets, build_isolation:)
-
-  bin_after = Dir[@venv_root/"bin/*"].to_set
-  bin_to_link = (bin_after - bin_before).to_a
-  @formula.bin.install_symlink(bin_to_link)
-  return unless link_manpages
-
-  man_after = Dir[@venv_root/"share/man/man*/*"].to_set
-  man_to_link = (man_after - man_before).to_a
-  man_to_link.each do |manpage|
-    (@formula.man/Pathname.new(manpage).dirname.basename).install_symlink manpage
-  end
-end
-
-
- -
-

- - #rootPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-301
-302
-303
-
-
# File 'language/python.rb', line 301
-
-def root
-  @venv_root
-end
-
-
- -
-

- - #site_packagesPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-306
-307
-308
-
-
# File 'language/python.rb', line 306
-
-def site_packages
-  @venv_root/Language::Python.site_packages(@python)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/LazyObject.html b/docs/LazyObject.html deleted file mode 100644 index 5f3760159..000000000 --- a/docs/LazyObject.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: LazyObject - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: LazyObject - - - Private -

-
- -
-
Inherits:
-
- Delegator - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lazy_object.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

An object which lazily evaluates its inner block only once a method is called on it.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(&callable) ⇒ LazyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of LazyObject.

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lazy_object.rb', line 8
-
-def initialize(&callable)
-  super(callable)
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/LinkageCacheStore.html b/docs/LinkageCacheStore.html deleted file mode 100644 index d8bc6e95b..000000000 --- a/docs/LinkageCacheStore.html +++ /dev/null @@ -1,665 +0,0 @@ - - - - - - - Class: LinkageCacheStore - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: LinkageCacheStore - - - Private -

-
- -
-
Inherits:
-
- CacheStore - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
linkage_cache_store.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

LinkageCacheStore provides methods to fetch and mutate linkage-specific data used -by the brew linkage command.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(keg_path, database) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-14
-15
-16
-17
-
-
# File 'linkage_cache_store.rb', line 14
-
-def initialize(keg_path, database)
-  @keg_path = keg_path
-  super(database)
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #delete!nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Delete the keg from the LinkageCacheStore

- - -
-
-
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-61
-62
-63
-
-
# File 'linkage_cache_store.rb', line 61
-
-def delete!
-  database.delete(@keg_path)
-end
-
-
- -
-

- - #fetch(type) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (TypeError) - - - - — -

    error if the type is not in HASH_LINKAGE_TYPES

    -
    - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'linkage_cache_store.rb', line 46
-
-def fetch(type)
-  unless HASH_LINKAGE_TYPES.include?(type)
-    raise TypeError, <<~EOS
-      Can't fetch types that are not defined for the linkage store
-    EOS
-  end
-
-  return {} unless keg_exists?
-
-  fetch_hash_values(type)
-end
-
-
- -
-

- - #keg_exists?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns true if the database has any value for the current keg_path.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'linkage_cache_store.rb', line 22
-
-def keg_exists?
-  !database.get(@keg_path).nil?
-end
-
-
- -
-

- - #update!(hash_values) ⇒ nil - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Inserts dylib-related information into the cache if it does not exist or -updates data into the linkage cache if it does exist.

- - -
-
-
-

Parameters:

-
    - -
  • - - hash_values - - - (Hash) - - - - — -

    hash containing KVPs of { :type => Hash }

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (nil) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'linkage_cache_store.rb', line 31
-
-def update!(hash_values)
-  hash_values.each_key do |type|
-    next if HASH_LINKAGE_TYPES.include?(type)
-
-    raise TypeError, <<~EOS
-      Can't update types that are not defined for the linkage store
-    EOS
-  end
-
-  database.set @keg_path, hash_values
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/LinkageChecker.html b/docs/LinkageChecker.html deleted file mode 100644 index fb05126ae..000000000 --- a/docs/LinkageChecker.html +++ /dev/null @@ -1,998 +0,0 @@ - - - - - - - Class: LinkageChecker - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: LinkageChecker - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/mac/linkage_checker.rb,
- extend/os/linux/linkage_checker.rb,
linkage_checker.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Check for broken/missing linkage in a formula's keg.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
SYSTEM_LIBRARY_ALLOWLIST = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Libraries provided by glibc and gcc.

- - -
-
-
- - -
-
-
%w[
-  ld-linux-x86-64.so.2
-  ld-linux-aarch64.so.1
-  libanl.so.1
-  libatomic.so.1
-  libc.so.6
-  libdl.so.2
-  libm.so.6
-  libmvec.so.1
-  libnss_files.so.2
-  libpthread.so.0
-  libresolv.so.2
-  librt.so.1
-  libthread_db.so.1
-  libutil.so.1
-  libgcc_s.so.1
-  libgomp.so.1
-  libstdc++.so.6
-  libquadmath.so.0
-].freeze
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(keg, formula = nil, cache_db:, rebuild_cache: false) ⇒ LinkageChecker - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of LinkageChecker.

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'linkage_checker.rb', line 13
-
-def initialize(keg, formula = nil, cache_db:, rebuild_cache: false)
-  @keg = keg
-  @formula = formula || resolve_formula(keg)
-  @store = LinkageCacheStore.new(keg.to_s, cache_db)
-
-  @system_dylibs    = Set.new
-  @broken_dylibs    = Set.new
-  @variable_dylibs  = Set.new
-  @brewed_dylibs    = Hash.new { |h, k| h[k] = Set.new }
-  @reverse_links    = Hash.new { |h, k| h[k] = Set.new }
-  @broken_deps      = Hash.new { |h, k| h[k] = [] }
-  @indirect_deps    = []
-  @undeclared_deps  = []
-  @unnecessary_deps = []
-  @unwanted_system_dylibs = []
-  @version_conflict_deps = []
-  @files_missing_rpaths = []
-  @executable_path_dylibs = []
-
-  check_dylibs(rebuild_cache:)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #formulaObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'linkage_checker.rb', line 11
-
-def formula
-  @formula
-end
-
-
- - - -
-

- - #kegObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'linkage_checker.rb', line 11
-
-def keg
-  @keg
-end
-
-
- - - -
-

- - #storeObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'linkage_checker.rb', line 11
-
-def store
-  @store
-end
-
-
- - - -
-

- - #undeclared_depsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'linkage_checker.rb', line 11
-
-def undeclared_deps
-  @undeclared_deps
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #broken_library_linkage?(test: false, strict: false) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - test - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - strict - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-
-
# File 'linkage_checker.rb', line 77
-
-def broken_library_linkage?(test: false, strict: false)
-  raise ArgumentError, "Strict linkage checking requires test mode to be enabled." if strict && !test
-
-  issues = [@broken_deps, @broken_dylibs]
-  if test
-    issues += [@unwanted_system_dylibs, @version_conflict_deps]
-    issues += [@indirect_deps, @undeclared_deps, @files_missing_rpaths, @executable_path_dylibs] if strict
-  end
-  issues.any?(&:present?)
-end
-
-
- -
-

- - #display_normal_outputObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'linkage_checker.rb', line 35
-
-def display_normal_output
-  display_items "System libraries", @system_dylibs
-  display_items "Homebrew libraries", @brewed_dylibs
-  display_items "Indirect dependencies with linkage", @indirect_deps
-  display_items "@rpath-referenced libraries", @variable_dylibs
-  display_items "Missing libraries", @broken_dylibs
-  display_items "Broken dependencies", @broken_deps
-  display_items "Undeclared dependencies with linkage", @undeclared_deps
-  display_items "Dependencies with no linkage", @unnecessary_deps
-  display_items "Unwanted system libraries", @unwanted_system_dylibs
-  display_items "Files with missing rpath", @files_missing_rpaths
-  display_items "@executable_path references in libraries", @executable_path_dylibs
-end
-
-
- -
-

- - #display_reverse_outputObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-
-
# File 'linkage_checker.rb', line 49
-
-def display_reverse_output
-  return if @reverse_links.empty?
-
-  sorted = @reverse_links.sort
-  sorted.each do |dylib, files|
-    puts dylib
-    files.each do |f|
-      unprefixed = f.to_s.delete_prefix "#{keg}/"
-      puts "  #{unprefixed}"
-    end
-    puts if dylib != sorted.last.first
-  end
-end
-
-
- -
-

- - #display_test_output(puts_output: true, strict: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'linkage_checker.rb', line 63
-
-def display_test_output(puts_output: true, strict: false)
-  display_items("Missing libraries", @broken_dylibs, puts_output:)
-  display_items("Broken dependencies", @broken_deps, puts_output:)
-  display_items("Unwanted system libraries", @unwanted_system_dylibs, puts_output:)
-  display_items("Conflicting libraries", @version_conflict_deps, puts_output:)
-  return unless strict
-
-  display_items("Indirect dependencies with linkage", @indirect_deps, puts_output:)
-  display_items("Undeclared dependencies with linkage", @undeclared_deps, puts_output:)
-  display_items("Files with missing rpath", @files_missing_rpaths, puts_output:)
-  display_items "@executable_path references in libraries", @executable_path_dylibs, puts_output:
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/LinuxRequirement.html b/docs/LinuxRequirement.html deleted file mode 100644 index 433c35abc..000000000 --- a/docs/LinuxRequirement.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - Class: LinuxRequirement - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: LinuxRequirement - - - Private -

-
- -
-
Inherits:
-
- Requirement - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
requirements/linux_requirement.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A requirement on Linux.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Dependable

-

Dependable::RESERVED_TAGS

- - - - -

Instance Attribute Summary

- -

Attributes inherited from Requirement

-

#cask, #download, #name

- - - -

Attributes included from Dependable

-

#tags

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Requirement

-

cask, #display_s, download, #env, env, #env_proc, expand, fatal, #fatal?, #initialize, #mktemp, #modify_build_environment, #option_names, prune, prune?, #satisfied?, #satisfied_result_parent, satisfy

- - - - - - - - - -

Methods included from BuildEnvironment::DSL

-

#env, #inherited

- - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- - - - - - - - - -

Methods included from Dependable

-

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

-
-

Constructor Details

- -

This class inherits a constructor from Requirement

- -
- - -
-

Instance Method Details

- - -
-

- - #messageString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'requirements/linux_requirement.rb', line 11
-
-def message
-  "Linux is required for this software."
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/LinuxRunnerSpec.html b/docs/LinuxRunnerSpec.html deleted file mode 100644 index 69ca8dfe4..000000000 --- a/docs/LinuxRunnerSpec.html +++ /dev/null @@ -1,890 +0,0 @@ - - - - - - - Class: LinuxRunnerSpec - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: LinuxRunnerSpec - - - Private -

-
- -
-
Inherits:
-
- T::Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
linux_runner_spec.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #cleanup ⇒ Boolean - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop cleanup.

    -
    - -
  • - - - -
  • - - - #container ⇒ Hash{Symbol => String} - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop container.

    -
    - -
  • - - - -
  • - - - #name ⇒ String - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop name.

    -
    - -
  • - - - -
  • - - - #runner ⇒ String - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop runner.

    -
    - -
  • - - - -
  • - - - #timeout ⇒ Integer - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop timeout.

    -
    - -
  • - - - -
  • - - - #workdir ⇒ String - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop workdir.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name:, runner:, container:, workdir:, timeout:, cleanup:) ⇒ void - - - - - -

-
- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - runner - - - (String) - - - -
  • - -
  • - - container - - - (Hash{Symbol => String}) - - - -
  • - -
  • - - workdir - - - (String) - - - -
  • - -
  • - - timeout - - - (Integer) - - - -
  • - -
  • - - cleanup - - - (Boolean) - - - -
  • - -
- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :name, String
-const :runner, String
-const :container, T::Hash[Symbol, String]
-const :workdir, String
-const :timeout, Integer
-const :cleanup, T::Boolean
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #cleanupBoolean (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop cleanup.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :cleanup, T::Boolean
-
-
- - - -
-

- - #containerHash{Symbol => String} (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop container.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :container, T::Hash[Symbol, String]
-
-
- - - -
-

- - #nameString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop name.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :name, String
-
-
- - - -
-

- - #runnerString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop runner.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :runner, String
-
-
- - - -
-

- - #timeoutInteger (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop timeout.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :timeout, Integer
-
-
- - - -
-

- - #workdirString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop workdir.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :workdir, String
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #to_hHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'linux_runner_spec.rb', line 22
-
-def to_h
-  {
-    name:,
-    runner:,
-    container:,
-    workdir:,
-    timeout:,
-    cleanup:,
-  }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Livecheck.html b/docs/Livecheck.html deleted file mode 100644 index 4e82f026c..000000000 --- a/docs/Livecheck.html +++ /dev/null @@ -1,1633 +0,0 @@ - - - - - - - Class: Livecheck - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Livecheck - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
livecheck.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

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 related instance variable when no argument -is provided.

- -

This information is used by the brew livecheck command to control its -behavior. Example livecheck blocks can be found in the -brew livecheck documentation.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #skip_msg ⇒ String? - - - - - - - - readonly - - - - - - - private - -

    A very brief description of why the formula/cask/resource is skipped (e.g. No longer developed or maintained).

    -
    - -
  • - - - -
  • - - - #strategy_block ⇒ Proc? - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(package_or_resource) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'livecheck.rb', line 23
-
-def initialize(package_or_resource)
-  @package_or_resource = package_or_resource
-  @referenced_cask_name = nil
-  @referenced_formula_name = nil
-  @regex = nil
-  @skip = false
-  @skip_msg = nil
-  @strategy = nil
-  @strategy_block = nil
-  @throttle = nil
-  @url = nil
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #skip_msgString? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A very brief description of why the formula/cask/resource is skipped (e.g. -No longer developed or maintained).

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'livecheck.rb', line 20
-
-def skip_msg
-  @skip_msg
-end
-
-
- - - -
-

- - #strategy_blockProc? (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Proc, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-137
-138
-139
-
-
# File 'livecheck.rb', line 137
-
-def strategy_block
-  @strategy_block
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #arch(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-232
-
-
# File 'sorbet/rbi/parlour.rbi', line 232
-
-def arch(*args, **options, &block); end
-
-
- -
-

- - #cask(cask_name = T.unsafe(nil)) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sets the @referenced_cask_name instance variable to the provided String -or returns the @referenced_cask_name instance variable when no argument -is provided. Inherited livecheck values from the referenced cask -(e.g. regex) can be overridden in the livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - cask_name - - - (String) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'livecheck.rb', line 46
-
-def cask(cask_name = T.unsafe(nil))
-  case cask_name
-  when nil
-    @referenced_cask_name
-  when String
-    @referenced_cask_name = cask_name
-  end
-end
-
-
- -
-

- - #formula(formula_name = T.unsafe(nil)) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sets the @referenced_formula_name instance variable to the provided -String or returns the @referenced_formula_name instance variable when -no argument is provided. Inherited livecheck values from the referenced -formula (e.g. regex) can be overridden in the livecheck block.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula_name - - - (String) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'livecheck.rb', line 65
-
-def formula(formula_name = T.unsafe(nil))
-  case formula_name
-  when nil
-    @referenced_formula_name
-  when String
-    @referenced_formula_name = formula_name
-  end
-end
-
-
- -
-

- - #regex(pattern = T.unsafe(nil)) ⇒ Regexp? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sets the @regex instance variable to the provided Regexp or returns the -@regex instance variable when no argument is provided.

- - -
-
-
-

Parameters:

-
    - -
  • - - pattern - - - (Regexp) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Regexp, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-
-
# File 'livecheck.rb', line 82
-
-def regex(pattern = T.unsafe(nil))
-  case pattern
-  when nil
-    @regex
-  when Regexp
-    @regex = pattern
-  end
-end
-
-
- -
-

- - #skip(skip_msg = T.unsafe(nil)) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sets the @skip instance variable to true and sets the @skip_msg -instance variable if a String is provided. @skip is used to indicate -that the formula/cask/resource should be skipped and the skip_msg very -briefly describes why it is skipped (e.g. "No longer developed or -maintained").

- - -
-
-
-

Parameters:

-
    - -
  • - - skip_msg - - - (String) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-102
-103
-104
-105
-106
-
-
# File 'livecheck.rb', line 102
-
-def skip(skip_msg = T.unsafe(nil))
-  @skip_msg = skip_msg if skip_msg.is_a?(String)
-
-  @skip = true
-end
-
-
- -
-

- - #skip?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Should livecheck skip this formula/cask/resource?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-110
-111
-112
-
-
# File 'livecheck.rb', line 110
-
-def skip?
-  @skip
-end
-
-
- -
-

- - #strategy(symbol = T.unsafe(nil), &block) ⇒ Symbol? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sets the @strategy instance variable to the provided Symbol or returns -the @strategy instance variable when no argument is provided. The strategy -symbols use snake case (e.g. :page_match) and correspond to the strategy -file name.

- - -
-
-
-

Parameters:

-
    - -
  • - - symbol - - - (Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - block - - - (Proc, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Symbol, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-
-
# File 'livecheck.rb', line 125
-
-def strategy(symbol = T.unsafe(nil), &block)
-  @strategy_block = block if block
-
-  case symbol
-  when nil
-    @strategy
-  when Symbol
-    @strategy = symbol
-  end
-end
-
-
- -
-

- - #throttle(rate = T.unsafe(nil)) ⇒ Integer? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sets the @throttle instance variable to the provided Integer or returns -the @throttle instance variable when no argument is provided.

- - -
-
-
-

Parameters:

-
    - -
  • - - rate - - - (Integer) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Integer, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-147
-148
-149
-150
-151
-152
-153
-154
-
-
# File 'livecheck.rb', line 147
-
-def throttle(rate = T.unsafe(nil))
-  case rate
-  when nil
-    @throttle
-  when Integer
-    @throttle = rate
-  end
-end
-
-
- -
-

- - #to_hashHash{String => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a Hash of all instance variable values.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{String => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-
-
# File 'livecheck.rb', line 184
-
-def to_hash
-  {
-    "cask"     => @referenced_cask_name,
-    "formula"  => @referenced_formula_name,
-    "regex"    => @regex,
-    "skip"     => @skip,
-    "skip_msg" => @skip_msg,
-    "strategy" => @strategy,
-    "throttle" => @throttle,
-    "url"      => @url,
-  }
-end
-
-
- -
-

- - #url(url = T.unsafe(nil)) ⇒ String, ... - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Sets the @url instance variable to the provided argument or returns the -@url instance variable when no argument is provided. The argument can be -a String (a URL) or a supported Symbol corresponding to a URL in the -formula/cask/resource (e.g. :stable, :homepage, :head, :url).

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String, Symbol) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-
-
# File 'livecheck.rb', line 166
-
-def url(url = T.unsafe(nil))
-  case url
-  when nil
-    @url
-  when String, :head, :homepage, :stable, :url
-    @url = url
-  when Symbol
-    raise ArgumentError, "#{url.inspect} is not a valid URL shorthand"
-  end
-end
-
-
- -
-

- - #version(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-229
-
-
# File 'sorbet/rbi/parlour.rbi', line 229
-
-def version(*args, **options, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/LocalBottleDownloadStrategy.html b/docs/LocalBottleDownloadStrategy.html deleted file mode 100644 index 87bb2a935..000000000 --- a/docs/LocalBottleDownloadStrategy.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - Class: LocalBottleDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: LocalBottleDownloadStrategy - - - Private -

-
- -
-
Inherits:
-
- AbstractFileDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for extracting local binary packages.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractFileDownloadStrategy

-

#basename, #cached_location, #symlink_location, #temporary_path

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(path) ⇒ LocalBottleDownloadStrategy - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of LocalBottleDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-707
-708
-709
-710
-
-
# File 'download_strategy.rb', line 707
-
-def initialize(path) # rubocop:disable Lint/MissingSuper
-  @cached_location = path
-  extend Pourable
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Locale.html b/docs/Locale.html deleted file mode 100644 index 73d546909..000000000 --- a/docs/Locale.html +++ /dev/null @@ -1,898 +0,0 @@ - - - - - - - Class: Locale - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Locale - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
locale.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Representation of a system locale.

- -

Used to compare the system language and languages defined using the cask language stanza.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: ParserError - - -

- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(language, script, region) ⇒ Locale - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Locale.

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-
-
# File 'locale.rb', line 60
-
-def initialize(language, script, region)
-  raise ArgumentError, "#{self.class} cannot be empty" if language.nil? && region.nil? && script.nil?
-
-  {
-    language:,
-    script:,
-    region:,
-  }.each do |key, value|
-    next if value.nil?
-
-    regex = self.class.const_get(:"#{key.upcase}_REGEX")
-    raise ParserError, "'#{value}' does not match #{regex}" unless value&.match?(regex)
-
-    instance_variable_set(:"@#{key}", value)
-  end
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #languageObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'locale.rb', line 58
-
-def language
-  @language
-end
-
-
- - - -
-

- - #regionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'locale.rb', line 58
-
-def region
-  @region
-end
-
-
- - - -
-

- - #scriptObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'locale.rb', line 58
-
-def script
-  @script
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .parse(string) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'locale.rb', line 27
-
-def self.parse(string)
-  if (locale = try_parse(string))
-    return locale
-  end
-
-  raise ParserError, "'#{string}' cannot be parsed to a #{self}"
-end
-
-
- -
-

- - .try_parse(string) ⇒ T.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - string - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'locale.rb', line 36
-
-def self.try_parse(string)
-  return if string.blank?
-
-  scanner = StringScanner.new(string)
-
-  if (language = scanner.scan(LANGUAGE_REGEX))
-    sep = scanner.scan("-")
-    return if (sep && scanner.eos?) || (sep.nil? && !scanner.eos?)
-  end
-
-  if (script = scanner.scan(SCRIPT_REGEX))
-    sep = scanner.scan("-")
-    return if (sep && scanner.eos?) || (sep.nil? && !scanner.eos?)
-  end
-
-  region = scanner.scan(REGION_REGEX)
-
-  return unless scanner.eos?
-
-  new(language, script, region)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #detect(locale_groups) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-104
-105
-106
-107
-
-
# File 'locale.rb', line 104
-
-def detect(locale_groups)
-  locale_groups.find { |locales| locales.any? { |locale| eql?(locale) } } ||
-    locale_groups.find { |locales| locales.any? { |locale| include?(locale) } }
-end
-
-
- -
-

- - #include?(other) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-
-
# File 'locale.rb', line 77
-
-def include?(other)
-  unless other.is_a?(self.class)
-    other = self.class.try_parse(other)
-    return false if other.nil?
-  end
-
-  [:language, :script, :region].all? do |var|
-    if other.public_send(var).nil?
-      true
-    else
-      public_send(var) == other.public_send(var)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Locale/ParserError.html b/docs/Locale/ParserError.html deleted file mode 100644 index dea933784..000000000 --- a/docs/Locale/ParserError.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - Exception: Locale::ParserError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Locale::ParserError - - - Private -

-
- -
-
Inherits:
-
- StandardError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
locale.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error when a string cannot be parsed to a Locale.

- - -
-
-
- - -
- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/LockFile.html b/docs/LockFile.html deleted file mode 100644 index ff7621ef4..000000000 --- a/docs/LockFile.html +++ /dev/null @@ -1,542 +0,0 @@ - - - - - - - Class: LockFile - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: LockFile - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lock_file.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A lock file.

- - -
-
-
- - -
-

Direct Known Subclasses

-

CaskLock, FormulaLock

-
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #path ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(name) ⇒ LockFile - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of LockFile.

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-
-
# File 'lock_file.rb', line 10
-
-def initialize(name)
-  @name = name.to_s
-  @path = HOMEBREW_LOCKS/"#{@name}.lock"
-  @lockfile = nil
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lock_file.rb', line 8
-
-def path
-  @path
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #lockObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'lock_file.rb', line 16
-
-def lock
-  @path.parent.mkpath
-  create_lockfile
-  return if @lockfile.flock(File::LOCK_EX | File::LOCK_NB)
-
-  raise OperationInProgressError, @name
-end
-
-
- -
-

- - #unlockObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-
-
# File 'lock_file.rb', line 24
-
-def unlock
-  return if @lockfile.nil? || @lockfile.closed?
-
-  @lockfile.flock(File::LOCK_UN)
-  @lockfile.close
-end
-
-
- -
-

- - #with_lockObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-
-
# File 'lock_file.rb', line 31
-
-def with_lock
-  lock
-  yield
-ensure
-  unlock
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/MacOSRequirement.html b/docs/MacOSRequirement.html deleted file mode 100644 index ba8bca00a..000000000 --- a/docs/MacOSRequirement.html +++ /dev/null @@ -1,1014 +0,0 @@ - - - - - - - Class: MacOSRequirement - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: MacOSRequirement - - - Private -

-
- -
-
Inherits:
-
- Requirement - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
requirements/macos_requirement.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A requirement on macOS.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
DISABLED_MACOS_VERSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- -
- TODO: -

when Yosemite is removed here, keep these around as empty arrays so we

-
-
- -

can keep the deprecation/disabling code the same.

- - -
-
-
- - -
-
-
[
-  :yosemite,
-].freeze
- -
DEPRECATED_MACOS_VERSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[].freeze
- -
- - - - - - -

Constants included - from Dependable

-

Dependable::RESERVED_TAGS

- - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from Requirement

-

#cask, #download, #name

- - - -

Attributes included from Dependable

-

#tags

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Requirement

-

cask, download, #env, env, #env_proc, expand, fatal, #fatal?, #mktemp, #modify_build_environment, #option_names, prune, prune?, #satisfied?, #satisfied_result_parent, satisfy

- - - - - - - - - -

Methods included from BuildEnvironment::DSL

-

#env, #inherited

- - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- - - - - - - - - -

Methods included from Dependable

-

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

-
-

Constructor Details

- -
-

- - #initialize(tags = [], comparator: ">=") ⇒ MacOSRequirement - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of MacOSRequirement.

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-
-
# File 'requirements/macos_requirement.rb', line 19
-
-def initialize(tags = [], comparator: ">=")
-  @version = begin
-    if comparator == "==" && tags.first.respond_to?(:map)
-      tags.first.map { |s| MacOSVersion.from_symbol(s) }
-    else
-      MacOSVersion.from_symbol(tags.first) unless tags.empty?
-    end
-  rescue MacOSVersion::Error => e
-    if DISABLED_MACOS_VERSIONS.include?(e.version)
-      # This odisabled should stick around indefinitely.
-      odisabled "`depends_on macos: :#{e.version}`"
-    elsif DEPRECATED_MACOS_VERSIONS.include?(e.version)
-      # This odeprecated should stick around indefinitely.
-      odeprecated "`depends_on macos: :#{e.version}`"
-    else
-      raise
-    end
-
-    # Array of versions: remove the bad ones and try again.
-    if tags.first.respond_to?(:reject)
-      tags = [tags.first.reject { |s| s == e.version }, tags[1..]]
-      retry
-    end
-
-    # Otherwise fallback to the oldest allowed if comparator is >=.
-    MacOSVersion.new(HOMEBREW_MACOS_OLDEST_ALLOWED) if comparator == ">="
-  end
-
-  @comparator = comparator
-  super(tags.drop(1))
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #comparatorObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'requirements/macos_requirement.rb', line 10
-
-def comparator
-  @comparator
-end
-
-
- - - -
-

- - #versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'requirements/macos_requirement.rb', line 10
-
-def version
-  @version
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #allows?(other) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-
-
# File 'requirements/macos_requirement.rb', line 64
-
-def allows?(other)
-  return true unless version_specified?
-
-  case @comparator
-  when ">=" then other >= @version
-  when "<=" then other <= @version
-  else
-    return @version.include?(other) if @version.respond_to?(:to_ary)
-
-    @version == other
-  end
-end
-
-
- -
-

- - #display_sString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
-
# File 'requirements/macos_requirement.rb', line 118
-
-def display_s
-  if version_specified?
-    if @version.respond_to?(:to_ary)
-      "macOS #{@comparator} #{version.join(" / ")} (or Linux)"
-    else
-      "macOS #{@comparator} #{@version} (or Linux)"
-    end
-  else
-    "macOS"
-  end
-end
-
-
- -
-

- - #message(type: :formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
-
# File 'requirements/macos_requirement.rb', line 77
-
-def message(type: :formula)
-  return "macOS is required for this software." unless version_specified?
-
-  case @comparator
-  when ">="
-    "This software does not run on macOS versions older than #{@version.pretty_name}."
-  when "<="
-    case type
-    when :formula
-      <<~EOS
-        This formula either does not compile or function as expected on macOS
-        versions newer than #{@version.pretty_name} due to an upstream incompatibility.
-      EOS
-    when :cask
-      "This cask does not run on macOS versions newer than #{@version.pretty_name}."
-    end
-  else
-    if @version.respond_to?(:to_ary)
-      *versions, last = @version.map(&:pretty_name)
-      return "This software does not run on macOS versions other than #{versions.join(", ")} and #{last}."
-    end
-
-    "This software does not run on macOS versions other than #{@version.pretty_name}."
-  end
-end
-
-
- -
-

- - #to_json(options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-133
-134
-135
-
-
# File 'requirements/macos_requirement.rb', line 130
-
-def to_json(options)
-  comp = @comparator.to_s
-  return { comp => @version.map(&:to_s) }.to_json(options) if @version.is_a?(Array)
-
-  { comp => [@version.to_s] }.to_json(options)
-end
-
-
- -
-

- - #version_specified?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'requirements/macos_requirement.rb', line 51
-
-def version_specified?
-  @version.present?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/MacOSRunnerSpec.html b/docs/MacOSRunnerSpec.html deleted file mode 100644 index 690fdcfa8..000000000 --- a/docs/MacOSRunnerSpec.html +++ /dev/null @@ -1,696 +0,0 @@ - - - - - - - Class: MacOSRunnerSpec - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: MacOSRunnerSpec - - - Private -

-
- -
-
Inherits:
-
- T::Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
macos_runner_spec.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #cleanup ⇒ Boolean - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop cleanup.

    -
    - -
  • - - - -
  • - - - #name ⇒ String - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop name.

    -
    - -
  • - - - -
  • - - - #runner ⇒ String - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop runner.

    -
    - -
  • - - - -
  • - - - #timeout ⇒ Integer - - - - - - - - readonly - - - - - - - private - -

    Returns the value of prop timeout.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name:, runner:, timeout:, cleanup:) ⇒ void - - - - - -

-
- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - runner - - - (String) - - - -
  • - -
  • - - timeout - - - (Integer) - - - -
  • - -
  • - - cleanup - - - (Boolean) - - - -
  • - -
- - -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :name, String
-const :runner, String
-const :timeout, Integer
-const :cleanup, T::Boolean
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #cleanupBoolean (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop cleanup.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :cleanup, T::Boolean
-
-
- - - -
-

- - #nameString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop name.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :name, String
-
-
- - - -
-

- - #runnerString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop runner.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :runner, String
-
-
- - - -
-

- - #timeoutInteger (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of prop timeout.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File ''
-
-const :timeout, Integer
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #to_hHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-
-
# File 'macos_runner_spec.rb', line 11
-
-def to_h
-  {
-    name:,
-    runner:,
-    timeout:,
-    cleanup:,
-  }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/MacOSVersion.html b/docs/MacOSVersion.html deleted file mode 100644 index 373001e5d..000000000 --- a/docs/MacOSVersion.html +++ /dev/null @@ -1,1089 +0,0 @@ - - - - - - - Class: MacOSVersion - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: MacOSVersion - - - Private -

-
- -
-
Inherits:
-
- Version - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
macos_version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A macOS version.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Error - - -

- - -

- Constant Summary - collapse -

- -
- -
SYMBOLS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- -
- Note: -

When removing symbols here, ensure that they are added -to DEPRECATED_MACOS_VERSIONS in MacOSRequirement.

-
-
- - - -
-
-
- - -
-
-
{
-  sequoia:     "15",
-  sonoma:      "14",
-  ventura:     "13",
-  monterey:    "12",
-  big_sur:     "11",
-  catalina:    "10.15",
-  mojave:      "10.14",
-  high_sierra: "10.13",
-  sierra:      "10.12",
-  el_capitan:  "10.11",
-}.freeze
- -
NULL = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- -
- Note: -

Constructor needs to called with an arbitrary macOS-like version which is then set to nil.

-
-
- -

Represents the absence of a version.

- - -
-
-
- - -
-
-
MacOSVersion.new("10.0").tap { |v| v.instance_variable_set(:@version, nil) }.freeze
- -
- - - - - - -

Constants inherited - from Version

-

Version::NULL_TOKEN

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Version

-

#commit, #compare, detect, #detected_from_url?, formula_optionally_versioned_regex, #freeze, #head?, #major, #major_minor, #major_minor_patch, #minor, #null?, parse, #patch, #respond_to?, #to_f, #to_i, #to_json, #to_str, #update_commit

- -
-

Constructor Details

- -
-

- - #initialize(version) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (String, nil) - - - -
  • - -
- -

Raises:

- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'macos_version.rb', line 41
-
-def initialize(version)
-  raise MacOSVersion::Error, version unless /\A1\d+(?:\.\d+){0,2}\Z/.match?(version)
-
-  super(T.must(version))
-
-  @comparison_cache = {}
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_symbol(version) ⇒ T.attached_class - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (Symbol) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-38
-
-
# File 'macos_version.rb', line 35
-
-def self.from_symbol(version)
-  str = SYMBOLS.fetch(version) { raise MacOSVersion::Error, version }
-  new(str)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #outdated_release?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-110
-111
-112
-
-
# File 'macos_version.rb', line 110
-
-def outdated_release?
-  self < HOMEBREW_MACOS_OLDEST_SUPPORTED
-end
-
-
- -
-

- - #prerelease?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-115
-116
-117
-
-
# File 'macos_version.rb', line 115
-
-def prerelease?
-  self >= HOMEBREW_MACOS_NEWEST_UNSUPPORTED
-end
-
-
- -
-

- - #pretty_nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-94
-95
-96
-97
-98
-99
-100
-101
-102
-
-
# File 'macos_version.rb', line 94
-
-def pretty_name
-  return @pretty_name if defined?(@pretty_name)
-
-  pretty_name = to_sym.to_s.split("_").map(&:capitalize).join(" ").freeze
-
-  @pretty_name = pretty_name unless frozen?
-
-  pretty_name
-end
-
-
- -
-

- - #requires_nehalem_cpu?Boolean - - - - Also known as: - requires_sse4?, requires_sse41?, requires_sse42?, requires_popcnt? - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
-
# File 'macos_version.rb', line 125
-
-def requires_nehalem_cpu?
-  return false if null?
-
-  require "hardware"
-
-  return Hardware.oldest_cpu(self) == :nehalem if Hardware::CPU.intel?
-
-  raise ArgumentError, "Unexpected architecture: #{Hardware::CPU.arch}. This only works with Intel architecture."
-end
-
-
- -
-

- - #strip_patchT.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'macos_version.rb', line 71
-
-def strip_patch
-  return self if null?
-
-  # Big Sur is 11.x but Catalina is 10.15.x.
-  if T.must(major) >= 11
-    self.class.new(major.to_s)
-  else
-    major_minor
-  end
-end
-
-
- -
-

- - #to_symSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-83
-84
-85
-86
-87
-88
-89
-90
-91
-
-
# File 'macos_version.rb', line 83
-
-def to_sym
-  return @sym if defined?(@sym)
-
-  sym = SYMBOLS.invert.fetch(strip_patch.to_s, :dunno)
-
-  @sym = sym unless frozen?
-
-  sym
-end
-
-
- -
-

- - #unsupported_release?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-120
-121
-122
-
-
# File 'macos_version.rb', line 120
-
-def unsupported_release?
-  outdated_release? || prerelease?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/MacOSVersion/Error.html b/docs/MacOSVersion/Error.html deleted file mode 100644 index 043669351..000000000 --- a/docs/MacOSVersion/Error.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - Exception: MacOSVersion::Error - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: MacOSVersion::Error - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
macos_version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a macOS version is unsupported.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(version) ⇒ Error - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Error.

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-
-
# File 'macos_version.rb', line 13
-
-def initialize(version)
-  @version = version
-  super "unknown or unsupported macOS version: #{version.inspect}"
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #versionString, ... (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'macos_version.rb', line 11
-
-def version
-  @version
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/MacOSVersionErrorCompat.html b/docs/MacOSVersionErrorCompat.html deleted file mode 100644 index 7ed803804..000000000 --- a/docs/MacOSVersionErrorCompat.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - Module: MacOSVersionErrorCompat - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: MacOSVersionErrorCompat - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
macos_version.rbi
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - - - - - - - -

Method Summary

- -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
- - - -
- - \ No newline at end of file diff --git a/docs/MachOShim.html b/docs/MachOShim.html deleted file mode 100644 index 546b9435f..000000000 --- a/docs/MachOShim.html +++ /dev/null @@ -1,1639 +0,0 @@ - - - - - - - Module: MachOShim - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: MachOShim - - - Private -

-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
Kernel
-
- - - - -
-
Included in:
-
Pathname
-
- - - -
-
Defined in:
-
os/mac/mach.rb,
- os/mac/mach.rbi,
sorbet/rbi/parlour.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Instance Method Details

- - -
-

- - #archObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-133
-134
-135
-136
-
-
# File 'os/mac/mach.rb', line 130
-
-def arch
-  case archs.length
-  when 0 then :dunno
-  when 1 then archs.first
-  else :universal
-  end
-end
-
-
- -
-

- - #archsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-126
-127
-128
-
-
# File 'os/mac/mach.rb', line 126
-
-def archs
-  mach_data.map { |m| m.fetch :arch }
-end
-
-
- -
-

- - #change_dylib_id(id, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-78
-79
-80
-81
-
-
# File 'os/mac/mach.rb', line 78
-
-def change_dylib_id(id, **options)
-  macho.change_dylib_id(id, options)
-  macho.write!
-end
-
-
- -
-

- - #change_install_name(old, new, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-83
-84
-85
-86
-
-
# File 'os/mac/mach.rb', line 83
-
-def change_install_name(old, new, **options)
-  macho.change_install_name(old, new, options)
-  macho.write!
-end
-
-
- -
-

- - #change_rpath(old, new, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-73
-74
-75
-76
-
-
# File 'os/mac/mach.rb', line 73
-
-def change_rpath(old, new, **options)
-  macho.change_rpath(old, new, options)
-  macho.write!
-end
-
-
- -
-

- - #delete_rpath(rpath, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- TODO: -

See if the #write! call can be delayed until

-
-
- -

we know we're not making any changes to the rpaths.

- - -
-
-
- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'os/mac/mach.rb', line 60
-
-def delete_rpath(rpath, **options)
-  candidates = rpaths(resolve_variable_references: false).select do |r|
-    resolve_variable_name(r) == resolve_variable_name(rpath)
-  end
-
-  # Delete the last instance to avoid changing the order in which rpaths are searched.
-  rpath_to_delete = candidates.last
-  options[:last] = true
-
-  macho.delete_rpath(rpath_to_delete, options)
-  macho.write!
-end
-
-
- -
-

- - #dylib?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-158
-159
-160
-
-
# File 'os/mac/mach.rb', line 158
-
-def dylib?
-  mach_data.any? { |m| m.fetch(:type) == :dylib }
-end
-
-
- -
-

- - #dylib_id(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-237
-
-
# File 'sorbet/rbi/parlour.rbi', line 237
-
-def dylib_id(*args, **options, &block); end
-
-
- -
-

- - #dynamically_linked_libraries(except: :none, resolve_variable_references: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'os/mac/mach.rb', line 88
-
-def dynamically_linked_libraries(except: :none, resolve_variable_references: true)
-  lcs = macho.dylib_load_commands
-  lcs.reject! { |lc| lc.flag?(except) } if except != :none
-  names = lcs.map { |lc| lc.name.to_s }.uniq
-  names.map! { resolve_variable_name(_1) } if resolve_variable_references
-
-  names
-end
-
-
- -
-

- - #i386?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-142
-143
-144
-
-
# File 'os/mac/mach.rb', line 142
-
-def i386?
-  arch == :i386
-end
-
-
- -
-

- - #mach_o_bundle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-168
-169
-170
-
-
# File 'os/mac/mach.rb', line 168
-
-def mach_o_bundle?
-  mach_data.any? { |m| m.fetch(:type) == :bundle }
-end
-
-
- -
-

- - #mach_o_executable?Boolean - - - - Also known as: - binary_executable? - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-162
-163
-164
-
-
# File 'os/mac/mach.rb', line 162
-
-def mach_o_executable?
-  mach_data.any? { |m| m.fetch(:type) == :executable }
-end
-
-
- -
-

- - #ppc64?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-154
-155
-156
-
-
# File 'os/mac/mach.rb', line 154
-
-def ppc64?
-  arch == :ppc64
-end
-
-
- -
-

- - #ppc7400?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-150
-151
-152
-
-
# File 'os/mac/mach.rb', line 150
-
-def ppc7400?
-  arch == :ppc7400
-end
-
-
- -
-

- - #resolve_rpath(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-117
-118
-119
-120
-121
-122
-123
-124
-
-
# File 'os/mac/mach.rb', line 117
-
-def resolve_rpath(name)
-  target = T.let(nil, T.nilable(String))
-  return unless rpaths(resolve_variable_references: true).find do |rpath|
-    File.exist?(target = File.join(rpath, name.delete_prefix("@rpath")))
-  end
-
-  target
-end
-
-
- -
-

- - #resolve_variable_name(name, resolve_rpaths: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-
-
# File 'os/mac/mach.rb', line 105
-
-def resolve_variable_name(name, resolve_rpaths: true)
-  if name.start_with? "@loader_path"
-    Pathname(name.sub("@loader_path", dirname)).cleanpath.to_s
-  elsif name.start_with?("@executable_path") && binary_executable?
-    Pathname(name.sub("@executable_path", dirname)).cleanpath.to_s
-  elsif resolve_rpaths && name.start_with?("@rpath") && (target = resolve_rpath(name)).present?
-    target
-  else
-    name
-  end
-end
-
-
- -
-

- - #rpaths(resolve_variable_references: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-102
-103
-
-
# File 'os/mac/mach.rb', line 97
-
-def rpaths(resolve_variable_references: true)
-  names = macho.rpaths
-  # Don't recursively resolve rpaths to avoid infinite loops.
-  names.map! { |name| resolve_variable_name(name, resolve_rpaths: false) } if resolve_variable_references
-
-  names
-end
-
-
- -
-

- - #universal?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-138
-139
-140
-
-
# File 'os/mac/mach.rb', line 138
-
-def universal?
-  arch == :universal
-end
-
-
- -
-

- - #x86_64?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-146
-147
-148
-
-
# File 'os/mac/mach.rb', line 146
-
-def x86_64?
-  arch == :x86_64
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Mechanize.html b/docs/Mechanize.html deleted file mode 100644 index 25a2eb817..000000000 --- a/docs/Mechanize.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - Class: Mechanize - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Mechanize - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: HTTP - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Mechanize/HTTP.html b/docs/Mechanize/HTTP.html deleted file mode 100644 index 27b629a04..000000000 --- a/docs/Mechanize/HTTP.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - Class: Mechanize::HTTP - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Mechanize::HTTP - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: ContentDisposition, ContentDispositionParser - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Mechanize/HTTP/ContentDisposition.html b/docs/Mechanize/HTTP/ContentDisposition.html deleted file mode 100644 index bed753488..000000000 --- a/docs/Mechanize/HTTP/ContentDisposition.html +++ /dev/null @@ -1,769 +0,0 @@ - - - - - - - Class: Mechanize::HTTP::ContentDisposition - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Mechanize::HTTP::ContentDisposition - - - Private -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #creation_date ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute creation_date.

    -
    - -
  • - - - -
  • - - - #filename ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute filename.

    -
    - -
  • - - - -
  • - - - #modification_date ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute modification_date.

    -
    - -
  • - - - -
  • - - - #parameters ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute parameters.

    -
    - -
  • - - - -
  • - - - #read_date ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute read_date.

    -
    - -
  • - - - -
  • - - - #size ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute size.

    -
    - -
  • - - - -
  • - - - #type ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute type.

    -
    - -
  • - - -
- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #creation_dateObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute creation_date

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of creation_date

    -
    - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'download_strategy.rbi', line 10
-
-def creation_date
-  @creation_date
-end
-
-
- - - -
-

- - #filenameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute filename

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of filename

    -
    - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'download_strategy.rbi', line 10
-
-def filename
-  @filename
-end
-
-
- - - -
-

- - #modification_dateObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute modification_date

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of modification_date

    -
    - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'download_strategy.rbi', line 10
-
-def modification_date
-  @modification_date
-end
-
-
- - - -
-

- - #parametersObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute parameters

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of parameters

    -
    - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'download_strategy.rbi', line 10
-
-def parameters
-  @parameters
-end
-
-
- - - -
-

- - #read_dateObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute read_date

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of read_date

    -
    - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'download_strategy.rbi', line 10
-
-def read_date
-  @read_date
-end
-
-
- - - -
-

- - #sizeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute size

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of size

    -
    - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'download_strategy.rbi', line 10
-
-def size
-  @size
-end
-
-
- - - -
-

- - #typeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute type

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of type

    -
    - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'download_strategy.rbi', line 10
-
-def type
-  @type
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Mechanize/HTTP/ContentDispositionParser.html b/docs/Mechanize/HTTP/ContentDispositionParser.html deleted file mode 100644 index 3756f2d01..000000000 --- a/docs/Mechanize/HTTP/ContentDispositionParser.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - Class: Mechanize::HTTP::ContentDispositionParser - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Mechanize::HTTP::ContentDispositionParser - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rbi
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #parse(content_disposition, header = false) ⇒ Mechanize::HTTP::ContentDisposition? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - content_disposition - - - (String) - - - -
  • - -
  • - - header - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-21
-
-
# File 'download_strategy.rbi', line 21
-
-def parse(content_disposition, header = false); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/MercurialDownloadStrategy.html b/docs/MercurialDownloadStrategy.html deleted file mode 100644 index 25f44517f..000000000 --- a/docs/MercurialDownloadStrategy.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - - Class: MercurialDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: MercurialDownloadStrategy - - - -

-
- -
-
Inherits:
-
- VCSDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a Mercurial repository.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from VCSDownloadStrategy

-

VCSDownloadStrategy::REF_TYPES

- - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from VCSDownloadStrategy

-

#commit_outdated?, #fetch, #fetch_last_commit, #head?

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #quiet!, #quiet?, #shutup!, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ MercurialDownloadStrategy - - - - - -

-
-

Returns a new instance of MercurialDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-1239
-1240
-1241
-1242
-
-
# File 'download_strategy.rb', line 1239
-
-def initialize(url, name, version, **meta)
-  super
-  @url = @url.sub(%r{^hg://}, "")
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #last_commitString - - - - - -

-
-

Return last commit's unique identifier for the repository.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1259
-1260
-1261
-1262
-
-
# File 'download_strategy.rb', line 1259
-
-def last_commit
-  out, = silent_command("hg", args: ["parent", "--template", "{node|short}", "-R", cached_location])
-  out.chomp
-end
-
-
- -
-

- - #source_modified_timeTime - - - - - -

-
-

Returns the most recent modified time for all files in the current working directory after stage.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-1248
-1249
-1250
-1251
-1252
-1253
-
-
# File 'download_strategy.rb', line 1248
-
-def source_modified_time
-  out, = silent_command("hg",
-                        args: ["tip", "--template", "{date|isodate}", "-R", cached_location])
-
-  Time.parse(out)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Messages.html b/docs/Messages.html deleted file mode 100644 index 9e46088b1..000000000 --- a/docs/Messages.html +++ /dev/null @@ -1,944 +0,0 @@ - - - - - - - Class: Messages - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Messages - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
messages.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A Messages object collects messages that may need to be displayed together -at the end of a multi-step brew command run.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-
-
# File 'messages.rb', line 17
-
-def initialize
-  @caveats = T.let([], T::Array[T::Hash[Symbol, Symbol]])
-  @package_count = T.let(0, Integer)
-  @install_times = T.let([], T::Array[T::Hash[String, Float]])
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #caveatsArray<Hash{Symbol => Symbol}> (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'messages.rb', line 8
-
-def caveats
-  @caveats
-end
-
-
- - - -
-

- - #install_timesArray<Hash{String => Float}> (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'messages.rb', line 14
-
-def install_times
-  @install_times
-end
-
-
- - - -
-

- - #package_countInteger (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'messages.rb', line 11
-
-def package_count
-  @package_count
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #display_caveats(force: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - force - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'messages.rb', line 41
-
-def display_caveats(force: false)
-  return if @package_count.zero?
-  return if @package_count == 1 && !force
-  return if @caveats.empty?
-
-  oh1 "Caveats"
-  @caveats.each do |c|
-    ohai c[:package], c[:caveats]
-  end
-end
-
-
- -
-

- - #display_install_timesvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'messages.rb', line 53
-
-def display_install_times
-  return if install_times.empty?
-
-  oh1 "Installation times"
-  install_times.each do |t|
-    puts format("%<package>-20s %<time>10.3f s", t)
-  end
-end
-
-
- -
-

- - #display_messages(force_caveats: false, display_times: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - force_caveats - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - display_times - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-35
-36
-37
-38
-
-
# File 'messages.rb', line 35
-
-def display_messages(force_caveats: false, display_times: false)
-  display_caveats(force: force_caveats)
-  display_install_times if display_times
-end
-
-
- -
-

- - #package_installed(package, elapsed_time) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - package - - - (String) - - - -
  • - -
  • - - elapsed_time - - - (Float) - - - -
  • - -
- - -
- - - - -
-
-
-
-29
-30
-31
-32
-
-
# File 'messages.rb', line 29
-
-def package_installed(package, elapsed_time)
-  @package_count += 1
-  @install_times.push(package:, time: elapsed_time)
-end
-
-
- -
-

- - #record_caveats(package, caveats) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'messages.rb', line 24
-
-def record_caveats(package, caveats)
-  @caveats.push(package:, caveats:)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Metafiles.html b/docs/Metafiles.html deleted file mode 100644 index b2f1104a6..000000000 --- a/docs/Metafiles.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - Module: Metafiles - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Metafiles - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
metafiles.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper for checking if a file is considered a metadata file.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
LICENSES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Set.new(%w[copying copyright license licence]).freeze
- -
EXTENSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

https://github.com/github/markup#markups

- - -
-
-
- - -
-
-
Set.new(%w[
-  .adoc .asc .asciidoc .creole .html .markdown .md .mdown .mediawiki .mkdn
-  .org .pod .rdoc .rst .rtf .textile .txt .wiki
-]).freeze
- -
BASENAMES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Set.new(%w[about authors changelog changes history news notes notice readme todo]).freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .copy?(file) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'metafiles.rb', line 22
-
-def copy?(file)
-  file = file.downcase
-  return true if LICENSES.include? file.split(/\.|-/).first
-
-  ext  = File.extname(file)
-  file = File.basename(file, ext) if EXTENSIONS.include?(ext)
-  BASENAMES.include?(file)
-end
-
-
- -
-

- - .list?(file) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-
-
# File 'metafiles.rb', line 16
-
-def list?(file)
-  return false if %w[.DS_Store INSTALL_RECEIPT.json].include?(file)
-
-  !copy?(file)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Method.html b/docs/Method.html deleted file mode 100644 index c707c52d4..000000000 --- a/docs/Method.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - Class: Method - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Method - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/object/duplicable.rb
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #duplicable?false - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Methods are not duplicable:

- -
method(:puts).duplicable? # => false
-method(:puts).dup         # => TypeError: allocator undefined for Method
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (false) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-
-
# File 'extend/object/duplicable.rb', line 45
-
-def duplicable? = false
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/MethodDeprecatedError.html b/docs/MethodDeprecatedError.html deleted file mode 100644 index a9d379305..000000000 --- a/docs/MethodDeprecatedError.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - Exception: MethodDeprecatedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: MethodDeprecatedError - - - Private -

-
- -
-
Inherits:
-
- StandardError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a deprecated method is used.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - - -
-

Instance Attribute Details

- - - -
-

- - #issues_urlObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-82
-83
-84
-
-
# File 'exceptions.rb', line 82
-
-def issues_url
-  @issues_url
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Migrator.html b/docs/Migrator.html deleted file mode 100644 index 3523aaf4c..000000000 --- a/docs/Migrator.html +++ /dev/null @@ -1,3614 +0,0 @@ - - - - - - - Class: Migrator - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Migrator - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - -
-
Includes:
-
Context
-
- - - - - - -
-
Defined in:
-
migrator.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for migrating a formula from an old to a new name.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: MigrationNeededError, MigratorDifferentTapsError, MigratorNoOldpathError - - -

- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(formula, oldname, force: false) ⇒ Migrator - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Migrator.

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-
-
# File 'migrator.rb', line 123
-
-def initialize(formula, oldname, force: false)
-  @oldname = oldname
-  @newname = formula.name
-
-  @formula = formula
-  @old_cellar = HOMEBREW_CELLAR/oldname
-  raise MigratorNoOldpathError, oldname unless old_cellar.exist?
-
-  @old_tabs = old_cellar.subdirs.map { |d| Keg.new(d).tab }
-  @old_tap = old_tabs.first.tap
-
-  raise MigratorDifferentTapsError.new(formula, oldname, old_tap) if !force && !from_same_tap_user?
-
-  @new_cellar = HOMEBREW_CELLAR/formula.name
-  @new_cellar_existed = @new_cellar.exist?
-
-  @old_linked_kegs = linked_old_linked_kegs
-  @old_full_linked_kegs = []
-  @old_opt_records = []
-  old_linked_kegs.each do |old_linked_keg|
-    @old_full_linked_kegs << old_linked_keg if old_linked_keg.linked?
-    @old_opt_records << old_linked_keg.opt_record if old_linked_keg.optlinked?
-  end
-  unless old_linked_kegs.empty?
-    @new_linked_keg_record = HOMEBREW_CELLAR/"#{newname}/#{File.basename(old_linked_kegs.first)}"
-  end
-
-  @old_pin_record = HOMEBREW_PINNED_KEGS/oldname
-  @new_pin_record = HOMEBREW_PINNED_KEGS/newname
-  @pinned = old_pin_record.symlink?
-  @old_pin_link_record = old_pin_record.readlink if @pinned
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #formulaObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Instance of renamed formula.

- - -
-
-
- - -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'migrator.rb', line 47
-
-def formula
-  @formula
-end
-
-
- - - -
-

- - #new_cellarObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to newname cellar according to new name.

- - -
-
-
- - -
- - - - -
-
-
-
-80
-81
-82
-
-
# File 'migrator.rb', line 80
-
-def new_cellar
-  @new_cellar
-end
-
-
- - - -
-

- - #new_cellar_existedObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if new cellar existed at initialization time.

- - -
-
-
- - -
- - - - -
-
-
-
-83
-84
-85
-
-
# File 'migrator.rb', line 83
-
-def new_cellar_existed
-  @new_cellar_existed
-end
-
-
- - - -
-

- - #new_linked_keg_recordObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to newname keg that will be linked if old_linked_keg isn't nil.

- - -
-
-
- - -
- - - - -
-
-
-
-89
-90
-91
-
-
# File 'migrator.rb', line 89
-
-def new_linked_keg_record
-  @new_linked_keg_record
-end
-
-
- - - -
-

- - #new_pin_recordObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to newname pin.

- - -
-
-
- - -
- - - - -
-
-
-
-86
-87
-88
-
-
# File 'migrator.rb', line 86
-
-def new_pin_record
-  @new_pin_record
-end
-
-
- - - -
-

- - #newnameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

New name of the formula.

- - -
-
-
- - -
- - - - -
-
-
-
-77
-78
-79
-
-
# File 'migrator.rb', line 77
-
-def newname
-  @newname
-end
-
-
- - - -
-

- - #old_cellarObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to oldname's cellar.

- - -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'migrator.rb', line 53
-
-def old_cellar
-  @old_cellar
-end
-
-
- - - -
-

- - #old_full_linked_kegsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Oldname linked kegs that were fully linked.

- - -
-
-
- - -
- - - - -
-
-
-
-65
-66
-67
-
-
# File 'migrator.rb', line 65
-
-def old_full_linked_kegs
-  @old_full_linked_kegs
-end
-
-
- - - -
-

- - #old_linked_kegsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Oldname linked kegs.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'migrator.rb', line 62
-
-def old_linked_kegs
-  @old_linked_kegs
-end
-
-
- - - -
-

- - #old_opt_recordsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to oldname opt.

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'migrator.rb', line 59
-
-def old_opt_records
-  @old_opt_records
-end
-
-
- - - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Resolved path to oldname pin.

- - -
-
-
- - -
- - - - -
-
-
-
-74
-75
-76
-
-
# File 'migrator.rb', line 74
-
-def old_pin_link_record
-  @old_pin_link_record
-end
-
-
- - - -
-

- - #old_pin_recordObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to oldname pin.

- - -
-
-
- - -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'migrator.rb', line 56
-
-def old_pin_record
-  @old_pin_record
-end
-
-
- - - -
-

- - #old_tabsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Tabs from oldname kegs.

- - -
-
-
- - -
- - - - -
-
-
-
-68
-69
-70
-
-
# File 'migrator.rb', line 68
-
-def old_tabs
-  @old_tabs
-end
-
-
- - - -
-

- - #old_tapObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Tap of the old name.

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'migrator.rb', line 71
-
-def old_tap
-  @old_tap
-end
-
-
- - - -
-

- - #oldnameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Old name of the formula.

- - -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'migrator.rb', line 50
-
-def oldname
-  @oldname
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .migrate_if_needed(formula, force:, dry_run: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-
-
# File 'migrator.rb', line 105
-
-def self.migrate_if_needed(formula, force:, dry_run: false)
-  oldnames = Migrator.oldnames_needing_migration(formula)
-
-  begin
-    oldnames.each do |oldname|
-      if dry_run
-        oh1 "Would migrate formula #{Formatter.identifier(oldname)} to #{Formatter.identifier(formula.name)}"
-        next
-      end
-
-      migrator = Migrator.new(formula, oldname, force:)
-      migrator.migrate
-    end
-  rescue => e
-    onoe e
-  end
-end
-
-
- -
-

- - .needs_migration?(formula) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'migrator.rb', line 101
-
-def self.needs_migration?(formula)
-  !oldnames_needing_migration(formula).empty?
-end
-
-
- -
-

- - .oldnames_needing_migration(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-91
-92
-93
-94
-95
-96
-97
-98
-99
-
-
# File 'migrator.rb', line 91
-
-def self.oldnames_needing_migration(formula)
-  formula.oldnames.select do |oldname|
-    oldname_rack = HOMEBREW_CELLAR/oldname
-    next false if oldname_rack.symlink?
-    next false unless oldname_rack.directory?
-
-    true
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #backup_old_tabsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-456
-457
-458
-
-
# File 'migrator.rb', line 456
-
-def backup_old_tabs
-  old_tabs.each(&:write)
-end
-
-
- -
-

- - #backup_oldnameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Backup everything if errors occur while migrating.

- - -
-
-
- - -
- - - - -
-
-
-
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-
-
# File 'migrator.rb', line 413
-
-def backup_oldname
-  unlink_oldname_opt
-  unlink_oldname_cellar
-  backup_oldname_cellar
-  backup_old_tabs
-
-  if pinned? && !old_pin_record.symlink?
-    src_oldname = (old_pin_record.dirname/old_pin_link_record).expand_path
-    old_pin_record.make_relative_symlink(src_oldname)
-    new_pin_record.delete
-  end
-
-  if new_cellar.exist?
-    new_cellar.subdirs.each do |d|
-      newname_keg = Keg.new(d)
-      newname_keg.unlink(verbose: verbose?)
-      newname_keg.uninstall unless new_cellar_existed
-    end
-  end
-
-  return if old_linked_kegs.empty?
-
-  # The keg used to be linked and when we backup everything we restore
-  # Cellar/oldname, the target also gets restored, so we are able to
-  # create a keg using its old path
-  old_full_linked_kegs.each do |old_linked_keg|
-    old_linked_keg.link(verbose: verbose?)
-  rescue Keg::LinkError
-    old_linked_keg.unlink(verbose: verbose?)
-    raise
-  rescue Keg::AlreadyLinkedError
-    old_linked_keg.unlink(verbose: verbose?)
-    retry
-  end
-  (old_linked_kegs - old_full_linked_kegs).each do |old_linked_keg|
-    old_linked_keg.optlink(verbose: verbose?)
-  end
-end
-
-
- -
-

- - #backup_oldname_cellarObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-452
-453
-454
-
-
# File 'migrator.rb', line 452
-
-def backup_oldname_cellar
-  FileUtils.mv(new_cellar, old_cellar) unless old_cellar.exist?
-end
-
-
- -
-

- - #fix_tabsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Fix INSTALL_RECEIPTs for tap-migrated formula.

- - -
-
-
- - -
- - - - -
-
-
-
-157
-158
-159
-160
-161
-162
-
-
# File 'migrator.rb', line 157
-
-def fix_tabs
-  old_tabs.each do |tab|
-    tab.tap = formula.tap
-    tab.write
-  end
-end
-
-
- -
-

- - #from_same_tap_user?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-
-
# File 'migrator.rb', line 165
-
-def from_same_tap_user?
-  formula_tap_user = formula.tap.user if formula.tap
-  old_tap_user = nil
-
-  new_tap = if old_tap
-    old_tap_user, = old_tap.user
-    if (migrate_tap = old_tap.tap_migrations[oldname])
-      new_tap_user, new_tap_repo = migrate_tap.split("/")
-      "#{new_tap_user}/#{new_tap_repo}"
-    end
-  end
-
-  if formula_tap_user == old_tap_user
-    true
-  # Homebrew didn't use to update tabs while performing tap-migrations,
-  # so there can be `INSTALL_RECEIPT`s containing wrong information about tap,
-  # so we check if there is an entry about oldname migrated to tap and if
-  # newname's tap is the same as tap to which oldname migrated, then we
-  # can perform migrations and the taps for oldname and newname are the same.
-  elsif formula.tap && old_tap && formula.tap == new_tap
-    fix_tabs
-    true
-  else
-    false
-  end
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-
-
# File 'migrator.rb', line 323
-
-def link_newname
-  oh1 "Relinking #{Formatter.identifier(newname)}"
-  new_keg = Keg.new(new_linked_keg_record)
-
-  # If old_keg wasn't linked then we just optlink a keg.
-  # If old keg wasn't optlinked and linked, we don't call this method at all.
-  # If formula is keg-only we also optlink it.
-  if formula.keg_only? || old_full_linked_kegs.empty?
-    begin
-      new_keg.optlink(verbose: verbose?)
-    rescue Keg::LinkError => e
-      onoe "Failed to create #{formula.opt_prefix}"
-      raise
-    end
-    return
-  end
-
-  new_keg.remove_linked_keg_record if new_keg.linked?
-
-  begin
-    new_keg.link(overwrite: true, verbose: verbose?)
-  rescue Keg::ConflictError => e
-    onoe "The `brew link` step did not complete successfully."
-    puts e
-    puts
-    puts "Possible conflicting files are:"
-    new_keg.link(dry_run: true, overwrite: true, verbose: verbose?)
-    raise
-  rescue Keg::LinkError => e
-    onoe "The `brew link` step did not complete successfully."
-    puts e
-    puts
-    puts "You can try again using:"
-    puts "  brew link #{formula.name}"
-  rescue Exception => e # rubocop:disable Lint/RescueException
-    onoe "An unexpected error occurred during linking"
-    puts e
-    puts Utils::Backtrace.clean(e) if debug?
-    ignore_interrupts { new_keg.unlink(verbose: verbose?) }
-    raise
-  end
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Remove Cellar/oldname if it exists.

- - -
-
-
- - -
- - - - -
-
-
-
-399
-400
-401
-402
-
-
# File 'migrator.rb', line 399
-
-def link_oldname_cellar
-  old_cellar.delete if old_cellar.symlink? || old_cellar.exist?
-  old_cellar.make_relative_symlink(formula.rack)
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Link keg to opt if it was linked before migrating.

- - -
-
-
- - -
- - - - -
-
-
-
-367
-368
-369
-370
-371
-372
-
-
# File 'migrator.rb', line 367
-
-def link_oldname_opt
-  old_opt_records.each do |old_opt_record|
-    old_opt_record.delete if old_opt_record.symlink?
-    old_opt_record.make_relative_symlink(new_linked_keg_record)
-  end
-end
-
-
- -
-

- - #linked_old_linked_kegsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-192
-193
-194
-195
-196
-197
-198
-
-
# File 'migrator.rb', line 192
-
-def linked_old_linked_kegs
-  keg_dirs = []
-  keg_dirs += new_cellar.subdirs if new_cellar.exist?
-  keg_dirs += old_cellar.subdirs
-  kegs = keg_dirs.map { |d| Keg.new(d) }
-  kegs.select { |keg| keg.linked? || keg.optlinked? }
-end
-
-
- -
-

- - #lockObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-460
-461
-462
-463
-464
-465
-
-
# File 'migrator.rb', line 460
-
-def lock
-  @newname_lock = FormulaLock.new newname
-  @oldname_lock = FormulaLock.new oldname
-  @newname_lock.lock
-  @oldname_lock.lock
-end
-
-
- -
-

- - #merge_directory(directory) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-
-
# File 'migrator.rb', line 257
-
-def merge_directory(directory)
-  directory.each_child do |c|
-    new_path = new_cellar/c.relative_path_from(old_cellar)
-
-    if c.directory? && !c.symlink? && new_path.exist?
-      merge_directory(c)
-      c.unlink
-    else
-      FileUtils.mv(c, new_path)
-    end
-  end
-end
-
-
- -
-

- - #migrateObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-
-
# File 'migrator.rb', line 204
-
-def migrate
-  oh1 "Migrating formula #{Formatter.identifier(oldname)} to #{Formatter.identifier(newname)}"
-  lock
-  unlink_oldname
-  unlink_newname if new_cellar.exist?
-  repin
-  move_to_new_directory
-  link_oldname_cellar
-  link_oldname_opt
-  link_newname unless old_linked_kegs.empty?
-  update_tabs
-  return unless formula.outdated?
-
-  opoo <<~EOS
-    #{Formatter.identifier(newname)} is outdated!
-    To avoid broken installations, as soon as possible please run:
-      brew upgrade
-    Or, if you're OK with a less reliable fix:
-      brew upgrade #{newname}
-  EOS
-rescue Interrupt
-  ignore_interrupts { backup_oldname }
-rescue Exception => e # rubocop:disable Lint/RescueException
-  onoe "The migration did not complete successfully."
-  puts e
-  puts Utils::Backtrace.clean(e) if debug?
-  puts "Backing up..."
-  ignore_interrupts { backup_oldname }
-ensure
-  unlock
-end
-
-
- -
-

- - #move_to_new_directoryObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Move everything from Cellar/oldname to Cellar/newname.

- - -
-
-
- - -
- - - - -
-
-
-
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-
-
# File 'migrator.rb', line 271
-
-def move_to_new_directory
-  return unless old_cellar.exist?
-
-  if new_cellar.exist?
-    conflicted = remove_conflicts(old_cellar)
-    odie "Remove #{new_cellar} and #{old_cellar} manually and run `brew reinstall #{newname}`." if conflicted
-  end
-
-  oh1 "Moving #{Formatter.identifier(oldname)} versions to #{new_cellar}"
-  if new_cellar.exist?
-    merge_directory(old_cellar)
-  else
-    FileUtils.mv(old_cellar, new_cellar)
-  end
-end
-
-
- -
-

- - #pinned?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-200
-201
-202
-
-
# File 'migrator.rb', line 200
-
-def pinned?
-  @pinned
-end
-
-
- -
-

- - #remove_conflicts(directory) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-
-
# File 'migrator.rb', line 236
-
-def remove_conflicts(directory)
-  conflicted = T.let(false, T::Boolean)
-
-  directory.each_child do |c|
-    if c.directory? && !c.symlink?
-      conflicted ||= remove_conflicts(c)
-    else
-      next unless (new_cellar/c.relative_path_from(old_cellar)).exist?
-
-      begin
-        FileUtils.rm_rf c
-      rescue Errno::EACCES
-        conflicted = true
-        onoe "#{new_cellar/c.basename} already exists."
-      end
-    end
-  end
-
-  conflicted
-end
-
-
- -
-

- - #repinObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-
-
# File 'migrator.rb', line 287
-
-def repin
-  return unless pinned?
-
-  # `old_pin_record` is a relative symlink and when we try to to read it
-  # from <dir> we actually try to find file
-  # <dir>/../<...>/../Cellar/name/version.
-  # To repin formula we need to update the link thus that it points to
-  # the right directory.
-  #
-  # NOTE: `old_pin_record.realpath.sub(oldname, newname)` is unacceptable
-  # here, because it resolves every symlink for `old_pin_record` and then
-  # substitutes oldname with newname. It breaks things like
-  # `Pathname#make_relative_symlink`, where `Pathname#relative_path_from`
-  # is used to find the relative path from source to destination parent
-  # and it assumes no symlinks.
-  src_oldname = (old_pin_record.dirname/old_pin_link_record).expand_path
-  new_pin_record.make_relative_symlink(src_oldname.sub(oldname, newname))
-  old_pin_record.delete
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-315
-316
-317
-318
-319
-320
-321
-
-
# File 'migrator.rb', line 315
-
-def unlink_newname
-  oh1 "Temporarily unlinking #{Formatter.identifier(newname)}"
-  new_cellar.subdirs.each do |d|
-    keg = Keg.new(d)
-    keg.unlink(verbose: verbose?)
-  end
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-307
-308
-309
-310
-311
-312
-313
-
-
# File 'migrator.rb', line 307
-
-def unlink_oldname
-  oh1 "Unlinking #{Formatter.identifier(oldname)}"
-  old_cellar.subdirs.each do |d|
-    keg = Keg.new(d)
-    keg.unlink(verbose: verbose?)
-  end
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Remove Cellar/oldname link if it belongs to newname.

- - -
-
-
- - -
- - - - -
-
-
-
-405
-406
-407
-408
-409
-410
-
-
# File 'migrator.rb', line 405
-
-def unlink_oldname_cellar
-  if (old_cellar.symlink? && !old_cellar.exist?) ||
-     (old_cellar.symlink? && formula.rack.exist? && formula.rack.realpath == old_cellar.realpath)
-    old_cellar.unlink
-  end
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Remove opt/oldname link if it belongs to newname.

- - -
-
-
- - -
- - - - -
-
-
-
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-
-
# File 'migrator.rb', line 385
-
-def unlink_oldname_opt
-  return unless new_linked_keg_record.exist?
-
-  old_opt_records.each do |old_opt_record|
-    next unless old_opt_record.symlink?
-    next unless old_opt_record.exist?
-    next if new_linked_keg_record.realpath != old_opt_record.realpath
-
-    old_opt_record.unlink
-    old_opt_record.parent.rmdir_if_possible
-  end
-end
-
-
- -
-

- - #unlockObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-467
-468
-469
-470
-
-
# File 'migrator.rb', line 467
-
-def unlock
-  @newname_lock.unlock
-  @oldname_lock.unlock
-end
-
-
- -
-

- - #update_tabsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

After migration every INSTALL_RECEIPT.json has the wrong path to the formula -so we must update INSTALL_RECEIPTs.

- - -
-
-
- - -
- - - - -
-
-
-
-376
-377
-378
-379
-380
-381
-382
-
-
# File 'migrator.rb', line 376
-
-def update_tabs
-  new_tabs = new_cellar.subdirs.map { |d| Keg.new(d).tab }
-  new_tabs.each do |tab|
-    tab.source["path"] = formula.path.to_s if tab.source["path"]
-    tab.write
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Migrator/MigrationNeededError.html b/docs/Migrator/MigrationNeededError.html deleted file mode 100644 index 1d2d3aeac..000000000 --- a/docs/Migrator/MigrationNeededError.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - Exception: Migrator::MigrationNeededError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Migrator::MigrationNeededError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
migrator.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error for when a migration is necessary.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(oldname, newname) ⇒ MigrationNeededError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of MigrationNeededError.

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-
-
# File 'migrator.rb', line 14
-
-def initialize(oldname, newname)
-  super <<~EOS
-    #{oldname} was renamed to #{newname} and needs to be migrated by running:
-      brew migrate #{oldname}
-  EOS
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Migrator/MigratorDifferentTapsError.html b/docs/Migrator/MigratorDifferentTapsError.html deleted file mode 100644 index 49066c063..000000000 --- a/docs/Migrator/MigratorDifferentTapsError.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - Exception: Migrator::MigratorDifferentTapsError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Migrator::MigratorDifferentTapsError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
migrator.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error for when a formula is migrated to a different tap without explicitly using its fully-qualified name.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula, oldname, tap) ⇒ MigratorDifferentTapsError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of MigratorDifferentTapsError.

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-
-
# File 'migrator.rb', line 31
-
-def initialize(formula, oldname, tap)
-  msg = if tap.core_tap?
-    "Please try to use #{oldname} to refer to the formula.\n"
-  elsif tap
-    "Please try to use fully-qualified #{tap}/#{oldname} to refer to the formula.\n"
-  end
-
-  super <<~EOS
-    #{formula.name} from #{formula.tap} is given, but old name #{oldname} was installed from #{tap || "path or url"}.
-    #{msg}To force migration, run:
-      brew migrate --force #{oldname}
-  EOS
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Migrator/MigratorNoOldpathError.html b/docs/Migrator/MigratorNoOldpathError.html deleted file mode 100644 index 668b42cba..000000000 --- a/docs/Migrator/MigratorNoOldpathError.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Exception: Migrator::MigratorNoOldpathError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Migrator::MigratorNoOldpathError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
migrator.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error for when the old name's path does not exist.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(oldname) ⇒ MigratorNoOldpathError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of MigratorNoOldpathError.

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'migrator.rb', line 24
-
-def initialize(oldname)
-  super "#{HOMEBREW_CELLAR/oldname} doesn't exist."
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/MissingApplyError.html b/docs/MissingApplyError.html deleted file mode 100644 index 6eb49d18a..000000000 --- a/docs/MissingApplyError.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - Exception: MissingApplyError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: MissingApplyError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a single patch file is not found and apply hasn't been specified.

- - -
-
-
- - -
- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Mktemp.html b/docs/Mktemp.html deleted file mode 100644 index 3e069720f..000000000 --- a/docs/Mktemp.html +++ /dev/null @@ -1,752 +0,0 @@ - - - - - - - Class: Mktemp - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Mktemp - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils
-
- - - - - - -
-
Defined in:
-
mktemp.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Performs Formula#mktemp's functionality and tracks the results. -Each instance is only intended to be used once.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #tmpdir ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Path to the tmpdir used in this run, as a Pathname.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(prefix, opts = {}) ⇒ Mktemp - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Mktemp.

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-
-
# File 'mktemp.rb', line 12
-
-def initialize(prefix, opts = {})
-  @prefix = prefix
-  @retain_in_cache = opts[:retain_in_cache]
-  @retain = opts[:retain] || @retain_in_cache
-  @quiet = false
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #tmpdirObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to the tmpdir used in this run, as a Pathname.

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'mktemp.rb', line 10
-
-def tmpdir
-  @tmpdir
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #quiet!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Instructs this Mktemp to not emit messages when retention is triggered.

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'mktemp.rb', line 37
-
-def quiet!
-  @quiet = true
-end
-
-
- -
-

- - #retain!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Instructs this Mktemp to retain the staged files.

- - -
-
-
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'mktemp.rb', line 21
-
-def retain!
-  @retain = true
-end
-
-
- -
-

- - #retain?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if the staged temporary files should be retained.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'mktemp.rb', line 26
-
-def retain?
-  @retain
-end
-
-
- -
-

- - #retain_in_cache?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

True if the source files should be retained.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'mktemp.rb', line 31
-
-def retain_in_cache?
-  @retain_in_cache
-end
-
-
- -
-

- - #runObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-
-
# File 'mktemp.rb', line 46
-
-def run
-  prefix_name = @prefix.tr "@", "AT"
-  @tmpdir = if retain_in_cache?
-    tmp_dir = HOMEBREW_CACHE/"Sources/#{prefix_name}"
-    chmod_rm_rf(tmp_dir) # clear out previous staging directory
-    tmp_dir.mkpath
-    tmp_dir
-  else
-    Pathname.new(Dir.mktmpdir("#{prefix_name}-", HOMEBREW_TEMP))
-  end
-
-  # Make sure files inside the temporary directory have the same group as the
-  # brew instance.
-  #
-  # Reference from `man 2 open`
-  # > When a new file is created, it is given the group of the directory which
-  # contains it.
-  group_id = if HOMEBREW_BREW_FILE.grpowned?
-    HOMEBREW_BREW_FILE.stat.gid
-  else
-    Process.gid
-  end
-  begin
-    chown(nil, group_id, @tmpdir)
-  rescue Errno::EPERM
-    opoo "Failed setting group \"#{T.must(Etc.getgrgid(group_id)).name}\" on #{@tmpdir}"
-  end
-
-  begin
-    Dir.chdir(tmpdir) { yield self }
-  ensure
-    ignore_interrupts { chmod_rm_rf(@tmpdir) } unless retain?
-  end
-ensure
-  if retain? && @tmpdir.present? && !@quiet
-    message = retain_in_cache? ? "Source files for debugging available at:" : "Temporary files retained at:"
-    ohai message, @tmpdir.to_s
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Module.html b/docs/Module.html deleted file mode 100644 index af7485a77..000000000 --- a/docs/Module.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - Class: Module - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Module - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/module.rb,
- extend/object/deep_dup.rb
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- -
    - - -
  • - - - #deep_dup ⇒ T.self_type - - - - - - - - - - private - -

    Returns a copy of module or class if it's anonymous.

    -
    - -
  • - - -
- - - - - - - - - - -
-

Instance Method Details

- - -
-

- - #deep_dupT.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a copy of module or class if it's anonymous. If it's -named, returns +self+.

- -

Object.deep_dup == Object # => true - klass = Class.new - klass.deep_dup == klass # => false

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-76
-
-
# File 'extend/object/deep_dup.rb', line 70
-
-def deep_dup
-  if name.nil?
-    super
-  else
-    self
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/MultipleVersionsInstalledError.html b/docs/MultipleVersionsInstalledError.html deleted file mode 100644 index c949a39a5..000000000 --- a/docs/MultipleVersionsInstalledError.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - Exception: MultipleVersionsInstalledError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: MultipleVersionsInstalledError - - - -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- - - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/NilClass.html b/docs/NilClass.html deleted file mode 100644 index 0ece973d4..000000000 --- a/docs/NilClass.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - Class: NilClass - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: NilClass - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/blank.rb
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #blank?true - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

nil is blank:

- -
nil.blank? # => true
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (true) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-
-
# File 'extend/blank.rb', line 59
-
-def blank? = true
-
-
- -
-

- - #present?false - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (false) - - - -
  • - -
- -
- - - - -
-
-
-
-62
-
-
# File 'extend/blank.rb', line 62
-
-def present? = false # :nodoc:
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/NoSuchKegError.html b/docs/NoSuchKegError.html deleted file mode 100644 index d308bb4cd..000000000 --- a/docs/NoSuchKegError.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - Exception: NoSuchKegError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: NoSuchKegError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a keg doesn't exist.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #name ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name) ⇒ NoSuchKegError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of NoSuchKegError.

- - -
-
-
- - -
- - - - -
-
-
-
-61
-62
-63
-64
-
-
# File 'exceptions.rb', line 61
-
-def initialize(name)
-  @name = name
-  super "No such keg: #{HOMEBREW_CELLAR}/#{name}"
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'exceptions.rb', line 59
-
-def name
-  @name
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/NoUnzipCurlDownloadStrategy.html b/docs/NoUnzipCurlDownloadStrategy.html deleted file mode 100644 index badeb3f7d..000000000 --- a/docs/NoUnzipCurlDownloadStrategy.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - - Class: NoUnzipCurlDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: NoUnzipCurlDownloadStrategy - - - -

-
- -
-
Inherits:
-
- CurlDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading archives without automatically extracting them. -(Useful for downloading .jar files.)

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from CurlDownloadStrategy

-

#mirrors

- - - -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from CurlDownloadStrategy

-

#clear_cache, #fetch, #initialize, #resolved_time_file_size

- - - - - - - - - -

Methods included from Utils::Curl

-

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_with_workarounds, http_status_ok?, parse_curl_output, url_protected_by_cloudflare?, url_protected_by_incapsula?

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods inherited from AbstractFileDownloadStrategy

-

#basename, #cached_location, #symlink_location, #temporary_path

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #fetch, #initialize, #quiet!, #quiet?, #shutup!, #source_modified_time

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -

This class inherits a constructor from CurlDownloadStrategy

- -
- - -
-

Instance Method Details

- - -
-

- - #stageObject - - - - - -

-
- - -
-
-
- - -
- - - - -
-
-
-
-697
-698
-699
-700
-701
-702
-
-
# File 'download_strategy.rb', line 697
-
-def stage
-  UnpackStrategy::Uncompressed.new(cached_location)
-                              .extract(basename:,
-                                       verbose:  verbose? && !quiet?)
-  yield if block_given?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/NotAKegError.html b/docs/NotAKegError.html deleted file mode 100644 index 7f8b332c9..000000000 --- a/docs/NotAKegError.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - Exception: NotAKegError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: NotAKegError - - - -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of an internal API. - This class may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a path is not a keg.

- - -
-
-
- - -
- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Numeric.html b/docs/Numeric.html deleted file mode 100644 index 11d02fd72..000000000 --- a/docs/Numeric.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - Class: Numeric - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Numeric - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/blank.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

:nodoc:

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #blank?false - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

No number is blank:

- -
1.blank? # => false
-0.blank? # => false
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (false) - - - -
  • - -
- -
- - - - -
-
-
-
-182
-
-
# File 'extend/blank.rb', line 182
-
-def blank? = false
-
-
- -
-

- - #present?true - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (true) - - - -
  • - -
- -
- - - - -
-
-
-
-185
-
-
# File 'extend/blank.rb', line 185
-
-def present? = true
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS.html b/docs/OS.html deleted file mode 100644 index ed9ff4b90..000000000 --- a/docs/OS.html +++ /dev/null @@ -1,701 +0,0 @@ - - - - - - - Module: OS - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OS - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
os.rb,
- os/mac.rb,
os/linux.rb,
cask/macos.rb,
os/mac/sdk.rb,
os/linux/ld.rb,
os/linux/elf.rb,
os/mac/xcode.rb,
os/linux/glibc.rb,
os/linux/kernel.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Linux, Mac - - - - -

- - -

- Constant Summary - collapse -

- -
- -
LINUX_CI_OS_VERSION = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

See Linux-CI.md

- - -
-
-
- - -
-
-
"Ubuntu 22.04"
- -
LINUX_GLIBC_CI_VERSION = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"2.35"
- -
LINUX_GLIBC_NEXT_CI_VERSION = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"2.35"
- -
LINUX_GCC_CI_VERSION = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"11.0"
- -
LINUX_PREFERRED_GCC_COMPILER_FORMULA = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

https://packages.ubuntu.com/jammy/gcc

- - -
-
-
- - -
-
-
"gcc@11"
- -
LINUX_PREFERRED_GCC_RUNTIME_FORMULA = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"gcc"
- -
ISSUES_URL = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"https://docs.brew.sh/Troubleshooting"
- -
PATH_OPEN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
if OS::Linux.wsl? && (wslview = which("wslview").presence)
-  wslview.to_s
-else
-  "xdg-open"
-end.freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .kernel_nameString - - - - - -

-
-

Get the kernel name.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-40
-41
-42
-
-
# File 'os.rb', line 40
-
-def self.kernel_name
-  @kernel_name ||= Utils.safe_popen_read("uname", "-s").chomp
-end
-
-
- -
-

- - .kernel_versionVersion - - - - - -

-
-

Get the kernel version.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'os.rb', line 32
-
-def self.kernel_version
-  @kernel_version ||= Version.new(Utils.safe_popen_read("uname", "-r").chomp)
-end
-
-
- -
-

- - .linux?Boolean - - - - - -

-
-

Check whether the operating system is Linux.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-
-
# File 'os.rb', line 22
-
-def self.linux?
-  return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
-
-  RbConfig::CONFIG["host_os"].include? "linux"
-end
-
-
- -
-

- - .mac?Boolean - - - - - -

-
-

Check whether the operating system is macOS.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-
-
# File 'os.rb', line 12
-
-def self.mac?
-  return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
-
-  RbConfig::CONFIG["host_os"].include? "darwin"
-end
-
-
- -
-

- - .unsupported_configuration?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-
-
# File 'os.rb', line 77
-
-def self.unsupported_configuration?
-  !defined?(OS::ISSUES_URL)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Linux.html b/docs/OS/Linux.html deleted file mode 100644 index 687465d96..000000000 --- a/docs/OS/Linux.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - Module: OS::Linux - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OS::Linux - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
os/linux.rb,
- os/linux/ld.rb,
os/linux/elf.rb,
os/linux/glibc.rb,
os/linux/kernel.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for querying system information on Linux.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Elf, Glibc, Kernel, Ld - - - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .os_versionString - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get the OS version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'os/linux.rb', line 13
-
-def self.os_version
-  if which("lsb_release")
-    lsb_info = Utils.popen_read("lsb_release", "-a")
-    description = lsb_info[/^Description:\s*(.*)$/, 1].force_encoding("UTF-8")
-    codename = lsb_info[/^Codename:\s*(.*)$/, 1]
-    if codename.blank? || (codename == "n/a")
-      description
-    else
-      "#{description} (#{codename})"
-    end
-  elsif (redhat_release = Pathname.new("/etc/redhat-release")).readable?
-    redhat_release.read.chomp
-  elsif ::OS_VERSION.present?
-    ::OS_VERSION
-  else
-    "Unknown"
-  end
-end
-
-
- -
-

- - .wsl?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'os/linux.rb', line 33
-
-def self.wsl?
-  /-microsoft/i.match?(OS.kernel_version.to_s)
-end
-
-
- -
-

- - .wsl_versionVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'os/linux.rb', line 38
-
-def self.wsl_version
-  return Version::NULL unless wsl?
-
-  kernel = OS.kernel_version.to_s
-  if Version.new(T.must(kernel[/^([0-9.]*)-.*/, 1])) > Version.new("5.15")
-    Version.new("2 (Microsoft Store)")
-  elsif kernel.include?("-microsoft")
-    Version.new("2")
-  elsif kernel.include?("-Microsoft")
-    Version.new("1")
-  else
-    Version::NULL
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Linux/Elf.html b/docs/OS/Linux/Elf.html deleted file mode 100644 index 0a2bc03a9..000000000 --- a/docs/OS/Linux/Elf.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - Module: OS::Linux::Elf - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OS::Linux::Elf - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
os/linux/elf.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for working with ELF objects.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .expand_elf_dst(str, ref, repl) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-
-
# File 'os/linux/elf.rb', line 233
-
-def self.expand_elf_dst(str, ref, repl)
-  # ELF gABI rules for DSTs:
-  #   - Longest possible sequence using the rules (greedy).
-  #   - Must start with a $ (enforced by caller).
-  #   - Must follow $ with one underscore or ASCII [A-Za-z] (caller
-  #     follows these rules for REF) or '{' (start curly quoted name).
-  #   - Must follow first two characters with zero or more [A-Za-z0-9_]
-  #     (enforced by caller) or '}' (end curly quoted name).
-  # (from https://github.com/bminor/glibc/blob/41903cb6f460d62ba6dd2f4883116e2a624ee6f8/elf/dl-load.c#L182-L228)
-
-  # In addition to capturing a token, also attempt to capture opening/closing braces and check that they are not
-  # mismatched before expanding.
-  str.gsub(/\$({?)([a-zA-Z_][a-zA-Z0-9_]*)(}?)/) do |orig_str|
-    has_opening_brace = ::Regexp.last_match(1).present?
-    matched_text = ::Regexp.last_match(2)
-    has_closing_brace = ::Regexp.last_match(3).present?
-    if (matched_text == ref) && (has_opening_brace == has_closing_brace)
-      repl
-    else
-      orig_str
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Linux/Glibc.html b/docs/OS/Linux/Glibc.html deleted file mode 100644 index a70e51e1a..000000000 --- a/docs/OS/Linux/Glibc.html +++ /dev/null @@ -1,553 +0,0 @@ - - - - - - - Module: OS::Linux::Glibc - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OS::Linux::Glibc - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
os/linux/glibc.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for querying glibc information.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .below_ci_version?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-46
-47
-
-
# File 'os/linux/glibc.rb', line 45
-
-def below_ci_version?
-  system_version < LINUX_GLIBC_CI_VERSION
-end
-
-
- -
-

- - .below_minimum_version?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-40
-41
-42
-
-
# File 'os/linux/glibc.rb', line 40
-
-def below_minimum_version?
-  system_version < minimum_version
-end
-
-
- -
-

- - .minimum_versionVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'os/linux/glibc.rb', line 35
-
-def minimum_version
-  Version.new(ENV.fetch("HOMEBREW_LINUX_MINIMUM_GLIBC_VERSION"))
-end
-
-
- -
-

- - .system_versionVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-
-
# File 'os/linux/glibc.rb', line 11
-
-def system_version
-  @system_version ||= begin
-    version = Utils.popen_read("/usr/bin/ldd", "--version")[/ (\d+\.\d+)/, 1]
-    if version
-      Version.new version
-    else
-      Version::NULL
-    end
-  end
-end
-
-
- -
-

- - .versionVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'os/linux/glibc.rb', line 23
-
-def version
-  @version ||= begin
-    version = Utils.popen_read(HOMEBREW_PREFIX/"opt/glibc/bin/ldd", "--version")[/ (\d+\.\d+)/, 1]
-    if version
-      Version.new version
-    else
-      system_version
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Linux/Kernel.html b/docs/OS/Linux/Kernel.html deleted file mode 100644 index 855e9f7db..000000000 --- a/docs/OS/Linux/Kernel.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - Module: OS::Linux::Kernel - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OS::Linux::Kernel - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
os/linux/kernel.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for querying Linux kernel information.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .below_minimum_version?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'os/linux/kernel.rb', line 16
-
-def below_minimum_version?
-  OS.kernel_version < minimum_version
-end
-
-
- -
-

- - .minimum_versionVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'os/linux/kernel.rb', line 11
-
-def minimum_version
-  Version.new "3.2"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Linux/Ld.html b/docs/OS/Linux/Ld.html deleted file mode 100644 index 0962afcc2..000000000 --- a/docs/OS/Linux/Ld.html +++ /dev/null @@ -1,550 +0,0 @@ - - - - - - - Module: OS::Linux::Ld - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OS::Linux::Ld - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
os/linux/ld.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for querying ld information.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .brewed_ld_so_diagnosticsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-
-
# File 'os/linux/ld.rb', line 9
-
-def self.brewed_ld_so_diagnostics
-  brewed_ld_so = HOMEBREW_PREFIX/"lib/ld.so"
-  return "" unless brewed_ld_so.exist?
-
-  ld_so_output = Utils.popen_read(brewed_ld_so, "--list-diagnostics")
-  return "" unless $CHILD_STATUS.success?
-
-  ld_so_output
-end
-
-
- -
-

- - .library_paths(conf_path = Pathname(sysconfdir)/"ld.so.conf") ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - conf_path - - - (Pathname, String) - - - (defaults to: Pathname(sysconfdir)/"ld.so.conf") - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'os/linux/ld.rb', line 44
-
-def self.library_paths(conf_path = Pathname(sysconfdir)/"ld.so.conf")
-  conf_file = Pathname(conf_path)
-  paths = Set.new
-  directory = conf_file.realpath.dirname
-
-  conf_file.readlines.each do |line|
-    # Remove comments and leading/trailing whitespace
-    line.strip!
-    line.sub!(/\s*#.*$/, "")
-
-    if line.start_with?(/\s*include\s+/)
-      include_path = Pathname(line.sub(/^\s*include\s+/, "")).expand_path
-      wildcard = include_path.absolute? ? include_path : directory/include_path
-
-      Dir.glob(wildcard.to_s).each do |include_file|
-        paths += library_paths(include_file)
-      end
-    elsif line.empty?
-      next
-    else
-      paths << line
-    end
-  end
-
-  paths.to_a
-end
-
-
- -
-

- - .sysconfdirString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'os/linux/ld.rb', line 20
-
-def self.sysconfdir
-  fallback_sysconfdir = "/etc"
-
-  match = brewed_ld_so_diagnostics.match(/path.sysconfdir="(.+)"/)
-  return fallback_sysconfdir unless match
-
-  match.captures.compact.first || fallback_sysconfdir
-end
-
-
- -
-

- - .system_dirsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'os/linux/ld.rb', line 30
-
-def self.system_dirs
-  dirs = []
-
-  brewed_ld_so_diagnostics.split("\n").each do |line|
-    match = line.match(/path.system_dirs\[0x.*\]="(.*)"/)
-    next unless match
-
-    dirs << match.captures.compact.first
-  end
-
-  dirs
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Mac.html b/docs/OS/Mac.html deleted file mode 100644 index a35f101db..000000000 --- a/docs/OS/Mac.html +++ /dev/null @@ -1,1928 +0,0 @@ - - - - - - - Module: OS::Mac - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OS::Mac - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
os/mac.rb,
- os/linux.rb,
cask/macos.rb,
os/mac/sdk.rb,
os/mac/xcode.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: CLT, Xcode - - - - Classes: CLTSDKLocator, SDK, XcodeSDKLocator - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .active_developer_dirString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'os/mac.rb', line 90
-
-def self.active_developer_dir
-  @active_developer_dir ||= Utils.popen_read("/usr/bin/xcode-select", "-print-path").strip
-end
-
-
- -
-

- - .app_with_bundle_id(*ids) ⇒ Pathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ids - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-200
-201
-202
-203
-204
-205
-
-
# File 'os/mac.rb', line 200
-
-def self.app_with_bundle_id(*ids)
-  path = mdfind(*ids)
-         .reject { |p| p.include?("/Backups.backupdb/") }
-         .first
-  Pathname.new(path) if path.present?
-end
-
-
- -
-

- - .full_versionMacOSVersion - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This can be compared to numerics, strings, or symbols -using the standard Ruby Comparable methods.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'os/mac.rb', line 37
-
-def self.full_version
-  odisabled "`MacOS.full_version` on Linux" if Homebrew::SimulateSystem.simulating_or_running_on_linux?
-  @full_version ||= if (fake_macos = ENV.fetch("HOMEBREW_FAKE_MACOS", nil)) # for Portable Ruby building
-    MacOSVersion.new(fake_macos)
-  else
-    MacOSVersion.new(VERSION)
-  end
-end
-
-
- -
-

- - .full_version=(version) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - version - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-47
-48
-49
-50
-
-
# File 'os/mac.rb', line 47
-
-def self.full_version=(version)
-  @full_version = MacOSVersion.new(version.chomp)
-  @version = nil
-end
-
-
- -
-

- - .languageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-84
-85
-86
-87
-
-
# File 'os/mac.rb', line 84
-
-def self.language
-  odisabled "`MacOS.language` on Linux" if Homebrew::SimulateSystem.simulating_or_running_on_linux?
-  languages.first
-end
-
-
- -
-

- - .languagesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'os/mac.rb', line 70
-
-def self.languages
-  odisabled "`MacOS.languages` on Linux" if Homebrew::SimulateSystem.simulating_or_running_on_linux?
-  return @languages if @languages
-
-  os_langs = Utils.popen_read("defaults", "read", "-g", "AppleLanguages")
-  if os_langs.blank?
-    # User settings don't exist so check the system-wide one.
-    os_langs = Utils.popen_read("defaults", "read", "/Library/Preferences/.GlobalPreferences", "AppleLanguages")
-  end
-  os_langs = os_langs.scan(/[^ \n"(),]+/)
-
-  @languages = os_langs
-end
-
-
- -
-

- - .latest_sdk_version::Version - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-
-
# File 'os/mac.rb', line 53
-
-def self.latest_sdk_version
-  # TODO: bump version when new Xcode macOS SDK is released
-  # NOTE: We only track the major version of the SDK.
-  ::Version.new("13")
-end
-
-
- -
-

- - .macports_or_finkObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

See these issues for some history:

- - - - -
-
-
- - -
- - - - -
-
-
-
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-
-
# File 'os/mac.rb', line 170
-
-def self.macports_or_fink
-  paths = []
-
-  # First look in the path because MacPorts is relocatable and Fink
-  # may become relocatable in the future.
-  %w[port fink].each do |ponk|
-    path = which(ponk)
-    paths << path unless path.nil?
-  end
-
-  # Look in the standard locations, because even if port or fink are
-  # not in the path they can still break builds if the build scripts
-  # have these paths baked in.
-  %w[/sw/bin/fink /opt/local/bin/port].each do |ponk|
-    path = Pathname.new(ponk)
-    paths << path if path.exist?
-  end
-
-  # Finally, some users make their MacPorts or Fink directories
-  # read-only in order to try out Homebrew, but this doesn't work as
-  # some build scripts error out when trying to read from these now
-  # unreadable paths.
-  %w[/sw /opt/local].map { |p| Pathname.new(p) }.each do |path|
-    paths << path if path.exist? && !path.readable?
-  end
-
-  paths.uniq
-end
-
-
- -
-

- - .mdfind(*ids) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ids - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-208
-209
-210
-211
-212
-
-
# File 'os/mac.rb', line 208
-
-def self.mdfind(*ids)
-  (@mdfind ||= {}).fetch(ids) do
-    @mdfind[ids] = Utils.popen_read("/usr/bin/mdfind", mdfind_query(*ids)).split("\n")
-  end
-end
-
-
- -
-

- - .mdfind_query(*ids) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - ids - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-221
-222
-223
-
-
# File 'os/mac.rb', line 221
-
-def self.mdfind_query(*ids)
-  ids.map! { |id| "kMDItemCFBundleIdentifier == #{id}" }.join(" || ")
-end
-
-
- -
-

- - .pkgutil_info(id) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-214
-215
-216
-217
-218
-
-
# File 'os/mac.rb', line 214
-
-def self.pkgutil_info(id)
-  (@pkginfo ||= {}).fetch(id) do |key|
-    @pkginfo[key] = Utils.popen_read("/usr/sbin/pkgutil", "--pkg-info", key).strip
-  end
-end
-
-
- -
-

- - .preferred_perl_versionString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-65
-66
-67
-68
-
-
# File 'os/mac.rb', line 60
-
-def self.preferred_perl_version
-  if version >= :sonoma
-    "5.34"
-  elsif version >= :big_sur
-    "5.30"
-  else
-    "5.18"
-  end
-end
-
-
- -
-

- - .sdk(version = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-125
-126
-127
-
-
# File 'os/mac.rb', line 125
-
-def self.sdk(version = nil)
-  sdk_locator.sdk_if_applicable(version)
-end
-
-
- -
-

- - .sdk_for_formula(formula, version = nil, check_only_runtime_requirements: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-
-
# File 'os/mac.rb', line 129
-
-def self.sdk_for_formula(formula, version = nil, check_only_runtime_requirements: false)
-  # If the formula requires Xcode, don't return the CLT SDK
-  # If check_only_runtime_requirements is true, don't necessarily return the
-  # Xcode SDK if the XcodeRequirement is only a build or test requirement.
-  return Xcode.sdk if formula.requirements.any? do |req|
-    next false unless req.is_a? XcodeRequirement
-    next false if check_only_runtime_requirements && req.build? && !req.test?
-
-    true
-  end
-
-  sdk(version)
-end
-
-
- -
-

- - .sdk_locatorObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If a specific SDK is requested:

- -
    -
  1. The requested SDK is returned, if it's installed.
  2. -
  3. If the requested SDK is not installed, the newest SDK (if any SDKs - are available) is returned.
  4. -
  5. If no SDKs are available, nil is returned.
  6. -
- -

If no specific SDK is requested, the SDK matching the OS version is returned, -if available. Otherwise, the latest SDK is returned.

- - -
-
-
- - -
- - - - -
-
-
-
-117
-118
-119
-120
-121
-122
-123
-
-
# File 'os/mac.rb', line 117
-
-def self.sdk_locator
-  if CLT.installed? && CLT.provides_sdk?
-    CLT.sdk_locator
-  else
-    Xcode.sdk_locator
-  end
-end
-
-
- -
-

- - .sdk_path(_version = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the path to an SDK or nil, following the rules set by sdk.

- - -
-
-
- - -
- - - - -
-
-
-
-144
-145
-146
-147
-148
-
-
# File 'os/mac.rb', line 144
-
-def self.sdk_path(version = nil)
-  odisabled "`MacOS.sdk_path` on Linux" if Homebrew::SimulateSystem.simulating_or_running_on_linux?
-  s = sdk(version)
-  s&.path
-end
-
-
- -
-

- - .sdk_path_if_needed(_version = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-
-
# File 'os/mac.rb', line 150
-
-def self.sdk_path_if_needed(version = nil)
-  odisabled "`MacOS.sdk_path_if_needed` on Linux" if Homebrew::SimulateSystem.simulating_or_running_on_linux?
-  # Prefer CLT SDK when both Xcode and the CLT are installed.
-  # Expected results:
-  # 1. On Xcode-only systems, return the Xcode SDK.
-  # 2. On Xcode-and-CLT systems where headers are provided by the system, return nil.
-  # 3. On CLT-only systems with no CLT SDK, return nil.
-  # 4. On CLT-only systems with a CLT SDK, where headers are provided by the system, return nil.
-  # 5. On CLT-only systems with a CLT SDK, where headers are not provided by the system, return the CLT SDK.
-
-  return unless sdk_root_needed?
-
-  sdk_path(version)
-end
-
-
- -
-

- - .sdk_root_needed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'os/mac.rb', line 95
-
-def self.sdk_root_needed?
-  odisabled "`MacOS.sdk_root_needed?` on Linux" if Homebrew::SimulateSystem.simulating_or_running_on_linux?
-  if MacOS::CLT.installed?
-    # If there's no CLT SDK, return false
-    return false unless MacOS::CLT.provides_sdk?
-    # If the CLT is installed and headers are provided by the system, return false
-    return false unless MacOS::CLT.separate_header_package?
-  end
-
-  true
-end
-
-
- -
-

- - .system_dir?(dir) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-384
-385
-386
-
-
# File 'cask/macos.rb', line 384
-
-def system_dir?(dir)
-  SYSTEM_DIRS.include?(Pathname.new(dir).expand_path)
-end
-
-
- -
-

- - .undeletable?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-388
-389
-390
-
-
# File 'cask/macos.rb', line 388
-
-def undeletable?(path)
-  UNDELETABLE_PATHS.include?(Pathname.new(path).expand_path)
-end
-
-
- -
-

- - .versionMacOSVersion - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This can be compared to numerics, strings, or symbols -using the standard Ruby Comparable methods.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-28
-29
-30
-
-
# File 'os/mac.rb', line 28
-
-def self.version
-  @version ||= full_version.strip_patch
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Mac/BaseSDKLocator/NoSDKError.html b/docs/OS/Mac/BaseSDKLocator/NoSDKError.html deleted file mode 100644 index 894042d79..000000000 --- a/docs/OS/Mac/BaseSDKLocator/NoSDKError.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - Exception: OS::Mac::BaseSDKLocator::NoSDKError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: OS::Mac::BaseSDKLocator::NoSDKError - - - Private -

-
- -
-
Inherits:
-
- StandardError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
os/mac/sdk.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Mac/CLT.html b/docs/OS/Mac/CLT.html deleted file mode 100644 index 8bd0c96c8..000000000 --- a/docs/OS/Mac/CLT.html +++ /dev/null @@ -1,1636 +0,0 @@ - - - - - - - Module: OS::Mac::CLT - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OS::Mac::CLT - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
os/mac/xcode.rb,
- os/linux.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for querying macOS Command Line Tools information.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
EXECUTABLE_PKG_ID = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The original Mavericks CLT package ID

- - -
-
-
- - -
-
-
"com.apple.pkg.CLTools_Executables"
- -
MAVERICKS_NEW_PKG_ID = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

obsolete

- - -
-
-
- - -
-
-
"com.apple.pkg.CLTools_Base"
- -
PKG_PATH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"/Library/Developer/CommandLineTools"
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .below_minimum_version?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-387
-388
-389
-390
-391
-
-
# File 'os/mac/xcode.rb', line 387
-
-def self.below_minimum_version?
-  return false unless installed?
-
-  version < minimum_version
-end
-
-
- -
-

- - .detect_clang_versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-402
-403
-404
-405
-
-
# File 'os/mac/xcode.rb', line 402
-
-def self.detect_clang_version
-  version_output = Utils.popen_read("#{PKG_PATH}/usr/bin/clang", "--version")
-  version_output[/clang-(\d+(\.\d+)+)/, 1]
-end
-
-
- -
-

- - .detect_versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-
-
# File 'os/mac/xcode.rb', line 428
-
-def self.detect_version
-  version = T.let(nil, T.nilable(String))
-  [EXECUTABLE_PKG_ID, MAVERICKS_NEW_PKG_ID].each do |id|
-    next unless File.exist?("#{PKG_PATH}/usr/bin/clang")
-
-    version = MacOS.pkgutil_info(id)[/version: (.+)$/, 1]
-    return version if version
-  end
-
-  detect_version_from_clang_version
-end
-
-
- -
-

- - .detect_version_from_clang_versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-408
-409
-410
-
-
# File 'os/mac/xcode.rb', line 408
-
-def self.detect_version_from_clang_version
-  detect_clang_version&.sub(/^(\d+)0(\d)\./, "\\1.\\2.")
-end
-
-
- -
-

- - .installation_instructionsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-
-
# File 'os/mac/xcode.rb', line 311
-
-def self.installation_instructions
-  if MacOS.version == "10.14"
-    # This is not available from `xcode-select`
-    <<~EOS
-      Install the Command Line Tools for Xcode 11.3.1 from:
-        #{Formatter.url(MacOS::Xcode::APPLE_DEVELOPER_DOWNLOAD_URL)}
-    EOS
-  else
-    <<~EOS
-      Install the Command Line Tools:
-        xcode-select --install
-    EOS
-  end
-end
-
-
- -
-

- - .installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns true even if outdated tools are installed.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-113
-114
-115
-116
-
-
# File 'os/linux.rb', line 113
-
-def self.installed?
-  odisabled "`MacOS::CLT.installed?` on Linux"
-  false
-end
-
-
- -
-

- - .latest_clang_versionString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Bump these when the new version is distributed through Software Update -and our CI systems have been updated.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-
-
# File 'os/mac/xcode.rb', line 352
-
-def self.latest_clang_version
-  case MacOS.version
-  when "15" then "1600.0.20.10"
-  when "14" then "1500.3.9.4"
-  when "13" then "1500.1.0.2.5"
-  when "12"    then "1400.0.29.202"
-  when "11"    then "1300.0.29.30"
-  when "10.15" then "1200.0.32.29"
-  when "10.14" then "1100.0.33.17"
-  when "10.13" then "1000.10.44.2"
-  when "10.12" then "900.0.39.2"
-  else              "800.0.42.1"
-  end
-end
-
-
- -
-

- - .minimum_versionString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Bump these if things are badly broken (e.g. no SDK for this macOS) -without this. Generally this will be the first stable CLT release on -that macOS version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-
-
# File 'os/mac/xcode.rb', line 371
-
-def self.minimum_version
-  case MacOS.version
-  when "15" then "16.0.0"
-  when "14" then "15.0.0"
-  when "13" then "14.0.0"
-  when "12" then "13.0.0"
-  when "11" then "12.5.0"
-  when "10.15" then "11.0.0"
-  when "10.14" then "10.0.0"
-  when "10.13" then "9.0.0"
-  when "10.12" then "8.0.0"
-  else              "7.3.0"
-  end
-end
-
-
- -
-

- - .outdated?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-394
-395
-396
-397
-398
-399
-
-
# File 'os/mac/xcode.rb', line 394
-
-def self.outdated?
-  clang_version = detect_clang_version
-  return false unless clang_version
-
-  ::Version.new(clang_version) < latest_clang_version
-end
-
-
- -
-

- - .provides_sdk?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-291
-292
-293
-
-
# File 'os/mac/xcode.rb', line 291
-
-def self.provides_sdk?
-  version >= "8"
-end
-
-
- -
-

- - .sdk(version = nil) ⇒ SDK? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (MacOSVersion, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (SDK, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-301
-302
-303
-
-
# File 'os/mac/xcode.rb', line 301
-
-def self.sdk(version = nil)
-  sdk_locator.sdk_if_applicable(version)
-end
-
-
- -
-

- - .sdk_locatorCLTSDKLocator - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-296
-297
-298
-
-
# File 'os/mac/xcode.rb', line 296
-
-def self.sdk_locator
-  @sdk_locator ||= CLTSDKLocator.new
-end
-
-
- -
-

- - .sdk_path(version = nil) ⇒ Pathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (MacOSVersion, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-306
-307
-308
-
-
# File 'os/mac/xcode.rb', line 306
-
-def self.sdk_path(version = nil)
-  sdk(version)&.path
-end
-
-
- -
-

- - .separate_header_package?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-286
-287
-288
-
-
# File 'os/mac/xcode.rb', line 286
-
-def self.separate_header_package?
-  version >= "10" && MacOS.version >= "10.14"
-end
-
-
- -
-

- - .update_instructionsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-
-
# File 'os/mac/xcode.rb', line 327
-
-def self.update_instructions
-  software_update_location = if MacOS.version >= "13"
-    "System Settings"
-  elsif MacOS.version >= "10.14"
-    "System Preferences"
-  else
-    "the App Store"
-  end
-
-  <<~EOS
-    Update them from Software Update in #{software_update_location}.
-
-    If that doesn't show you any updates, run:
-      sudo rm -rf /Library/Developer/CommandLineTools
-      sudo xcode-select --install
-
-    Alternatively, manually download them from:
-      #{Formatter.url(MacOS::Xcode::APPLE_DEVELOPER_DOWNLOAD_URL)}.
-    You should download the Command Line Tools for Xcode #{MacOS::Xcode.latest_version}.
-  EOS
-end
-
-
- -
-

- - .version::Version - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Version string (a pretty long one) of the CLT package. -Note that the different ways of installing the CLTs lead to different -version numbers.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-108
-109
-110
-111
-
-
# File 'os/linux.rb', line 108
-
-def self.version
-  odisabled "`MacOS::CLT.version` on Linux"
-  ::Version::NULL
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Mac/CLTSDKLocator.html b/docs/OS/Mac/CLTSDKLocator.html deleted file mode 100644 index f862882c0..000000000 --- a/docs/OS/Mac/CLTSDKLocator.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - Class: OS::Mac::CLTSDKLocator - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: OS::Mac::CLTSDKLocator - - - Private -

-
- -
-
Inherits:
-
- BaseSDKLocator - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
os/mac/sdk.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for locating the macOS Command Line Tools SDK.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Instance Method Details

- - -
-

- - #sourceSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-165
-166
-167
-
-
# File 'os/mac/sdk.rb', line 165
-
-def source
-  :clt
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Mac/SDK.html b/docs/OS/Mac/SDK.html deleted file mode 100644 index ffdb3cff3..000000000 --- a/docs/OS/Mac/SDK.html +++ /dev/null @@ -1,553 +0,0 @@ - - - - - - - Class: OS::Mac::SDK - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: OS::Mac::SDK - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
os/mac/sdk.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class representing a macOS SDK.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
VERSIONED_SDK_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

11.x SDKs are explicitly excluded - we want the MacOSX11.sdk symlink instead.

- - -
-
-
- - -
-
-
/MacOSX(10\.\d+|\d+)\.sdk$/
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(version, path, source) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-
-
# File 'os/mac/sdk.rb', line 23
-
-def initialize(version, path, source)
-  @version = version
-  @path = Pathname.new(path)
-  @source = source
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #pathPathname (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'os/mac/sdk.rb', line 17
-
-def path
-  @path
-end
-
-
- - - -
-

- - #sourceSymbol (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'os/mac/sdk.rb', line 20
-
-def source
-  @source
-end
-
-
- - - -
-

- - #versionMacOSVersion (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'os/mac/sdk.rb', line 14
-
-def version
-  @version
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Mac/Xcode.html b/docs/OS/Mac/Xcode.html deleted file mode 100644 index 88ba9d27a..000000000 --- a/docs/OS/Mac/Xcode.html +++ /dev/null @@ -1,2125 +0,0 @@ - - - - - - - Module: OS::Mac::Xcode - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OS::Mac::Xcode - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
os/mac/xcode.rb,
- os/linux.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for querying Xcode information.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
DEFAULT_BUNDLE_PATH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Pathname("/Applications/Xcode.app").freeze
- -
BUNDLE_ID = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"com.apple.dt.Xcode"
- -
OLD_BUNDLE_ID = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"com.apple.Xcode"
- -
APPLE_DEVELOPER_DOWNLOAD_URL = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"https://developer.apple.com/download/all/"
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .below_minimum_version?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-
-
# File 'os/mac/xcode.rb', line 59
-
-def self.below_minimum_version?
-  return false unless installed?
-
-  version < minimum_version
-end
-
-
- -
-

- - .bundle_pathPathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-117
-118
-119
-120
-121
-122
-123
-124
-125
-
-
# File 'os/mac/xcode.rb', line 117
-
-def self.bundle_path
-  # Use the default location if it exists.
-  return DEFAULT_BUNDLE_PATH if DEFAULT_BUNDLE_PATH.exist?
-
-  # Ask Spotlight where Xcode is. If the user didn't install the
-  # helper tools and installed Xcode in a non-conventional place, this
-  # is our only option. See: https://superuser.com/questions/390757
-  MacOS.app_with_bundle_id(BUNDLE_ID, OLD_BUNDLE_ID)
-end
-
-
- -
-

- - .default_prefix?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-266
-267
-268
-
-
# File 'os/mac/xcode.rb', line 266
-
-def self.default_prefix?
-  prefix.to_s == "/Applications/Xcode.app/Contents/Developer"
-end
-
-
- -
-

- - .detect_versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-
-
# File 'os/mac/xcode.rb', line 193
-
-def self.detect_version
-  # This is a separate function as you can't cache the value out of a block
-  # if return is used in the middle, which we do many times in here.
-  return if !MacOS::Xcode.installed? && !MacOS::CLT.installed?
-
-  if MacOS::Xcode.installed?
-    # Fast path that will probably almost always work unless `xcode-select -p` is misconfigured
-    version_plist = T.must(prefix).parent/"version.plist"
-    if version_plist.file?
-      data = Plist.parse_xml(version_plist, marshal: false)
-      version = data["CFBundleShortVersionString"] if data
-      return version if version
-    end
-
-    %W[
-      #{prefix}/usr/bin/xcodebuild
-      #{which("xcodebuild")}
-    ].uniq.each do |xcodebuild_path|
-      next unless File.executable? xcodebuild_path
-
-      xcodebuild_output = Utils.popen_read(xcodebuild_path, "-version")
-      next unless $CHILD_STATUS.success?
-
-      xcode_version = xcodebuild_output[/Xcode (\d+(\.\d+)*)/, 1]
-      return xcode_version if xcode_version
-
-      # Xcode 2.x's xcodebuild has a different version string
-      case xcodebuild_output[/DevToolsCore-(\d+\.\d)/, 1]
-      when "798.0" then return "2.5"
-      when "515.0" then return "2.0"
-      end
-    end
-  end
-
-  detect_version_from_clang_version
-end
-
-
- -
-

- - .detect_version_from_clang_versionString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-
-
# File 'os/mac/xcode.rb', line 231
-
-def self.detect_version_from_clang_version
-  version = DevelopmentTools.clang_version
-
-  return "dunno" if version.null?
-
-  # This logic provides a fake Xcode version based on the
-  # installed CLT version. This is useful as they are packaged
-  # simultaneously so workarounds need to apply to both based on their
-  # comparable version.
-  case version
-  when "6.0.0"  then "6.2"
-  when "6.1.0"  then "6.4"
-  when "7.0.0"  then "7.1"
-  when "7.0.2"  then "7.2.1"
-  when "7.3.0"  then "7.3.1"
-  when "8.0.0"  then "8.2.1"
-  when "8.1.0"  then "8.3.3"
-  when "9.0.0"  then "9.2"
-  when "9.1.0"  then "9.4.1"
-  when "10.0.0" then "10.1"
-  when "10.0.1" then "10.3"
-  when "11.0.0" then "11.3.1"
-  when "11.0.3" then "11.7"
-  when "12.0.0" then "12.4"
-  when "12.0.5" then "12.5.1"
-  when "13.0.0" then "13.2.1"
-  when "13.1.6" then "13.4.1"
-  when "14.0.0" then "14.2"
-  when "14.0.3" then "14.3.1"
-  when "16.0.0" then "16.0"
-  else               "15.4"
-  end
-end
-
-
- -
-

- - .installation_instructionsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-
-
# File 'os/mac/xcode.rb', line 149
-
-def self.installation_instructions
-  if OS::Mac.version.prerelease?
-    <<~EOS
-      Xcode can be installed from:
-        #{Formatter.url(APPLE_DEVELOPER_DOWNLOAD_URL)}
-    EOS
-  else
-    <<~EOS
-      Xcode can be installed from the App Store.
-    EOS
-  end
-end
-
-
- -
-

- - .installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-101
-102
-103
-104
-
-
# File 'os/linux.rb', line 101
-
-def self.installed?
-  odisabled "`MacOS::Xcode.installed?` on Linux"
-  false
-end
-
-
- -
-

- - .latest_sdk_version?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'os/mac/xcode.rb', line 66
-
-def self.latest_sdk_version?
-  OS::Mac.full_version >= OS::Mac.latest_sdk_version
-end
-
-
- -
-

- - .latest_version(macos: MacOS.version) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Bump these when a new version is available from the App Store and our -CI systems have been updated. -This may be a beta version for a beta macOS.

- - -
-
-
-

Parameters:

-
    - -
  • - - macos - - - (MacOSVersion) - - - (defaults to: MacOS.version) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'os/mac/xcode.rb', line 17
-
-def self.latest_version(macos: MacOS.version)
-  latest_stable = "15.4"
-  case macos
-  when "15" then "16.0"
-  when "14" then latest_stable
-  when "13" then "15.2"
-  when "12" then "14.2"
-  when "11" then "13.2.1"
-  when "10.15" then "12.4"
-  when "10.14" then "11.3.1"
-  when "10.13" then "10.1"
-  when "10.12" then "9.2"
-  when "10.11" then "8.2.1"
-  else
-    raise "macOS '#{MacOS.version}' is invalid" unless OS::Mac.version.prerelease?
-
-    # Default to newest known version of Xcode for unreleased macOS versions.
-    latest_stable
-  end
-end
-
-
- -
-

- - .minimum_versionString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Bump these if things are badly broken (e.g. no SDK for this macOS) -without this. Generally this will be the first Xcode release on that -macOS version (which may initially be a beta if that version of macOS is -also in beta).

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'os/mac/xcode.rb', line 43
-
-def self.minimum_version
-  case MacOS.version
-  when "15" then "16.0"
-  when "14" then "15.0"
-  when "13" then "14.1"
-  when "12" then "13.1"
-  when "11" then "12.2"
-  when "10.15" then "11.0"
-  when "10.14" then "10.2"
-  when "10.13" then "9.0"
-  when "10.12" then "8.0"
-  else "7.3"
-  end
-end
-
-
- -
-

- - .needs_clt_installed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'os/mac/xcode.rb', line 71
-
-def self.needs_clt_installed?
-  return false if latest_sdk_version?
-
-  # With fake El Capitan for Portable Ruby, we want the full 10.11 SDK so that we can link
-  # against the correct set of libraries in the SDK sysroot rather than the system's copies.
-  # We therefore do not use the CLT under this setup, which installs to /usr/include.
-  return false if ENV["HOMEBREW_FAKE_MACOS"]
-
-  without_clt?
-end
-
-
- -
-

- - .outdated?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-83
-84
-85
-86
-87
-
-
# File 'os/mac/xcode.rb', line 83
-
-def self.outdated?
-  return false unless installed?
-
-  version < latest_version
-end
-
-
- -
-

- - .prefixPathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a Pathname object corresponding to Xcode.app's Developer -directory or nil if Xcode.app is not installed.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-
-
# File 'os/mac/xcode.rb', line 97
-
-def self.prefix
-  @prefix ||= begin
-    dir = MacOS.active_developer_dir
-
-    if dir.empty? || dir == CLT::PKG_PATH || !File.directory?(dir)
-      path = bundle_path
-      path/"Contents/Developer" if path
-    else
-      # Use cleanpath to avoid pathological trailing slash
-      Pathname.new(dir).cleanpath
-    end
-  end
-end
-
-
- -
-

- - .sdk(version = nil) ⇒ SDK? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (MacOSVersion, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (SDK, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-139
-140
-141
-
-
# File 'os/mac/xcode.rb', line 139
-
-def self.sdk(version = nil)
-  sdk_locator.sdk_if_applicable(version)
-end
-
-
- -
-

- - .sdk_locatorXcodeSDKLocator - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-134
-135
-136
-
-
# File 'os/mac/xcode.rb', line 134
-
-def self.sdk_locator
-  @sdk_locator ||= XcodeSDKLocator.new
-end
-
-
- -
-

- - .sdk_path(version = nil) ⇒ Pathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - version - - - (MacOSVersion, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-144
-145
-146
-
-
# File 'os/mac/xcode.rb', line 144
-
-def self.sdk_path(version = nil)
-  sdk(version)&.path
-end
-
-
- -
-

- - .toolchain_pathPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-112
-113
-114
-
-
# File 'os/mac/xcode.rb', line 112
-
-def self.toolchain_path
-  Pathname("#{prefix}/Toolchains/XcodeDefault.xctoolchain")
-end
-
-
- -
-

- - .update_instructionsString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-
-
# File 'os/mac/xcode.rb', line 163
-
-def self.update_instructions
-  if OS::Mac.version.prerelease?
-    <<~EOS
-      Xcode can be updated from:
-        #{Formatter.url(APPLE_DEVELOPER_DOWNLOAD_URL)}
-    EOS
-  else
-    <<~EOS
-      Xcode can be updated from the App Store.
-    EOS
-  end
-end
-
-
- -
-

- - .version::Version - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get the Xcode version.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-96
-97
-98
-99
-
-
# File 'os/linux.rb', line 96
-
-def self.version
-  odisabled "`MacOS::Xcode.version` on Linux"
-  ::Version::NULL
-end
-
-
- -
-

- - .without_clt?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'os/mac/xcode.rb', line 90
-
-def self.without_clt?
-  !MacOS::CLT.installed?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OS/Mac/XcodeSDKLocator.html b/docs/OS/Mac/XcodeSDKLocator.html deleted file mode 100644 index f48556104..000000000 --- a/docs/OS/Mac/XcodeSDKLocator.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - Class: OS::Mac::XcodeSDKLocator - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: OS::Mac::XcodeSDKLocator - - - Private -

-
- -
-
Inherits:
-
- BaseSDKLocator - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
os/mac/sdk.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for locating the Xcode SDK.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Instance Method Details

- - -
-

- - #sourceSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-142
-143
-144
-
-
# File 'os/mac/sdk.rb', line 142
-
-def source
-  :xcode
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Object.html b/docs/Object.html deleted file mode 100644 index 858a20bc4..000000000 --- a/docs/Object.html +++ /dev/null @@ -1,573 +0,0 @@ - - - - - - - Class: Object - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Object - - - Private -

-
- -
-
Inherits:
-
- BasicObject - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/blank.rb,
- extend/object/deep_dup.rb,
extend/object/duplicable.rb
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- -
    - - -
  • - - - #blank? ⇒ Boolean - - - - - - - - - - private - -

    An object is blank if it's false, empty, or a whitespace string.

    -
    - -
  • - - - -
  • - - - #deep_dup ⇒ T.self_type - - - - - - - - - - private - -

    Returns a deep copy of object if it's duplicable.

    -
    - -
  • - - - -
  • - - - #duplicable? ⇒ Boolean - - - - - - - - - - private - -

    Can you safely dup this object?.

    -
    - -
  • - - - -
  • - - - #presence ⇒ T.self_type? - - - - - - - - - - private - -

    Returns the receiver if it's present, otherwise returns nil.

    -
    - -
  • - - - -
  • - - - #present? ⇒ Boolean - - - - - - - - - - private - -

    An object is present if it's not blank.

    -
    - -
  • - - -
- - - - -
-

Instance Method Details

- - -
-

- - #blank?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An object is blank if it's false, empty, or a whitespace string.

- -

For example, nil, '', ' ', [], {} and false are all blank.

- -

Example

- -
!address || address.empty?
-
- -

can be simplified to

- -
address.blank?
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'extend/blank.rb', line 21
-
-def blank?
-  respond_to?(:empty?) ? !!T.unsafe(self).empty? : false
-end
-
-
- -
-

- - #deep_dupT.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a deep copy of object if it's duplicable. If it's -not duplicable, returns +self+.

- -

object = Object.new - dup = object.deep_dup - dup.instance_variable_set(:@a, 1)

- -

object.instance_variable_defined?(:@a) # => false - dup.instance_variable_defined?(:@a) # => true

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'extend/object/deep_dup.rb', line 17
-
-def deep_dup
-  duplicable? ? dup : self
-end
-
-
- -
-

- - #duplicable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Can you safely dup this object?

- -

False for method objects; -true otherwise.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-34
-
-
# File 'extend/object/duplicable.rb', line 34
-
-def duplicable? = true
-
-
- -
-

- - #presenceT.self_type? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the receiver if it's present, otherwise returns nil.

- -

object.presence is equivalent to object.present? ? object : nil.

- -

Example

- -
state   = params[:state]   if params[:state].present?
-country = params[:country] if params[:country].present?
-region  = state || country || 'US'
-
- -

can be simplified to

- -
region = params[:state].presence || params[:country].presence || 'US'
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'extend/blank.rb', line 47
-
-def presence
-  self if present?
-end
-
-
- -
-

- - #present?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An object is present if it's not blank.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'extend/blank.rb', line 27
-
-def present? = !blank?
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/ObserverPathnameExtension.html b/docs/ObserverPathnameExtension.html deleted file mode 100644 index e0713ddc6..000000000 --- a/docs/ObserverPathnameExtension.html +++ /dev/null @@ -1,1076 +0,0 @@ - - - - - - - Module: ObserverPathnameExtension - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: ObserverPathnameExtension - - - -

-
- - - - -
-
Extended by:
-
Context
-
- - - - - - - - -
-
Defined in:
-
extend/pathname.rb,
- extend/pathname.rbi
-
-
- -
- - - - - -

Class Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, debug?, quiet?, verbose?, with_context

- - -
-

Class Attribute Details

- - - -
-

- - .dInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-525
-526
-527
-
-
# File 'extend/pathname.rb', line 525
-
-def d
-  @d
-end
-
-
- - - -
-

- - .nInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-525
-526
-527
-
-
# File 'extend/pathname.rb', line 525
-
-def n
-  @n
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .countsArray(Integer, Integer) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array(Integer, Integer)) - - - -
  • - -
- -
- - - - -
-
-
-
-539
-540
-541
-
-
# File 'extend/pathname.rb', line 539
-
-def counts
-  [n, d]
-end
-
-
- -
-

- - .reset_counts!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-528
-529
-530
-531
-
-
# File 'extend/pathname.rb', line 528
-
-def reset_counts!
-  @n = @d = 0
-  @put_verbose_trimmed_warning = false
-end
-
-
- -
-

- - .totalInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-534
-535
-536
-
-
# File 'extend/pathname.rb', line 534
-
-def total
-  n + d
-end
-
-
- -
-

- - .verbose?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-560
-
-
# File 'extend/pathname.rb', line 547
-
-def verbose?
-  return super unless ENV["CI"]
-  return false unless super
-
-  if total < MAXIMUM_VERBOSE_OUTPUT
-    true
-  else
-    unless @put_verbose_trimmed_warning
-      puts "Only the first #{MAXIMUM_VERBOSE_OUTPUT} operations were output."
-      @put_verbose_trimmed_warning = true
-    end
-    false
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #install_infovoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-591
-592
-593
-594
-
-
# File 'extend/pathname.rb', line 591
-
-def install_info
-  super
-  puts "info #{self}" if ObserverPathnameExtension.verbose?
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - src - - - (Pathname) - - - -
  • - -
- - -
- - - - -
-
-
-
-584
-585
-586
-587
-588
-
-
# File 'extend/pathname.rb', line 584
-
-def make_relative_symlink(src)
-  super
-  puts "ln -s #{src.relative_path_from(dirname)} #{basename}" if ObserverPathnameExtension.verbose?
-  ObserverPathnameExtension.n += 1
-end
-
-
- -
-

- - #mkpathvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-571
-572
-573
-574
-
-
# File 'extend/pathname.rb', line 571
-
-def mkpath
-  super
-  puts "mkdir -p #{self}" if ObserverPathnameExtension.verbose?
-end
-
-
- -
-

- - #rmdirvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-577
-578
-579
-580
-581
-
-
# File 'extend/pathname.rb', line 577
-
-def rmdir
-  super
-  puts "rmdir #{self}" if ObserverPathnameExtension.verbose?
-  ObserverPathnameExtension.d += 1
-end
-
-
- -
-

- - #uninstall_infovoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-597
-598
-599
-600
-
-
# File 'extend/pathname.rb', line 597
-
-def uninstall_info
-  super
-  puts "uninfo #{self}" if ObserverPathnameExtension.verbose?
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-564
-565
-566
-567
-568
-
-
# File 'extend/pathname.rb', line 564
-
-def unlink
-  super
-  puts "rm #{self}" if ObserverPathnameExtension.verbose?
-  ObserverPathnameExtension.n += 1
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OnSystem.html b/docs/OnSystem.html deleted file mode 100644 index 16c5d3f93..000000000 --- a/docs/OnSystem.html +++ /dev/null @@ -1,999 +0,0 @@ - - - - - - - Module: OnSystem - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OnSystem - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
extend/on_system.rb
-
- -
- -

Defined Under Namespace

-

- - - Modules: MacOSAndLinux, MacOSOnly - - - - -

- - -

- Constant Summary - collapse -

- -
- -
ARCH_OPTIONS = - -
-
[:intel, :arm].freeze
- -
BASE_OS_OPTIONS = - -
-
[:macos, :linux].freeze
- -
ALL_OS_OPTIONS = - -
-
[*MacOSVersion::SYMBOLS.keys, :linux].freeze
- -
ALL_OS_ARCH_COMBINATIONS = - -
-
ALL_OS_OPTIONS.product(ARCH_OPTIONS).freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .arch_condition_met?(arch) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arch - - - (Symbol) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-
-
# File 'extend/on_system.rb', line 13
-
-def self.arch_condition_met?(arch)
-  raise ArgumentError, "Invalid arch condition: #{arch.inspect}" if ARCH_OPTIONS.exclude?(arch)
-
-  arch == Homebrew::SimulateSystem.current_arch
-end
-
-
- -
-

- - .condition_from_method_name(method_name) ⇒ Symbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - method_name - - - (Symbol) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'extend/on_system.rb', line 47
-
-def self.condition_from_method_name(method_name)
-  method_name.to_s.sub(/^on_/, "").to_sym
-end
-
-
- -
-

- - .included(_base) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - _base - - - (Class) - - - -
  • - -
- - -
- - - - -
-
-
-
-143
-144
-145
-
-
# File 'extend/on_system.rb', line 143
-
-def self.included(_base)
-  raise "Do not include `OnSystem` directly. Instead, include `OnSystem::MacOSAndLinux` or `OnSystem::MacOSOnly`"
-end
-
-
- -
-

- - .os_condition_met?(os_name, or_condition = nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - os_name - - - (Symbol) - - - -
  • - -
  • - - or_condition - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'extend/on_system.rb', line 20
-
-def self.os_condition_met?(os_name, or_condition = nil)
-  return Homebrew::SimulateSystem.send(:"simulating_or_running_on_#{os_name}?") if BASE_OS_OPTIONS.include?(os_name)
-
-  raise ArgumentError, "Invalid OS condition: #{os_name.inspect}" unless MacOSVersion::SYMBOLS.key?(os_name)
-
-  if or_condition.present? && [:or_newer, :or_older].exclude?(or_condition)
-    raise ArgumentError, "Invalid OS `or_*` condition: #{or_condition.inspect}"
-  end
-
-  return false if Homebrew::SimulateSystem.simulating_or_running_on_linux?
-
-  base_os = MacOSVersion.from_symbol(os_name)
-  current_os = if Homebrew::SimulateSystem.current_os == :macos
-    # Assume the oldest macOS version when simulating a generic macOS version
-    # Version::NULL is always treated as less than any other version.
-    Version::NULL
-  else
-    MacOSVersion.from_symbol(Homebrew::SimulateSystem.current_os)
-  end
-
-  return current_os >= base_os if or_condition == :or_newer
-  return current_os <= base_os if or_condition == :or_older
-
-  current_os == base_os
-end
-
-
- -
-

- - .setup_arch_methods(base) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - base - - - (Class) - - - -
  • - -
- - -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-
-
# File 'extend/on_system.rb', line 52
-
-def self.setup_arch_methods(base)
-  ARCH_OPTIONS.each do |arch|
-    base.define_method(:"on_#{arch}") do |&block|
-      @on_system_blocks_exist = true
-
-      return unless OnSystem.arch_condition_met? OnSystem.condition_from_method_name(T.must(__method__))
-
-      @called_in_on_system_block = true
-      result = block.call
-      @called_in_on_system_block = false
-
-      result
-    end
-  end
-
-  base.define_method(:on_arch_conditional) do |arm: nil, intel: nil|
-    @on_system_blocks_exist = true
-
-    if OnSystem.arch_condition_met? :arm
-      arm
-    elsif OnSystem.arch_condition_met? :intel
-      intel
-    end
-  end
-end
-
-
- -
-

- - .setup_base_os_methods(base) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - base - - - (Class) - - - -
  • - -
- - -
- - - - -
-
-
-
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-
-
# File 'extend/on_system.rb', line 79
-
-def self.setup_base_os_methods(base)
-  BASE_OS_OPTIONS.each do |base_os|
-    base.define_method(:"on_#{base_os}") do |&block|
-      @on_system_blocks_exist = true
-
-      return unless OnSystem.os_condition_met? OnSystem.condition_from_method_name(T.must(__method__))
-
-      @called_in_on_system_block = true
-      result = block.call
-      @called_in_on_system_block = false
-
-      result
-    end
-  end
-
-  base.define_method(:on_system) do |linux, macos:, &block|
-    @on_system_blocks_exist = true
-
-    raise ArgumentError, "The first argument to `on_system` must be `:linux`" if linux != :linux
-
-    os_version, or_condition = if macos.to_s.include?("_or_")
-      macos.to_s.split(/_(?=or_)/).map(&:to_sym)
-    else
-      [macos.to_sym, nil]
-    end
-    return if !OnSystem.os_condition_met?(os_version, or_condition) && !OnSystem.os_condition_met?(:linux)
-
-    @called_in_on_system_block = true
-    result = block.call
-    @called_in_on_system_block = false
-
-    result
-  end
-
-  base.define_method(:on_system_conditional) do |macos: nil, linux: nil|
-    @on_system_blocks_exist = true
-
-    if OnSystem.os_condition_met?(:macos) && macos.present?
-      macos
-    elsif OnSystem.os_condition_met?(:linux) && linux.present?
-      linux
-    end
-  end
-end
-
-
- -
-

- - .setup_macos_methods(base) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - base - - - (Class) - - - -
  • - -
- - -
- - - - -
-
-
-
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-
-
# File 'extend/on_system.rb', line 125
-
-def self.setup_macos_methods(base)
-  MacOSVersion::SYMBOLS.each_key do |os_name|
-    base.define_method(:"on_#{os_name}") do |or_condition = nil, &block|
-      @on_system_blocks_exist = true
-
-      os_condition = OnSystem.condition_from_method_name T.must(__method__)
-      return unless OnSystem.os_condition_met? os_condition, or_condition
-
-      @called_in_on_system_block = true
-      result = block.call
-      @called_in_on_system_block = false
-
-      result
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OnSystem/MacOSAndLinux.html b/docs/OnSystem/MacOSAndLinux.html deleted file mode 100644 index 4bdef6f24..000000000 --- a/docs/OnSystem/MacOSAndLinux.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - Module: OnSystem::MacOSAndLinux - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OnSystem::MacOSAndLinux - - - -

-
- - - - - - - - - -
-
Included in:
-
Formula, Formula, Homebrew::Service, PourBottleCheck, Resource, SoftwareSpec
-
- - - -
-
Defined in:
-
extend/on_system.rb
-
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .included(base) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - base - - - (Class) - - - -
  • - -
- - -
- - - - -
-
-
-
-149
-150
-151
-152
-153
-
-
# File 'extend/on_system.rb', line 149
-
-def self.included(base)
-  OnSystem.setup_arch_methods(base)
-  OnSystem.setup_base_os_methods(base)
-  OnSystem.setup_macos_methods(base)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OnSystem/MacOSOnly.html b/docs/OnSystem/MacOSOnly.html deleted file mode 100644 index 7e46a7a2b..000000000 --- a/docs/OnSystem/MacOSOnly.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - Module: OnSystem::MacOSOnly - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: OnSystem::MacOSOnly - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Cask::DSL
-
- - - -
-
Defined in:
-
extend/on_system.rbi,
- extend/on_system.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .included(base) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - base - - - (Class) - - - -
  • - -
- - -
- - - - -
-
-
-
-158
-159
-160
-161
-
-
# File 'extend/on_system.rb', line 158
-
-def self.included(base)
-  OnSystem.setup_arch_methods(base)
-  OnSystem.setup_macos_methods(base)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #on_arch_conditional(arm: nil, intel: nil) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arm - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - intel - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-5
-
-
# File 'extend/on_system.rbi', line 5
-
-def on_arch_conditional(arm: nil, intel: nil); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OperationInProgressError.html b/docs/OperationInProgressError.html deleted file mode 100644 index 1568f7a12..000000000 --- a/docs/OperationInProgressError.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - Exception: OperationInProgressError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: OperationInProgressError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when another Homebrew operation is already in progress.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name) ⇒ OperationInProgressError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of OperationInProgressError.

- - -
-
-
- - -
- - - - -
-
-
-
-365
-366
-367
-368
-369
-370
-371
-372
-373
-
-
# File 'exceptions.rb', line 365
-
-def initialize(name)
-  message = <<~EOS
-    Operation already in progress for #{name}
-    Another active Homebrew process is already using #{name}.
-    Please wait for it to finish or terminate it to continue.
-  EOS
-
-  super message
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Option.html b/docs/Option.html deleted file mode 100644 index 249234a4e..000000000 --- a/docs/Option.html +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - - Class: Option - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Option - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
options.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A formula option.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(name, description = "") ⇒ Option - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Option.

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-
-
# File 'options.rb', line 8
-
-def initialize(name, description = "")
-  @name = name
-  @flag = "--#{name}"
-  @description = description
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #descriptionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'options.rb', line 6
-
-def description
-  @description
-end
-
-
- - - -
-

- - #flagObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'options.rb', line 6
-
-def flag
-  @flag
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'options.rb', line 6
-
-def name
-  @name
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Options.html b/docs/Options.html deleted file mode 100644 index 46d0a2016..000000000 --- a/docs/Options.html +++ /dev/null @@ -1,1350 +0,0 @@ - - - - - - - Class: Options - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Options - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - -
-
Includes:
-
Enumerable
-
- - - - - - -
-
Defined in:
-
options.rb,
- options.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Enumerable

-

#compact_blank, #exclude?

-
-

Constructor Details

- -
-

- - #initialize(*args) ⇒ Options - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Options.

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-74
-
-
# File 'options.rb', line 71
-
-def initialize(*args)
-  # Ensure this is synced with `initialize_dup` and `freeze` (excluding simple objects like integers and booleans)
-  @options = Set.new(*args)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .create(array) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'options.rb', line 67
-
-def self.create(array)
-  new Array(array).map { |e| Option.new(e[/^--([^=]+=?)(.+)?$/, 1] || e) }
-end
-
-
- -
-

- - .dump_for_formula(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-145
-146
-147
-148
-149
-150
-
-
# File 'options.rb', line 145
-
-def self.dump_for_formula(formula)
-  formula.options.sort_by(&:flag).each do |opt|
-    puts "#{opt.flag}\n\t#{opt.description}"
-  end
-  puts "--HEAD\n\tInstall HEAD version" if formula.head
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #&(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-103
-104
-105
-
-
# File 'options.rb', line 103
-
-def &(other)
-  self.class.new(@options & other)
-end
-
-
- -
-

- - #*(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-111
-112
-113
-
-
# File 'options.rb', line 111
-
-def *(other)
-  @options.to_a * other
-end
-
-
- -
-

- - #+(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-95
-96
-97
-
-
# File 'options.rb', line 95
-
-def +(other)
-  self.class.new(@options + other)
-end
-
-
- -
-

- - #-(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'options.rb', line 99
-
-def -(other)
-  self.class.new(@options - other)
-end
-
-
- -
-

- - #<<(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-90
-91
-92
-93
-
-
# File 'options.rb', line 90
-
-def <<(other)
-  @options << other
-  self
-end
-
-
- -
-

- - #as_flagsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-125
-126
-127
-
-
# File 'options.rb', line 125
-
-def as_flags
-  map(&:flag)
-end
-
-
- -
-

- - #each(*args, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-86
-87
-88
-
-
# File 'options.rb', line 86
-
-def each(*args, &block)
-  @options.each(*args, &block)
-end
-
-
- -
-

- - #empty?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-121
-122
-123
-
-
# File 'options.rb', line 121
-
-def empty?
-  @options.empty?
-end
-
-
- -
-

- - #freezeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-81
-82
-83
-84
-
-
# File 'options.rb', line 81
-
-def freeze
-  @options.dup
-  super
-end
-
-
- -
-

- - #include?(option) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-129
-130
-131
-
-
# File 'options.rb', line 129
-
-def include?(option)
-  any? { |opt| opt == option || opt.name == option || opt.flag == option }
-end
-
-
- -
-

- - #initialize_dup(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-76
-77
-78
-79
-
-
# File 'options.rb', line 76
-
-def initialize_dup(other)
-  super
-  @options = @options.dup
-end
-
-
- -
-

- - #to_aArray<Option> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This is a workaround to enable alias to_ary to_a

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-7
-
-
# File 'options.rbi', line 7
-
-def to_a; end
-
-
- -
-

- - #to_aryObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-133
-
-
# File 'options.rb', line 133
-
-alias to_ary to_a
-
-
- -
-

- - #|(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-107
-108
-109
-
-
# File 'options.rb', line 107
-
-def |(other)
-  self.class.new(@options | other)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/PATH.html b/docs/PATH.html deleted file mode 100644 index 54c3feb8e..000000000 --- a/docs/PATH.html +++ /dev/null @@ -1,1162 +0,0 @@ - - - - - - - Class: PATH - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: PATH - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
Enumerable
-
- - - - - - -
-
Defined in:
-
PATH.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Enumerable

-

#compact_blank, #exclude?

-
-

Constructor Details

- -
-

- - #initialize(*paths) ⇒ PATH - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of PATH.

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'PATH.rb', line 20
-
-def initialize(*paths)
-  @paths = parse(paths)
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #append(*paths) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - paths - - - (Elements) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-34
-
-
# File 'PATH.rb', line 31
-
-def append(*paths)
-  @paths = parse(@paths + paths)
-  self
-end
-
-
- -
-

- - #each(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-4
-
-
# File 'sorbet/rbi/parlour.rbi', line 4
-
-def each(*args, **options, &block); end
-
-
- -
-

- - #empty?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-74
-75
-76
-
-
# File 'PATH.rb', line 74
-
-def empty?
-  @paths.empty?
-end
-
-
- -
-

- - #existingT.self_type? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-79
-80
-81
-82
-83
-
-
# File 'PATH.rb', line 79
-
-def existing
-  existing_path = select { File.directory?(_1) }
-  # return nil instead of empty PATH, to unset environment variables
-  existing_path unless existing_path.empty?
-end
-
-
- -
-

- - #insert(index, *paths) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - index - - - (Integer) - - - -
  • - -
  • - - paths - - - (Elements) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-40
-
-
# File 'PATH.rb', line 37
-
-def insert(index, *paths)
-  @paths = parse(@paths.insert(index, *paths))
-  self
-end
-
-
- -
-

- - #prepend(*paths) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - paths - - - (Elements) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-28
-
-
# File 'PATH.rb', line 25
-
-def prepend(*paths)
-  @paths = parse(paths + @paths)
-  self
-end
-
-
- -
-

- - #reject(&block) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.params(arg0: String).returns(T::Boolean)) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'PATH.rb', line 48
-
-def reject(&block)
-  self.class.new(@paths.reject(&block))
-end
-
-
- -
-

- - #select(&block) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.params(arg0: String).returns(T::Boolean)) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'PATH.rb', line 43
-
-def select(&block)
-  self.class.new(@paths.select(&block))
-end
-
-
- -
-

- - #to_aryArray<String> - - - - Also known as: - to_a - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'PATH.rb', line 53
-
-def to_ary
-  @paths.dup.to_ary
-end
-
-
- -
-

- - #to_strString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'PATH.rb', line 59
-
-def to_str
-  @paths.join(File::PATH_SEPARATOR)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Patch.html b/docs/Patch.html deleted file mode 100644 index 0e20e3804..000000000 --- a/docs/Patch.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - Module: Patch - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Patch - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
patch.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for creating patches.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .create(strip, src, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'patch.rb', line 9
-
-def self.create(strip, src, &block)
-  case strip
-  when :DATA
-    DATAPatch.new(:p1)
-  when String
-    StringPatch.new(:p1, strip)
-  when Symbol
-    case src
-    when :DATA
-      DATAPatch.new(strip)
-    when String
-      StringPatch.new(strip, src)
-    else
-      ExternalPatch.new(strip, &block)
-    end
-  when nil
-    raise ArgumentError, "nil value for strip"
-  else
-    raise ArgumentError, "Unexpected value #{strip.inspect} for strip"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Pathname.html b/docs/Pathname.html deleted file mode 100644 index 0d6430c63..000000000 --- a/docs/Pathname.html +++ /dev/null @@ -1,3247 +0,0 @@ - - - - - - - Class: Pathname - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Pathname - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - -
-
Includes:
-
DiskUsageExtension, ELFShim, MachOShim, SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
extend/pathname.rb,
- extend/os/mac/extend/pathname.rb,
extend/os/linux/extend/pathname.rb,
extend/os/mac/extend/pathname.rbi,
extend/os/linux/extend/pathname.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from DiskUsageExtension

-

#abv, #disk_usage, #file_count

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from MachOShim

-

#arch, #archs, #change_dylib_id, #change_install_name, #change_rpath, #delete_rpath, #dylib_id, #dynamically_linked_libraries, #i386?, #mach_o_executable?, #ppc64?, #ppc7400?, #resolve_rpath, #resolve_variable_name, #universal?, #x86_64?

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from ELFShim

-

#arch, #dylib_id, #dynamic_elf?, #dynamically_linked_libraries, #elf?, #elf_type, #interpreter, #patch!, #patchelf_patcher, #read_uint16, #read_uint8, #rpath, #rpath_using_patchelf_rb, #save_using_patchelf_rb

- - -
-

Instance Method Details

- - -
-

- - #append_lines(content, **open_args) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Only appends to a file that is already created.

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - -
  • - -
  • - - open_args - - - (T.untyped) - - - -
  • - -
- - -
- - - - -
-
-
-
-176
-177
-178
-179
-180
-
-
# File 'extend/pathname.rb', line 176
-
-def append_lines(content, **open_args)
-  raise "Cannot append file that doesn't exist: #{self}" unless exist?
-
-  T.unsafe(self).open("a", **open_args) { |f| f.puts(content) }
-end
-
-
- -
-

- - #atomic_write(content) ⇒ void - - - - - -

-
- -
- Note: -

This always overwrites.

-
-
- -

This method returns an undefined value.

Write to a file atomically.

- - -
-
-
-

Parameters:

-
    - -
  • - - content - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-
-
# File 'extend/pathname.rb', line 188
-
-def atomic_write(content)
-  old_stat = stat if exist?
-  File.atomic_write(self) do |file|
-    file.write(content)
-  end
-
-  return unless old_stat
-
-  # Try to restore original file's permissions separately
-  # atomic_write does it itself, but it actually erases
-  # them if chown fails
-  begin
-    # Set correct permissions on new file
-    chown(old_stat.uid, nil)
-    chown(nil, old_stat.gid)
-  rescue Errno::EPERM, Errno::EACCES
-    # Changing file ownership failed, moving on.
-    nil
-  end
-
-  begin
-    # This operation will affect filesystem ACL's
-    chmod(old_stat.mode)
-  rescue Errno::EPERM, Errno::EACCES
-    # Changing file permissions failed, moving on.
-    nil
-  end
-end
-
-
- -
-

- - #binary_executable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-458
-459
-460
-
-
# File 'extend/pathname.rb', line 458
-
-def binary_executable?
-  false
-end
-
-
- -
-

- - #cd(&_block) ⇒ T.type_parameter(:U) - - - - - -

-
-

Change to this directory, optionally executing the given block.

- - -
-
-
-

Parameters:

-
    - -
  • - - _block - - - (T.proc.params(path: Pathname).returns(T.type_parameter(:U))) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.type_parameter(:U)) - - - -
  • - -
- -
- - - - -
-
-
-
-313
-314
-315
-
-
# File 'extend/pathname.rb', line 313
-
-def cd(&_block)
-  Dir.chdir(self) { yield self }
-end
-
-
- -
-

- - #cp_path_sub(pattern, replacement) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-
-
# File 'extend/pathname.rb', line 217
-
-def cp_path_sub(pattern, replacement)
-  raise "#{self} does not exist" unless exist?
-
-  dst = sub(pattern, replacement)
-
-  raise "#{self} is the same file as #{dst}" if self == dst
-
-  if directory?
-    dst.mkpath
-  else
-    dst.dirname.mkpath
-    dst = yield(self, dst) if block_given?
-    FileUtils.cp(self, dst)
-  end
-end
-
-
- -
-

- - #ds_store?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-453
-454
-455
-
-
# File 'extend/pathname.rb', line 453
-
-def ds_store?
-  basename.to_s == ".DS_Store"
-end
-
-
- -
-

- - #dylib?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-468
-469
-470
-
-
# File 'extend/pathname.rb', line 468
-
-def dylib?
-  false
-end
-
-
- -
-

- - #ensure_writableObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-
-
# File 'extend/pathname.rb', line 345
-
-def ensure_writable
-  saved_perms = nil
-  unless writable?
-    saved_perms = stat.mode
-    FileUtils.chmod "u+rw", to_path
-  end
-  yield
-ensure
-  chmod saved_perms if saved_perms
-end
-
-
- -
-

- - #env_script_all_files(dst, env) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Writes a wrapper env script and moves all files to the dst.

- - -
-
-
- - -
- - - - -
-
-
-
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-
-
# File 'extend/pathname.rb', line 406
-
-def env_script_all_files(dst, env)
-  dst.mkpath
-  Pathname.glob("#{self}/*") do |file|
-    next if file.directory?
-
-    dst.install(file)
-    new_file = dst.join(file.basename)
-    file.write_env_script(new_file, env)
-  end
-end
-
-
- -
-

- - #extnameString - - - - - -

-
-

Extended to support common double extensions.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-
-
# File 'extend/pathname.rb', line 237
-
-def extname
-  basename = File.basename(self)
-
-  bottle_ext, = HOMEBREW_BOTTLES_EXTNAME_REGEX.match(basename).to_a
-  return bottle_ext if bottle_ext
-
-  archive_ext = basename[/(\.(tar|cpio|pax)\.(gz|bz2|lz|xz|zst|Z))\Z/, 1]
-  return archive_ext if archive_ext
-
-  # Don't treat version numbers as extname.
-  return "" if basename.match?(/\b\d+\.\d+[^.]*\Z/) && !basename.end_with?(".7z")
-
-  File.extname(basename)
-end
-
-
- -
-

- - #file_typeString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-489
-490
-491
-492
-
-
# File 'extend/pathname.rb', line 489
-
-def file_type
-  @file_type ||= system_command("file", args: ["-b", self], print_stderr: false)
-                 .stdout.chomp
-end
-
-
- -
-

- - #install(*sources) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Moves a file from the original location to the Pathname's.

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-
-
# File 'extend/pathname.rb', line 93
-
-def install(*sources)
-  sources.each do |src|
-    case src
-    when Resource
-      src.stage(self)
-    when Resource::Partial
-      src.resource.stage { install(*src.files) }
-    when Array
-      if src.empty?
-        opoo "Tried to install empty array to #{self}"
-        break
-      end
-      src.each { |s| install_p(s, File.basename(s)) }
-    when Hash
-      if src.empty?
-        opoo "Tried to install empty hash to #{self}"
-        break
-      end
-      src.each { |s, new_basename| install_p(s, new_basename) }
-    else
-      install_p(src, File.basename(src))
-    end
-  end
-end
-
-
- -
-

- - #install_infoObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-365
-366
-367
-
-
# File 'extend/pathname.rb', line 365
-
-def install_info
-  quiet_system(which_install_info, "--quiet", to_s, "#{dirname}/dir")
-end
-
-
- -
-

- - #install_metafiles(from = Pathname.pwd) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-
-
# File 'extend/pathname.rb', line 435
-
-def install_metafiles(from = Pathname.pwd)
-  Pathname(from).children.each do |p|
-    next if p.directory?
-    next if File.empty?(p)
-    next unless Metafiles.copy?(p.basename.to_s)
-
-    # Some software symlinks these files (see help2man.rb)
-    filename = p.resolved_path
-    # Some software links metafiles together, so by the time we iterate to one of them
-    # we may have already moved it. libxml2's COPYING and Copyright are affected by this.
-    next unless filename.exist?
-
-    filename.chmod 0644
-    install(filename)
-  end
-end
-
-
- -
-
-
-

This method returns an undefined value.

Creates symlinks to sources in this folder.

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-
-
# File 'extend/pathname.rb', line 150
-
-def install_symlink(*sources)
-  sources.each do |src|
-    case src
-    when Array
-      src.each { |s| install_symlink_p(s, File.basename(s)) }
-    when Hash
-      src.each { |s, new_basename| install_symlink_p(s, new_basename) }
-    else
-      install_symlink_p(src, File.basename(src))
-    end
-  end
-end
-
-
- -
-

- - #mach_o_bundle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-463
-464
-465
-
-
# File 'extend/pathname.rb', line 463
-
-def mach_o_bundle?
-  false
-end
-
-
- -
-

- - #magic_numberString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-478
-479
-480
-481
-482
-483
-484
-485
-486
-
-
# File 'extend/pathname.rb', line 478
-
-def magic_number
-  @magic_number ||= if directory?
-    ""
-  else
-    # Length of the longest regex (currently Tar).
-    max_magic_number_length = 262
-    binread(max_magic_number_length) || ""
-  end
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-340
-341
-342
-343
-
-
# File 'extend/pathname.rb', line 340
-
-def make_relative_symlink(src)
-  dirname.mkpath
-  File.symlink(src.relative_path_from(dirname), self)
-end
-
-
- -
-

- - #resolved_pathPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-326
-327
-328
-
-
# File 'extend/pathname.rb', line 326
-
-def resolved_path
-  symlink? ? dirname.join(readlink) : self
-end
-
-
- -
-

- - #resolved_path_exists?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-331
-332
-333
-334
-335
-336
-337
-338
-
-
# File 'extend/pathname.rb', line 331
-
-def resolved_path_exists?
-  link = readlink
-rescue ArgumentError
-  # The link target contains NUL bytes
-  false
-else
-  dirname.join(link).exist?
-end
-
-
- -
-

- - #rmdir_if_possibleBoolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

I don't trust the children.length == 0 check particularly, not to mention -it is slow to enumerate the whole directory just to see if it is empty, -instead rely on good ol' libc and the filesystem

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-
-
# File 'extend/pathname.rb', line 264
-
-def rmdir_if_possible
-  rmdir
-  true
-rescue Errno::ENOTEMPTY
-  if (ds_store = join(".DS_Store")).exist? && children.length == 1
-    ds_store.unlink
-    retry
-  else
-    false
-  end
-rescue Errno::EACCES, Errno::ENOENT, Errno::EBUSY, Errno::EPERM
-  false
-end
-
-
- -
-

- - #rmtree(noop: nil, verbose: nil, secure: nil) ⇒ Object - - - - - -

-
-

Like regular rmtree, except it never ignores errors.

- -

This was the default behaviour in Ruby 3.1 and earlier.

- - -
-
-
- - -
- - - - -
-
-
-
-507
-508
-509
-510
-511
-512
-513
-514
-515
-
-
# File 'extend/pathname.rb', line 507
-
-def rmtree(noop: nil, verbose: nil, secure: nil)
-  # Ideally we'd odeprecate this but probably can't given gems so let's
-  # create a RuboCop autocorrect instead soon.
-  # This is why monkeypatching is non-ideal (but right solution to get
-  # Ruby 3.3 over the line).
-  # odeprecated "rmtree", "FileUtils#rm_r"
-  FileUtils.rm_r(@path, noop:, verbose:, secure:)
-  nil
-end
-
-
- -
-

- - #rpathsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-473
-474
-475
-
-
# File 'extend/pathname.rb', line 473
-
-def rpaths
-  []
-end
-
-
- -
-

- - #sha256String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-290
-291
-292
-293
-
-
# File 'extend/pathname.rb', line 290
-
-def sha256
-  require "digest/sha2"
-  Digest::SHA256.file(self).hexdigest
-end
-
-
- -
-

- - #stemString - - - - - -

-
-

For filetypes we support, returns basename without extension.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-256
-257
-258
-
-
# File 'extend/pathname.rb', line 256
-
-def stem
-  File.basename(self, extname)
-end
-
-
- -
-

- - #subdirsArray<Pathname> - - - - - -

-
-

Get all sub-directories of this directory.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-321
-322
-323
-
-
# File 'extend/pathname.rb', line 321
-
-def subdirs
-  children.select(&:directory?)
-end
-
-
- -
-

- - #text_executable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-285
-286
-287
-
-
# File 'extend/pathname.rb', line 285
-
-def text_executable?
-  /\A#!\s*\S+/.match?(open("r") { |f| f.read(1024) })
-end
-
-
- -
-

- - #uninstall_infoObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-369
-370
-371
-
-
# File 'extend/pathname.rb', line 369
-
-def uninstall_info
-  quiet_system(which_install_info, "--delete", "--quiet", to_s, "#{dirname}/dir")
-end
-
-
- -
-

- - #verify_checksum(expected) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - expected - - - (Checksum, nil) - - - -
  • - -
- -

Raises:

- - -
- - - - -
-
-
-
-296
-297
-298
-299
-300
-301
-
-
# File 'extend/pathname.rb', line 296
-
-def verify_checksum(expected)
-  raise ChecksumMissingError if expected.blank?
-
-  actual = Checksum.new(sha256.downcase)
-  raise ChecksumMismatchError.new(self, expected, actual) if expected != actual
-end
-
-
- -
-

- - #versionVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-279
-280
-281
-282
-
-
# File 'extend/pathname.rb', line 279
-
-def version
-  require "version"
-  Version.parse(basename)
-end
-
-
- -
-

- - #which_install_infoObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-356
-357
-358
-359
-360
-361
-362
-363
-
-
# File 'extend/pathname.rb', line 356
-
-def which_install_info
-  @which_install_info ||=
-    if File.executable?("/usr/bin/install-info")
-      "/usr/bin/install-info"
-    elsif Formula["texinfo"].any_version_installed?
-      Formula["texinfo"].opt_bin/"install-info"
-    end
-end
-
-
- -
-

- - #write_env_script(target, args, env = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Writes an exec script that sets environment variables.

- - -
-
-
- - -
- - - - -
-
-
-
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-
-
# File 'extend/pathname.rb', line 391
-
-def write_env_script(target, args, env = nil)
-  unless env
-    env = args
-    args = nil
-  end
-  env_export = +""
-  env.each { |key, value| env_export << "#{key}=\"#{value}\" " }
-  dirname.mkpath
-  write <<~SH
-    #!/bin/bash
-    #{env_export}exec "#{target}" #{args} "$@"
-  SH
-end
-
-
- -
-

- - #write_exec_script(*targets) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Writes an exec script in this folder for each target pathname.

- - -
-
-
- - -
- - - - -
-
-
-
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-
-
# File 'extend/pathname.rb', line 374
-
-def write_exec_script(*targets)
-  targets.flatten!
-  if targets.empty?
-    opoo "Tried to write exec scripts to #{self} for an empty list of targets"
-    return
-  end
-  mkpath
-  targets.each do |target|
-    target = Pathname.new(target) # allow pathnames or strings
-    join(target.basename).write <<~SH
-      #!/bin/bash
-      exec "#{target}" "$@"
-    SH
-  end
-end
-
-
- -
-

- - #write_jar_script(target_jar, script_name, java_opts = "", java_version: nil) ⇒ Integer - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Writes an exec script that invokes a Java jar.

- - -
-
-
-

Parameters:

-
    - -
  • - - target_jar - - - (String, Pathname) - - - -
  • - -
  • - - script_name - - - (String, Pathname) - - - -
  • - -
  • - - java_opts - - - (String) - - - (defaults to: "") - - -
  • - -
  • - - java_version - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-426
-427
-428
-429
-430
-431
-432
-433
-
-
# File 'extend/pathname.rb', line 426
-
-def write_jar_script(target_jar, script_name, java_opts = "", java_version: nil)
-  mkpath
-  (self/script_name).write <<~EOS
-    #!/bin/bash
-    export JAVA_HOME="#{Language::Java.overridable_java_home_env(java_version)[:JAVA_HOME]}"
-    exec "${JAVA_HOME}/bin/java" #{java_opts} -jar "#{target_jar}" "$@"
-  EOS
-end
-
-
- -
-

- - #zipinfoArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-495
-496
-497
-498
-499
-500
-
-
# File 'extend/pathname.rb', line 495
-
-def zipinfo
-  @zipinfo ||= system_command("zipinfo", args: ["-1", self], print_stderr: false)
-               .stdout
-               .encode(Encoding::UTF_8, invalid: :replace)
-               .split("\n")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/PkgVersion.html b/docs/PkgVersion.html deleted file mode 100644 index 07c4d9577..000000000 --- a/docs/PkgVersion.html +++ /dev/null @@ -1,1196 +0,0 @@ - - - - - - - Class: PkgVersion - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: PkgVersion - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
Comparable
-
- - - - - - -
-
Defined in:
-
pkg_version.rb,
- pkg_version.rbi,
sorbet/rbi/parlour.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Constructor Details

- -
-

- - #initialize(version, revision) ⇒ PkgVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of PkgVersion.

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-
-
# File 'pkg_version.rb', line 24
-
-def initialize(version, revision)
-  @version = version
-  @revision = revision
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #revisionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'pkg_version.rb', line 14
-
-def revision
-  @revision
-end
-
-
- - - -
-

- - #versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'pkg_version.rb', line 14
-
-def version
-  @version
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .parse(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-
-
# File 'pkg_version.rb', line 18
-
-def self.parse(path)
-  _, version, revision = *path.match(REGEX)
-  version = Version.new(version)
-  new(version, revision.to_i)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #head?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'pkg_version.rb', line 29
-
-def head?
-  version.head?
-end
-
-
- -
-

- - #major(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-242
-
-
# File 'sorbet/rbi/parlour.rbi', line 242
-
-def major(*args, **options, &block); end
-
-
- -
-

- - #major_minor(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-251
-
-
# File 'sorbet/rbi/parlour.rbi', line 251
-
-def major_minor(*args, **options, &block); end
-
-
- -
-

- - #major_minor_patch(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-254
-
-
# File 'sorbet/rbi/parlour.rbi', line 254
-
-def major_minor_patch(*args, **options, &block); end
-
-
- -
-

- - #minor(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-245
-
-
# File 'sorbet/rbi/parlour.rbi', line 245
-
-def minor(*args, **options, &block); end
-
-
- -
-

- - #patch(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-248
-
-
# File 'sorbet/rbi/parlour.rbi', line 248
-
-def patch(*args, **options, &block); end
-
-
- -
-

- - #to_strString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'pkg_version.rb', line 34
-
-def to_str
-  if revision.positive?
-    "#{version}_#{revision}"
-  else
-    version.to_s
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/PourBottleCheck.html b/docs/PourBottleCheck.html deleted file mode 100644 index b4015dc72..000000000 --- a/docs/PourBottleCheck.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - Class: PourBottleCheck - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: PourBottleCheck - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
OnSystem::MacOSAndLinux
-
- - - - - - -
-
Defined in:
-
software_spec.rb
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from OnSystem::MacOSAndLinux

-

included

-
-

Constructor Details

- -
-

- - #initialize(formula) ⇒ PourBottleCheck - - - - - -

-
-

Returns a new instance of PourBottleCheck.

- - -
-
-
- - -
- - - - -
-
-
-
-650
-651
-652
-
-
# File 'software_spec.rb', line 650
-
-def initialize(formula)
-  @formula = formula
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #reason(reason) ⇒ Object - - - - - -

- - - - -
-
-
-
-654
-655
-656
-
-
# File 'software_spec.rb', line 654
-
-def reason(reason)
-  @formula.pour_bottle_check_unsatisfied_reason = reason
-end
-
-
- -
-

- - #satisfy(&block) ⇒ Object - - - - - -

- - - - -
-
-
-
-658
-659
-660
-
-
# File 'software_spec.rb', line 658
-
-def satisfy(&block)
-  @formula.send(:define_method, :pour_bottle?, &block)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/PyPI.html b/docs/PyPI.html deleted file mode 100644 index d6bd466d6..000000000 --- a/docs/PyPI.html +++ /dev/null @@ -1,1105 +0,0 @@ - - - - - - - Module: PyPI - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: PyPI - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/pypi.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for updating PyPI resources.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Package - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .normalize_python_package(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-396
-397
-398
-399
-400
-
-
# File 'utils/pypi.rb', line 396
-
-def self.normalize_python_package(name)
-  # This normalization is defined in the PyPA packaging specifications;
-  # https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
-  name.gsub(/[-_.]+/, "-").downcase
-end
-
-
- -
-

- - .pip_report(packages, python_name: "python", print_stderr: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-
-
# File 'utils/pypi.rb', line 402
-
-def self.pip_report(packages, python_name: "python", print_stderr: false)
-  return [] if packages.blank?
-
-  command = [
-    Formula[python_name].opt_libexec/"bin/python", "-m", "pip", "install", "-q", "--disable-pip-version-check",
-    "--dry-run", "--ignore-installed", "--report=/dev/stdout", *packages.map(&:to_s)
-  ]
-  options = {}
-  options[:err] = :err if print_stderr
-  pip_output = Utils.popen_read({ "PIP_REQUIRE_VIRTUALENV" => "false" }, *command, **options)
-  unless $CHILD_STATUS.success?
-    odie <<~EOS
-      Unable to determine dependencies for "#{packages.join(" ")}" because of a failure when running
-      `#{command.join(" ")}`.
-      Please update the resources manually.
-    EOS
-  end
-  pip_report_to_packages(JSON.parse(pip_output)).uniq
-end
-
-
- -
-

- - .pip_report_to_packages(report) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-
-
# File 'utils/pypi.rb', line 422
-
-def self.pip_report_to_packages(report)
-  return [] if report.blank?
-
-  report["install"].filter_map do |package|
-    name = normalize_python_package(package["metadata"]["name"])
-    version = package["metadata"]["version"]
-
-    Package.new "#{name}==#{version}"
-  end
-end
-
-
- -
-

- - .update_pypi_url(url, version) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-
-
# File 'utils/pypi.rb', line 179
-
-def self.update_pypi_url(url, version)
-  package = Package.new url, is_url: true
-
-  return unless package.valid_pypi_package?
-
-  _, url = package.pypi_info(new_version: version)
-  url
-rescue ArgumentError
-  nil
-end
-
-
- -
-

- - .update_python_resources!(formula, version: nil, package_name: nil, extra_packages: nil, exclude_packages: nil, dependencies: nil, install_dependencies: false, print_only: false, silent: false, verbose: false, ignore_non_pypi_packages: false) ⇒ Boolean? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return true if resources were checked (even if no change).

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - version - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - package_name - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - extra_packages - - - (Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - exclude_packages - - - (Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - dependencies - - - (Array<String>, nil) - - - (defaults to: nil) - - -
  • - -
  • - - install_dependencies - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - print_only - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - silent - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - verbose - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - ignore_non_pypi_packages - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-
-
# File 'utils/pypi.rb', line 206
-
-def self.update_python_resources!(formula, version: nil, package_name: nil, extra_packages: nil,
-                                  exclude_packages: nil, dependencies: nil, install_dependencies: false,
-                                  print_only: false, silent: false, verbose: false,
-                                  ignore_non_pypi_packages: false)
-
-  auto_update_list = formula.tap&.pypi_formula_mappings
-  if auto_update_list.present? && auto_update_list.key?(formula.full_name) &&
-     package_name.blank? && extra_packages.blank? && exclude_packages.blank?
-
-    list_entry = auto_update_list[formula.full_name]
-    case list_entry
-    when false
-      unless print_only
-        odie "The resources for \"#{formula.name}\" need special attention. Please update them manually."
-      end
-    when String
-      package_name = list_entry
-    when Hash
-      package_name = list_entry["package_name"]
-      extra_packages = list_entry["extra_packages"]
-      exclude_packages = list_entry["exclude_packages"]
-      dependencies = list_entry["dependencies"]
-    end
-  end
-
-  missing_dependencies = Array(dependencies).reject do |dependency|
-    Formula[dependency].any_version_installed?
-  rescue FormulaUnavailableError
-    odie "Formula \"#{dependency}\" not found but it is a dependency to update \"#{formula.name}\" resources."
-  end
-  if missing_dependencies.present?
-    missing_msg = "formulae required to update \"#{formula.name}\" resources: #{missing_dependencies.join(", ")}"
-    odie "Missing #{missing_msg}" unless install_dependencies
-    ohai "Installing #{missing_msg}"
-    missing_dependencies.each(&method(:ensure_formula_installed!))
-  end
-
-  python_deps = formula.deps
-                       .select { |d| d.name.match?(/^python(@.+)?$/) }
-                       .map(&:to_formula)
-                       .sort_by(&:version)
-                       .reverse
-  python_name = if python_deps.empty?
-    "python"
-  else
-    (python_deps.find(&:any_version_installed?) || python_deps.first).name
-  end
-
-  main_package = if package_name.present?
-    package_string = package_name
-    package_string += "==#{formula.version}" if version.blank? && formula.version.present?
-    Package.new(package_string, python_name:)
-  elsif package_name == ""
-    nil
-  else
-    stable = T.must(formula.stable)
-    url = if stable.specs[:tag].present?
-      url = "git+#{stable.url}@#{stable.specs[:tag]}"
-    else
-      stable.url
-    end
-    Package.new(url, is_url: true, python_name:)
-  end
-
-  if main_package.nil?
-    odie "The main package was skipped but no PyPI `extra_packages` were provided." if extra_packages.blank?
-  elsif version.present?
-    if main_package.valid_pypi_package?
-      main_package.version = version
-    else
-      return if ignore_non_pypi_packages
-
-      odie "The main package is not a PyPI package, meaning that version-only updates cannot be \
-        performed. Please update its URL manually."
-    end
-  end
-
-  extra_packages = (extra_packages || []).map { |p| Package.new p }
-  exclude_packages = (exclude_packages || []).map { |p| Package.new p }
-  exclude_packages += %w[argparse pip wsgiref].map { |p| Package.new p }
-  if (newest_python = python_deps.first) && newest_python.version < Version.new("3.12")
-    exclude_packages.append(Package.new("setuptools"))
-  end
-  # remove packages from the exclude list if we've explicitly requested them as an extra package
-  exclude_packages.delete_if { |package| extra_packages.include?(package) }
-
-  input_packages = Array(main_package)
-  extra_packages.each do |extra_package|
-    if !extra_package.valid_pypi_package? && !ignore_non_pypi_packages
-      odie "\"#{extra_package}\" is not available on PyPI."
-    end
-
-    input_packages.each do |existing_package|
-      if existing_package.same_package?(extra_package) && existing_package.version != extra_package.version
-        odie "Conflicting versions specified for the `#{extra_package.name}` package: " \
-             "#{existing_package.version}, #{extra_package.version}"
-      end
-    end
-
-    input_packages << extra_package unless input_packages.include? extra_package
-  end
-
-  formula.resources.each do |resource|
-    if !print_only && !resource.url.start_with?(PYTHONHOSTED_URL_PREFIX)
-      odie "\"#{formula.name}\" contains non-PyPI resources. Please update the resources manually."
-    end
-  end
-
-  ensure_formula_installed!(python_name)
-
-  # Resolve the dependency tree of all input packages
-  show_info = !print_only && !silent
-  ohai "Retrieving PyPI dependencies for \"#{input_packages.join(" ")}\"..." if show_info
-  found_packages = pip_report(input_packages, python_name:, print_stderr: verbose && show_info)
-  # Resolve the dependency tree of excluded packages to prune the above
-  exclude_packages.delete_if { |package| found_packages.exclude? package }
-  ohai "Retrieving PyPI dependencies for excluded \"#{exclude_packages.join(" ")}\"..." if show_info
-  exclude_packages = pip_report(exclude_packages, python_name:, print_stderr: verbose && show_info)
-  exclude_packages += [Package.new(main_package.name)] unless main_package.nil?
-
-  new_resource_blocks = ""
-  found_packages.sort.each do |package|
-    if exclude_packages.include? package
-      ohai "Excluding \"#{package}\"" if show_info
-      exclude_packages.delete package
-      next
-    end
-
-    ohai "Getting PyPI info for \"#{package}\"" if show_info
-    name, url, checksum = package.pypi_info
-    # Fail if unable to find name, url or checksum for any resource
-    if name.blank?
-      odie "Unable to resolve some dependencies. Please update the resources for \"#{formula.name}\" manually."
-    elsif url.blank? || checksum.blank?
-      odie <<~EOS
-        Unable to find the URL and/or sha256 for the "#{name}" resource.
-        Please update the resources for "#{formula.name}" manually.
-      EOS
-    end
-
-    # Append indented resource block
-    new_resource_blocks += <<-EOS
-resource "#{name}" do
-  url "#{url}"
-  sha256 "#{checksum}"
-end
-
-    EOS
-  end
-
-  odie "Excluded superfluous packages: #{exclude_packages.join(", ")}" if exclude_packages.any?
-
-  if print_only
-    puts new_resource_blocks.chomp
-    return
-  end
-
-  # Check whether resources already exist (excluding virtualenv dependencies)
-  if formula.resources.all? { |resource| resource.name.start_with?("homebrew-") }
-    # Place resources above install method
-    inreplace_regex = /  def install/
-    new_resource_blocks += "  def install"
-  else
-    # Replace existing resource blocks with new resource blocks
-    inreplace_regex = /
-      \ \ (
-      resource\ .*\ do\s+
-        url\ .*\s+
-        sha256\ .*\s+
-        ((\#.*\s+)*
-        patch\ (.*\ )?do\s+
-          url\ .*\s+
-          sha256\ .*\s+
-        end\s+)*
-      end\s+)+
-    /x
-    new_resource_blocks += "  "
-  end
-
-  ohai "Updating resource blocks" unless silent
-  Utils::Inreplace.inreplace formula.path do |s|
-    if T.must(s.inreplace_string.split(/^  test do\b/, 2).first).scan(inreplace_regex).length > 1
-      odie "Unable to update resource blocks for \"#{formula.name}\" automatically. Please update them manually."
-    end
-    s.sub! inreplace_regex, new_resource_blocks
-  end
-
-  true
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/PyPI/Package.html b/docs/PyPI/Package.html deleted file mode 100644 index 927944c6e..000000000 --- a/docs/PyPI/Package.html +++ /dev/null @@ -1,932 +0,0 @@ - - - - - - - Class: PyPI::Package - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: PyPI::Package - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/pypi.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Represents a Python package. -This package can be a PyPI package (either by name/version or PyPI distribution URL), -or it can be a non-PyPI URL.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(package_string, is_url: false, python_name: "python") ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - package_string - - - (String) - - - -
  • - -
  • - - is_url - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - python_name - - - (String) - - - (defaults to: "python") - - -
  • - -
- - -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-20
-
-
# File 'utils/pypi.rb', line 14
-
-def initialize(package_string, is_url: false, python_name: "python")
-  @pypi_info = nil
-  @package_string = package_string
-  @is_url = is_url
-  @is_pypi_url = package_string.start_with? PYTHONHOSTED_URL_PREFIX
-  @python_name = python_name
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #extrasArray<String, nil> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-29
-30
-31
-32
-
-
# File 'utils/pypi.rb', line 29
-
-def extras
-   if @extras.blank?
-  @extras
-end
-
-
- -
-

- - #nameString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-26
-
-
# File 'utils/pypi.rb', line 23
-
-def name
-   if @name.blank?
-  @name
-end
-
-
- -
-

- - #pypi_info(new_version: nil) ⇒ Array<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get name, URL, SHA-256 checksum and latest version for a given package. -This only works for packages from PyPI or from a PyPI URL; packages -derived from non-PyPI URLs will produce nil here.

- - -
-
-
-

Parameters:

-
    - -
  • - - new_version - - - (String, Version, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-
-
# File 'utils/pypi.rb', line 56
-
-def pypi_info(new_version: nil)
-  return unless valid_pypi_package?
-  return @pypi_info if @pypi_info.present? && new_version.blank?
-
-  new_version ||= version
-   = if new_version.present?
-    "https://pypi.org/pypi/#{name}/#{new_version}/json"
-  else
-    "https://pypi.org/pypi/#{name}/json"
-  end
-  out, _, status = Utils::Curl.curl_output , "--location", "--fail"
-
-  return unless status.success?
-
-  begin
-    json = JSON.parse out
-  rescue JSON::ParserError
-    return
-  end
-
-  sdist = json["urls"].find { |url| url["packagetype"] == "sdist" }
-  return if sdist.nil?
-
-  @pypi_info = [
-    PyPI.normalize_python_package(json["info"]["name"]), sdist["url"],
-    sdist["digests"]["sha256"], json["info"]["version"]
-  ]
-end
-
-
- -
-

- - #same_package?(other) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - other - - - (Package) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-98
-99
-100
-101
-
-
# File 'utils/pypi.rb', line 98
-
-def same_package?(other)
-  # These names are pre-normalized, so we can compare them directly.
-  name == other.name
-end
-
-
- -
-

- - #valid_pypi_package?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'utils/pypi.rb', line 48
-
-def valid_pypi_package?
-  @is_pypi_url || !@is_url
-end
-
-
- -
-

- - #versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-38
-
-
# File 'utils/pypi.rb', line 35
-
-def version
-   if @version.blank?
-  @version
-end
-
-
- -
-

- - #version=(new_version) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - new_version - - - (String) - - - -
  • - -
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-
-
# File 'utils/pypi.rb', line 41
-
-def version=(new_version)
-  raise ArgumentError, "can't update version for non-PyPI packages" unless valid_pypi_package?
-
-  @version = new_version
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Readall.html b/docs/Readall.html deleted file mode 100644 index 2bd53db74..000000000 --- a/docs/Readall.html +++ /dev/null @@ -1,756 +0,0 @@ - - - - - - - Module: Readall - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Readall - - - Private -

-
- - - - -
-
Extended by:
-
Cachable, SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
extend/os/mac/readall.rb,
- readall.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for validating syntax in taps.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .valid_aliases?(alias_dir, formula_dir) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'readall.rb', line 28
-
-def self.valid_aliases?(alias_dir, formula_dir)
-  return true unless alias_dir.directory?
-
-  failed = T.let(false, T::Boolean)
-  alias_dir.each_child do |f|
-    if !f.symlink?
-      onoe "Non-symlink alias: #{f}"
-      failed = true
-    elsif !f.file?
-      onoe "Non-file alias: #{f}"
-      failed = true
-    end
-
-    if formula_dir.glob("**/#{f.basename}.rb").any?(&:exist?)
-      onoe "Formula duplicating alias: #{f}"
-      failed = true
-    end
-  end
-  !failed
-end
-
-
- -
-

- - .valid_casks?(_tap, os_name: nil, arch: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'extend/os/mac/readall.rb', line 8
-
-def valid_casks?(tap, os_name: nil, arch: Hardware::CPU.type)
-  return true if os_name == :linux
-
-  current_macos_version = if os_name.is_a?(Symbol)
-    MacOSVersion.from_symbol(os_name)
-  else
-    MacOS.version
-  end
-
-  success = T.let(true, T::Boolean)
-  tap.cask_files.each do |file|
-    cask = Cask::CaskLoader.load(file)
-
-    # Fine to have missing URLs for unsupported macOS
-    macos_req = cask.depends_on.macos
-    next if macos_req&.version && Array(macos_req.version).none? do |macos_version|
-      current_macos_version.compare(macos_req.comparator, macos_version)
-    end
-
-    raise "Missing URL" if cask.url.nil?
-  rescue Interrupt
-    raise
-  rescue Exception => e # rubocop:disable Lint/RescueException
-    os_and_arch = "macOS #{current_macos_version} on #{arch}"
-    onoe "Invalid cask (#{os_and_arch}): #{file}"
-    $stderr.puts e
-    success = false
-  end
-  success
-end
-
-
- -
-

- - .valid_formulae?(tap, bottle_tag: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'readall.rb', line 49
-
-def self.valid_formulae?(tap, bottle_tag: nil)
-  cache[:valid_formulae] ||= {}
-
-  success = T.let(true, T::Boolean)
-  tap.formula_files.each do |file|
-    valid = cache[:valid_formulae][file]
-    next if valid == true || valid&.include?(bottle_tag)
-
-    formula_name = file.basename(".rb").to_s
-    formula_contents = file.read(encoding: "UTF-8")
-
-    readall_namespace = "ReadallNamespace"
-    readall_formula_class = Formulary.load_formula(formula_name, file, formula_contents, readall_namespace,
-                                                   flags: [], ignore_errors: false)
-    readall_formula = readall_formula_class.new(formula_name, file, :stable, tap:)
-    readall_formula.to_hash
-    # TODO: Remove check for MACOS_MODULE_REGEX once the `MacOS` module is undefined on Linux
-    cache[:valid_formulae][file] = if readall_formula.on_system_blocks_exist? ||
-                                      formula_contents.match?(MACOS_MODULE_REGEX)
-      [bottle_tag, *cache[:valid_formulae][file]]
-    else
-      true
-    end
-  rescue Interrupt
-    raise
-  rescue Exception => e # rubocop:disable Lint/RescueException
-    onoe "Invalid formula (#{bottle_tag}): #{file}"
-    $stderr.puts e
-    success = false
-  end
-  success
-end
-
-
- -
-

- - .valid_ruby_syntax?(ruby_files) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'readall.rb', line 19
-
-def self.valid_ruby_syntax?(ruby_files)
-  failed = T.let(false, T::Boolean)
-  ruby_files.each do |ruby_file|
-    # As a side effect, print syntax errors/warnings to `$stderr`.
-    failed = true if syntax_errors_or_warnings?(ruby_file)
-  end
-  !failed
-end
-
-
- -
-

- - .valid_tap?(tap, aliases: false, no_simulate: false, os_arch_combinations: OnSystem::ALL_OS_ARCH_COMBINATIONS) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-
-
# File 'readall.rb', line 86
-
-def self.valid_tap?(tap, aliases: false, no_simulate: false,
-                    os_arch_combinations: OnSystem::ALL_OS_ARCH_COMBINATIONS)
-  success = true
-
-  if aliases
-    valid_aliases = valid_aliases?(tap.alias_dir, tap.formula_dir)
-    success = false unless valid_aliases
-  end
-
-  if no_simulate
-    success = false unless valid_formulae?(tap)
-    success = false unless valid_casks?(tap)
-  else
-    os_arch_combinations.each do |os, arch|
-      bottle_tag = Utils::Bottles::Tag.new(system: os, arch:)
-      next unless bottle_tag.valid_combination?
-
-      Homebrew::SimulateSystem.with(os:, arch:) do
-        success = false unless valid_formulae?(tap, bottle_tag:)
-        success = false unless valid_casks?(tap, os_name: os, arch:)
-      end
-    end
-  end
-
-  success
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Repology.html b/docs/Repology.html deleted file mode 100644 index 794057965..000000000 --- a/docs/Repology.html +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - Module: Repology - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Repology - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/repology.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Repology API client.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
HOMEBREW_CORE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"homebrew"
- -
HOMEBREW_CASK = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"homebrew_casks"
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .latest_version(repositories) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-
-
# File 'utils/repology.rb', line 82
-
-def self.latest_version(repositories)
-  # The status is "unique" when the package is present only in Homebrew, so
-  # Repology has no way of knowing if the package is up-to-date.
-  is_unique = repositories.find do |repo|
-    repo["status"] == "unique"
-  end.present?
-
-  return "present only in Homebrew" if is_unique
-
-  latest_version = repositories.find do |repo|
-    repo["status"] == "newest"
-  end
-
-  # Repology cannot identify "newest" versions for packages without a version
-  # scheme
-  return "no latest version" if latest_version.blank?
-
-  Version.new(latest_version["version"])
-end
-
-
- -
-

- - .parse_api_response(limit = nil, last_package = "", repository:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'utils/repology.rb', line 49
-
-def self.parse_api_response(limit = nil, last_package = "", repository:)
-  package_term = case repository
-  when HOMEBREW_CORE
-    "formulae"
-  when HOMEBREW_CASK
-    "casks"
-  else
-    "packages"
-  end
-
-  ohai "Querying outdated #{package_term} from Repology"
-
-  page_no = 1
-  outdated_packages = {}
-
-  while page_no <= MAX_PAGINATION
-    odebug "Paginating Repology API page: #{page_no}"
-
-    response = query_api(last_package, repository:)
-    outdated_packages.merge!(response)
-    last_package = response.keys.max
-
-    page_no += 1
-    break if (limit && outdated_packages.size >= limit) || response.size <= 1
-  end
-
-  package_term = package_term.chop if outdated_packages.size == 1
-  puts "#{outdated_packages.size} outdated #{package_term} found"
-  puts
-
-  outdated_packages.sort.to_h
-end
-
-
- -
-

- - .query_api(last_package_in_response = "", repository:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-
-
# File 'utils/repology.rb', line 13
-
-def self.query_api(last_package_in_response = "", repository:)
-  last_package_in_response += "/" if last_package_in_response.present?
-  url = "https://repology.org/api/v1/projects/#{last_package_in_response}?inrepo=#{repository}&outdated=1"
-
-  output, errors, = Utils::Curl.curl_output(url.to_s, "--silent",
-                                            use_homebrew_curl: !Utils::Curl.curl_supports_tls13?)
-  JSON.parse(output)
-rescue
-  if Homebrew::EnvConfig.developer?
-    $stderr.puts errors
-  else
-    odebug errors
-  end
-
-  raise
-end
-
-
- -
-

- - .single_package_query(name, repository:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'utils/repology.rb', line 30
-
-def self.single_package_query(name, repository:)
-  url = "https://repology.org/api/v1/project/#{name}"
-
-  output, errors, = Utils::Curl.curl_output("--location", "--silent", url.to_s,
-                                            use_homebrew_curl: !Utils::Curl.curl_supports_tls13?)
-
-  data = JSON.parse(output)
-  { name => data }
-rescue => e
-  error_output = [errors, "#{e.class}: #{e}", Utils::Backtrace.clean(e)].compact
-  if Homebrew::EnvConfig.developer?
-    $stderr.puts(*error_output)
-  else
-    odebug(*error_output)
-  end
-
-  nil
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Reporter.html b/docs/Reporter.html deleted file mode 100644 index a0275d824..000000000 --- a/docs/Reporter.html +++ /dev/null @@ -1,993 +0,0 @@ - - - - - - - Class: Reporter - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Reporter - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/update-report.rb
-
- -
- -

Defined Under Namespace

-

- - - - - Classes: ReporterRevisionUnsetError - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(tap, api_names_txt: nil, api_names_before_txt: nil, api_dir_prefix: nil) ⇒ Reporter - - - - - -

-
-

Returns a new instance of Reporter.

- - -
-
-
- - -
- - - - -
-
-
-
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-
-
# File 'cmd/update-report.rb', line 423
-
-def initialize(tap, api_names_txt: nil, api_names_before_txt: nil, api_dir_prefix: nil)
-  @tap = tap
-
-  # This is slightly involved/weird but all the #report logic is shared so it's worth it.
-  if installed_from_api?(api_names_txt, api_names_before_txt, api_dir_prefix)
-    @api_names_txt = api_names_txt
-    @api_names_before_txt = api_names_before_txt
-    @api_dir_prefix = api_dir_prefix
-  else
-    initial_revision_var = "HOMEBREW_UPDATE_BEFORE#{tap.repo_var_suffix}"
-    @initial_revision = ENV[initial_revision_var].to_s
-    raise ReporterRevisionUnsetError, initial_revision_var if @initial_revision.empty?
-
-    current_revision_var = "HOMEBREW_UPDATE_AFTER#{tap.repo_var_suffix}"
-    @current_revision = ENV[current_revision_var].to_s
-    raise ReporterRevisionUnsetError, current_revision_var if @current_revision.empty?
-  end
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #migrate_cask_renameObject - - - - - -

- - - - -
-
-
-
-671
-672
-673
-674
-675
-
-
# File 'cmd/update-report.rb', line 671
-
-def migrate_cask_rename
-  Cask::Caskroom.casks.each do |cask|
-    Cask::Migrator.migrate_if_needed(cask)
-  end
-end
-
-
- -
-

- - #migrate_formula_rename(force:, verbose:) ⇒ Object - - - - - -

- - - - -
-
-
-
-677
-678
-679
-680
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-
-
# File 'cmd/update-report.rb', line 677
-
-def migrate_formula_rename(force:, verbose:)
-  Formula.installed.each do |formula|
-    next unless Migrator.needs_migration?(formula)
-
-    oldnames_to_migrate = formula.oldnames.select do |oldname|
-      oldname_rack = HOMEBREW_CELLAR/oldname
-      next false unless oldname_rack.exist?
-
-      if oldname_rack.subdirs.empty?
-        oldname_rack.rmdir_if_possible
-        next false
-      end
-
-      true
-    end
-    next if oldnames_to_migrate.empty?
-
-    Migrator.migrate_if_needed(formula, force:)
-  end
-end
-
-
- -
-

- - #migrate_tap_migrationObject - - - - - -

- - - - -
-
-
-
-592
-593
-594
-595
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-638
-639
-640
-641
-642
-643
-644
-645
-646
-647
-648
-649
-650
-651
-652
-653
-654
-655
-656
-657
-658
-659
-660
-661
-662
-663
-664
-665
-666
-667
-668
-669
-
-
# File 'cmd/update-report.rb', line 592
-
-def migrate_tap_migration
-  (report[:D] + report[:DC]).each do |full_name|
-    name = full_name.split("/").last
-    new_tap_name = tap.tap_migrations[name]
-    next if new_tap_name.nil? # skip if not in tap_migrations list.
-
-    new_tap_user, new_tap_repo, new_tap_new_name = new_tap_name.split("/")
-    new_name = if new_tap_new_name
-      new_full_name = new_tap_new_name
-      new_tap_name = "#{new_tap_user}/#{new_tap_repo}"
-      new_tap_new_name
-    else
-      new_full_name = "#{new_tap_name}/#{name}"
-      name
-    end
-
-    # This means it is a cask
-    if report[:DC].include? full_name
-      next unless (HOMEBREW_PREFIX/"Caskroom"/new_name).exist?
-
-      new_tap = Tap.fetch(new_tap_name)
-      new_tap.ensure_installed!
-      ohai "#{name} has been moved to Homebrew.", <<~EOS
-        To uninstall the cask, run:
-          brew uninstall --cask --force #{name}
-      EOS
-      next if (HOMEBREW_CELLAR/new_name.split("/").last).directory?
-
-      ohai "Installing #{new_name}..."
-      system HOMEBREW_BREW_FILE, "install", new_full_name
-      begin
-        unless Formulary.factory(new_full_name).keg_only?
-          system HOMEBREW_BREW_FILE, "link", new_full_name, "--overwrite"
-        end
-      rescue Exception => e # rubocop:disable Lint/RescueException
-        onoe "#{e.message}\n#{Utils::Backtrace.clean(e)&.join("\n")}" if Homebrew::EnvConfig.developer?
-      end
-      next
-    end
-
-    next unless (dir = HOMEBREW_CELLAR/name).exist? # skip if formula is not installed.
-
-    tabs = dir.subdirs.map { |d| Keg.new(d).tab }
-    next if tabs.first.tap != tap # skip if installed formula is not from this tap.
-
-    new_tap = Tap.fetch(new_tap_name)
-    # For formulae migrated to cask: Auto-install cask or provide install instructions.
-    if new_tap_name.start_with?("homebrew/cask")
-      if new_tap.installed? && (HOMEBREW_PREFIX/"Caskroom").directory?
-        ohai "#{name} has been moved to Homebrew Cask."
-        ohai "brew unlink #{name}"
-        system HOMEBREW_BREW_FILE, "unlink", name
-        ohai "brew cleanup"
-        system HOMEBREW_BREW_FILE, "cleanup"
-        ohai "brew install --cask #{new_name}"
-        system HOMEBREW_BREW_FILE, "install", "--cask", new_name
-        ohai <<~EOS
-          #{name} has been moved to Homebrew Cask.
-          The existing keg has been unlinked.
-          Please uninstall the formula when convenient by running:
-            brew uninstall --force #{name}
-        EOS
-      else
-        ohai "#{name} has been moved to Homebrew Cask.", <<~EOS
-          To uninstall the formula and install the cask, run:
-            brew uninstall --force #{name}
-            brew tap #{new_tap_name}
-            brew install --cask #{new_name}
-        EOS
-      end
-    else
-      new_tap.ensure_installed!
-      # update tap for each Tab
-      tabs.each { |tab| tab.tap = new_tap }
-      tabs.each(&:write)
-    end
-  end
-end
-
-
- -
-

- - #report(auto_update: false) ⇒ Object - - - - - -

- - - - -
-
-
-
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-515
-516
-517
-518
-519
-520
-521
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-567
-568
-569
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-
-
# File 'cmd/update-report.rb', line 442
-
-def report(auto_update: false)
-  return @report if @report
-
-  @report = Hash.new { |h, k| h[k] = [] }
-  return @report unless updated?
-
-  diff.each_line do |line|
-    status, *paths = line.split
-    src = Pathname.new paths.first
-    dst = Pathname.new paths.last
-
-    next if dst.extname != ".rb"
-
-    if paths.any? { |p| tap.cask_file?(p) }
-      case status
-      when "A"
-        # Have a dedicated report array for new casks.
-        @report[:AC] << tap.formula_file_to_name(src)
-      when "D"
-        # Have a dedicated report array for deleted casks.
-        @report[:DC] << tap.formula_file_to_name(src)
-      when "M"
-        # Report updated casks
-        @report[:MC] << tap.formula_file_to_name(src)
-      when /^R\d{0,3}/
-        src_full_name = tap.formula_file_to_name(src)
-        dst_full_name = tap.formula_file_to_name(dst)
-        # Don't report formulae that are moved within a tap but not renamed
-        next if src_full_name == dst_full_name
-
-        @report[:DC] << src_full_name
-        @report[:AC] << dst_full_name
-      end
-    end
-
-    next unless paths.any? { |p| tap.formula_file?(p) }
-
-    case status
-    when "A", "D"
-      full_name = tap.formula_file_to_name(src)
-      name = full_name.split("/").last
-      new_tap = tap.tap_migrations[name]
-      @report[status.to_sym] << full_name unless new_tap
-    when "M"
-      name = tap.formula_file_to_name(src)
-
-      @report[:M] << name
-    when /^R\d{0,3}/
-      src_full_name = tap.formula_file_to_name(src)
-      dst_full_name = tap.formula_file_to_name(dst)
-      # Don't report formulae that are moved within a tap but not renamed
-      next if src_full_name == dst_full_name
-
-      @report[:D] << src_full_name
-      @report[:A] << dst_full_name
-    end
-  end
-
-  renamed_casks = Set.new
-  @report[:DC].each do |old_full_name|
-    old_name = old_full_name.split("/").last
-    new_name = tap.cask_renames[old_name]
-    next unless new_name
-
-    new_full_name = if tap.core_cask_tap?
-      new_name
-    else
-      "#{tap}/#{new_name}"
-    end
-
-    renamed_casks << [old_full_name, new_full_name] if @report[:AC].include?(new_full_name)
-  end
-
-  @report[:AC].each do |new_full_name|
-    new_name = new_full_name.split("/").last
-    old_name = tap.cask_renames.key(new_name)
-    next unless old_name
-
-    old_full_name = if tap.core_cask_tap?
-      old_name
-    else
-      "#{tap}/#{old_name}"
-    end
-
-    renamed_casks << [old_full_name, new_full_name]
-  end
-
-  if renamed_casks.any?
-    @report[:AC] -= renamed_casks.map(&:last)
-    @report[:DC] -= renamed_casks.map(&:first)
-    @report[:RC] = renamed_casks.to_a
-  end
-
-  renamed_formulae = Set.new
-  @report[:D].each do |old_full_name|
-    old_name = old_full_name.split("/").last
-    new_name = tap.formula_renames[old_name]
-    next unless new_name
-
-    new_full_name = if tap.core_tap?
-      new_name
-    else
-      "#{tap}/#{new_name}"
-    end
-
-    renamed_formulae << [old_full_name, new_full_name] if @report[:A].include? new_full_name
-  end
-
-  @report[:A].each do |new_full_name|
-    new_name = new_full_name.split("/").last
-    old_name = tap.formula_renames.key(new_name)
-    next unless old_name
-
-    old_full_name = if tap.core_tap?
-      old_name
-    else
-      "#{tap}/#{old_name}"
-    end
-
-    renamed_formulae << [old_full_name, new_full_name]
-  end
-
-  if renamed_formulae.any?
-    @report[:A] -= renamed_formulae.map(&:last)
-    @report[:D] -= renamed_formulae.map(&:first)
-    @report[:R] = renamed_formulae.to_a
-  end
-
-  # If any formulae/casks are marked as added and deleted, remove them from
-  # the report as we've not detected things correctly.
-  if (added_and_deleted_formulae = (@report[:A] & @report[:D]).presence)
-    @report[:A] -= added_and_deleted_formulae
-    @report[:D] -= added_and_deleted_formulae
-  end
-  if (added_and_deleted_casks = (@report[:AC] & @report[:DC]).presence)
-    @report[:AC] -= added_and_deleted_casks
-    @report[:DC] -= added_and_deleted_casks
-  end
-
-  @report
-end
-
-
- -
-

- - #updated?Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-584
-585
-586
-587
-588
-589
-590
-
-
# File 'cmd/update-report.rb', line 584
-
-def updated?
-  if installed_from_api?
-    diff.present?
-  else
-    initial_revision != current_revision
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Reporter/ReporterRevisionUnsetError.html b/docs/Reporter/ReporterRevisionUnsetError.html deleted file mode 100644 index af94f19b3..000000000 --- a/docs/Reporter/ReporterRevisionUnsetError.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - Exception: Reporter::ReporterRevisionUnsetError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Reporter::ReporterRevisionUnsetError - - - -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/update-report.rb
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(var_name) ⇒ ReporterRevisionUnsetError - - - - - -

-
-

Returns a new instance of ReporterRevisionUnsetError.

- - -
-
-
- - -
- - - - -
-
-
-
-418
-419
-420
-
-
# File 'cmd/update-report.rb', line 418
-
-def initialize(var_name)
-  super "#{var_name} is unset!"
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/ReporterHub.html b/docs/ReporterHub.html deleted file mode 100644 index f4a2e9a0e..000000000 --- a/docs/ReporterHub.html +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - - Class: ReporterHub - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: ReporterHub - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
cmd/update-report.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #reporters ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute reporters.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-737
-738
-739
-740
-
-
# File 'cmd/update-report.rb', line 737
-
-def initialize
-  @hash = {}
-  @reporters = []
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #reportersObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute reporters.

- - -
-
-
- - -
- - - - -
-
-
-
-734
-735
-736
-
-
# File 'cmd/update-report.rb', line 734
-
-def reporters
-  @reporters
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #add(reporter, auto_update: false) ⇒ Object - - - - - -

- - - - -
-
-
-
-746
-747
-748
-749
-750
-
-
# File 'cmd/update-report.rb', line 746
-
-def add(reporter, auto_update: false)
-  @reporters << reporter
-  report = reporter.report(auto_update:).delete_if { |_k, v| v.empty? }
-  @hash.update(report) { |_key, oldval, newval| oldval.concat(newval) }
-end
-
-
- -
-

- - #dump(auto_update: false) ⇒ Object - - - - - -

- - - - -
-
-
-
-756
-757
-758
-759
-760
-761
-762
-763
-764
-765
-766
-767
-768
-769
-770
-771
-772
-773
-774
-775
-776
-777
-778
-779
-780
-781
-782
-783
-784
-785
-786
-787
-788
-789
-790
-791
-792
-793
-794
-795
-796
-797
-798
-799
-800
-801
-802
-803
-804
-805
-806
-
-
# File 'cmd/update-report.rb', line 756
-
-def dump(auto_update: false)
-  unless Homebrew::EnvConfig.no_update_report_new?
-    dump_new_formula_report
-    dump_new_cask_report
-  end
-
-  dump_deleted_formula_report
-  dump_deleted_cask_report
-
-  outdated_formulae = Formula.installed.select(&:outdated?).map(&:name)
-  outdated_casks = Cask::Caskroom.casks.select(&:outdated?).map(&:token)
-  unless auto_update
-    output_dump_formula_or_cask_report "Outdated Formulae", outdated_formulae
-    output_dump_formula_or_cask_report "Outdated Casks", outdated_casks
-  end
-  return if outdated_formulae.blank? && outdated_casks.blank?
-
-  outdated_formulae = outdated_formulae.count
-  outdated_casks = outdated_casks.count
-
-  update_pronoun = if (outdated_formulae + outdated_casks) == 1
-    "it"
-  else
-    "them"
-  end
-
-  msg = ""
-
-  if outdated_formulae.positive?
-    noun = Utils.pluralize("formula", outdated_formulae, plural: "e")
-    msg += "#{Tty.bold}#{outdated_formulae}#{Tty.reset} outdated #{noun}"
-  end
-
-  if outdated_casks.positive?
-    msg += " and " if msg.present?
-    msg += "#{Tty.bold}#{outdated_casks}#{Tty.reset} outdated #{Utils.pluralize("cask", outdated_casks)}"
-  end
-
-  return if msg.blank?
-
-  puts
-  puts "You have #{msg} installed."
-  # If we're auto-updating, don't need to suggest commands that we're perhaps
-  # already running.
-  return if auto_update
-
-  puts <<~EOS
-    You can upgrade #{update_pronoun} with #{Tty.bold}brew upgrade#{Tty.reset}
-    or list #{update_pronoun} with #{Tty.bold}brew outdated#{Tty.reset}.
-  EOS
-end
-
-
- -
-

- - #empty?Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-752
-753
-754
-
-
# File 'cmd/update-report.rb', line 752
-
-def empty?
-  @hash.empty?
-end
-
-
- -
-

- - #select_formula_or_cask(key) ⇒ Object - - - - - -

- - - - -
-
-
-
-742
-743
-744
-
-
# File 'cmd/update-report.rb', line 742
-
-def select_formula_or_cask(key)
-  @hash.fetch(key, [])
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Requirement.html b/docs/Requirement.html deleted file mode 100644 index c16042f11..000000000 --- a/docs/Requirement.html +++ /dev/null @@ -1,2310 +0,0 @@ - - - - - - - Class: Requirement - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Requirement - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Attrable, BuildEnvironment::DSL, Cachable
-
- - - -
-
Includes:
-
Dependable
-
- - - - - - -
-
Defined in:
-
requirement.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A base class for non-formula requirements needed by formulae. -A fatal requirement is one that will fail the build if it is not present. -By default, requirements are non-fatal.

- - -
-
-
- - -
- - - -

Constant Summary

- -

Constants included - from Dependable

-

Dependable::RESERVED_TAGS

- - -

Class Attribute Summary collapse

- - -

Instance Attribute Summary collapse

- - - - - - -

Attributes included from Dependable

-

#tags

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from BuildEnvironment::DSL

-

inherited

- - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

- - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- - - - - - - - - -

Methods included from Dependable

-

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

-
-

Constructor Details

- -
-

- - #initialize(tags = []) ⇒ Requirement - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Requirement.

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'requirement.rb', line 19
-
-def initialize(tags = [])
-  # Only allow instances of subclasses. This base class enforces no constraints on its own.
-  # Individual subclasses use the `satisfy` DSL to define those constraints.
-  raise "Do not call `Requirement.new' directly without a subclass." unless self.class < Requirement
-
-  @cask = self.class.cask
-  @download = self.class.download
-  tags.each do |tag|
-    next unless tag.is_a? Hash
-
-    @cask ||= tag[:cask]
-    @download ||= tag[:download]
-  end
-  @tags = tags
-  @tags << :build if self.class.build
-  @name ||= infer_name
-end
-
-
- -
- -
-

Class Attribute Details

- - - -
-

- - .buildObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-181
-182
-183
-
-
# File 'requirement.rb', line 181
-
-def build
-  @build
-end
-
-
- - - -
-

- - .env_procObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-181
-182
-183
-
-
# File 'requirement.rb', line 181
-
-def env_proc
-  @env_proc
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #caskObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'requirement.rb', line 17
-
-def cask
-  @cask
-end
-
-
- - - -
-

- - #downloadObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'requirement.rb', line 17
-
-def download
-  @download
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'requirement.rb', line 17
-
-def name
-  @name
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .cask(arg = T.unsafe(nil)) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg - - - (T.untyped) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-262
-
-
# File 'sorbet/rbi/parlour.rbi', line 262
-
-def self.cask(arg = T.unsafe(nil)); end
-
-
- -
-

- - .download(arg = T.unsafe(nil)) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg - - - (T.untyped) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-265
-
-
# File 'sorbet/rbi/parlour.rbi', line 265
-
-def self.download(arg = T.unsafe(nil)); end
-
-
- -
-

- - .env(*settings, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-192
-193
-194
-195
-196
-197
-198
-
-
# File 'requirement.rb', line 192
-
-def env(*settings, &block)
-  if block
-    @env_proc = block
-  else
-    super
-  end
-end
-
-
- -
-

- - .expand(dependent, cache_key: nil, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Expand the requirements of dependent recursively, optionally yielding -[dependent, req] pairs to allow callers to apply arbitrary filters to -the list. -The default filter, which is applied when a block is not given, omits -optionals and recommends based on what the dependent has asked for.

- - -
-
-
- - -
- - - - -
-
-
-
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-
-
# File 'requirement.rb', line 237
-
-def expand(dependent, cache_key: nil, &block)
-  if cache_key.present?
-    cache[cache_key] ||= {}
-    return cache[cache_key][cache_id dependent].dup if cache[cache_key][cache_id dependent]
-  end
-
-  reqs = Requirements.new
-
-  formulae = dependent.recursive_dependencies.map(&:to_formula)
-  formulae.unshift(dependent)
-
-  formulae.each do |f|
-    f.requirements.each do |req|
-      next if prune?(f, req, &block)
-
-      reqs << req
-    end
-  end
-
-  if cache_key.present?
-    # Even though we setup the cache above
-    # 'dependent.recursive_dependencies.map(&:to_formula)'
-    # is invalidating the singleton cache
-    cache[cache_key] ||= {}
-    cache[cache_key][cache_id dependent] = reqs.dup
-  end
-  reqs
-end
-
-
- -
-

- - .fatal(arg = T.unsafe(nil)) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - arg - - - (T.untyped) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-259
-
-
# File 'sorbet/rbi/parlour.rbi', line 259
-
-def self.fatal(arg = T.unsafe(nil)); end
-
-
- -
-

- - .prunevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Used to prune requirements when calling expand with a block.

- - -
-
-
- - -
- - - - -
-
-
-
-278
-279
-280
-
-
# File 'requirement.rb', line 278
-
-def prune
-  throw(:prune, true)
-end
-
-
- -
-

- - .prune?(dependent, req, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-266
-267
-268
-269
-270
-271
-272
-273
-274
-
-
# File 'requirement.rb', line 266
-
-def prune?(dependent, req, &block)
-  catch(:prune) do
-    if block
-      yield dependent, req
-    elsif req.optional? || req.recommended?
-      prune unless dependent.build.with?(req)
-    end
-  end
-end
-
-
- -
-

- - .satisfy(options = nil, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-185
-186
-187
-188
-189
-190
-
-
# File 'requirement.rb', line 185
-
-def satisfy(options = nil, &block)
-  return @satisfied if options.nil? && !block
-
-  options = {} if options.nil?
-  @satisfied = Satisfier.new(options, &block)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #display_sObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-148
-149
-150
-
-
# File 'requirement.rb', line 148
-
-def display_s
-  name.capitalize
-end
-
-
- -
-

- - #envObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-126
-127
-128
-
-
# File 'requirement.rb', line 126
-
-def env
-  self.class.env
-end
-
-
- -
-

- - #env_procObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-
-
# File 'requirement.rb', line 130
-
-def env_proc
-  self.class.env_proc
-end
-
-
- -
-

- - #fatal?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Pass a boolean to the fatal DSL method instead of overriding.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-86
-87
-88
-
-
# File 'requirement.rb', line 86
-
-def fatal?
-  self.class.fatal || false
-end
-
-
- -
-

- - #messageString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The message to show when the requirement is not met.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'requirement.rb', line 43
-
-def message
-  _, _, class_name = self.class.to_s.rpartition "::"
-  s = "#{class_name} unsatisfied!\n"
-  if cask
-    s += <<~EOS
-      You can install the necessary cask with:
-        brew install --cask #{cask}
-    EOS
-  end
-
-  if download
-    s += <<~EOS
-      You can download from:
-        #{Formatter.url(download)}
-    EOS
-  end
-  s
-end
-
-
- -
-

- - #mktemp(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-152
-153
-154
-
-
# File 'requirement.rb', line 152
-
-def mktemp(&block)
-  Mktemp.new(name).run(&block)
-end
-
-
- -
-

- - #modify_build_environment(env: nil, cc: nil, build_bottle: false, bottle_arch: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Pass a block to the env DSL method instead of overriding.

- - -
-
-
-

Parameters:

-
    - -
  • - - env - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - cc - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - build_bottle - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - bottle_arch - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-
-
# File 'requirement.rb', line 109
-
-def modify_build_environment(env: nil, cc: nil, build_bottle: false, bottle_arch: nil)
-  satisfied?(env:, cc:, build_bottle:, bottle_arch:)
-  instance_eval(&env_proc) if env_proc
-
-  # XXX If the satisfy block returns a Pathname, then make sure that it
-  # remains available on the PATH. This makes requirements like
-  #   satisfy { which("executable") }
-  # work, even under superenv where "executable" wouldn't normally be on the
-  # PATH.
-  parent = satisfied_result_parent
-  return unless parent
-  return if ["#{HOMEBREW_PREFIX}/bin", "#{HOMEBREW_PREFIX}/bin"].include?(parent.to_s)
-  return if PATH.new(ENV.fetch("PATH")).include?(parent.to_s)
-
-  ENV.prepend_path("PATH", parent)
-end
-
-
- -
-

- - #option_namesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'requirement.rb', line 37
-
-def option_names
-  [name]
-end
-
-
- -
-

- - #satisfied?(env: nil, cc: nil, build_bottle: false, bottle_arch: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Pass a block or boolean to the satisfy DSL method instead of overriding.

- - -
-
-
-

Parameters:

-
    - -
  • - - env - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - cc - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - build_bottle - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - bottle_arch - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'requirement.rb', line 71
-
-def satisfied?(env: nil, cc: nil, build_bottle: false, bottle_arch: nil)
-  satisfy = self.class.satisfy
-  return true unless satisfy
-
-  @satisfied_result =
-    satisfy.yielder(env:, cc:, build_bottle:, bottle_arch:) do |p|
-      instance_eval(&p)
-    end
-  return false unless @satisfied_result
-
-  true
-end
-
-
- -
-

- - #satisfied_result_parentObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-90
-91
-92
-93
-94
-95
-96
-97
-98
-
-
# File 'requirement.rb', line 90
-
-def satisfied_result_parent
-  return unless @satisfied_result.is_a?(Pathname)
-
-  parent = @satisfied_result.resolved_path.parent
-  if parent.to_s =~ %r{^#{Regexp.escape(HOMEBREW_CELLAR)}/([\w+-.@]+)/[^/]+/(s?bin)/?$}o
-    parent = HOMEBREW_PREFIX/"opt/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}"
-  end
-  parent
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Requirements.html b/docs/Requirements.html deleted file mode 100644 index 6cd68c5fc..000000000 --- a/docs/Requirements.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - Class: Requirements - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Requirements - - - Private -

-
- -
-
Inherits:
-
- SimpleDelegator - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
dependencies.rb,
- dependencies.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A collection of requirements.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- -
-

Constructor Details

- -
-

- - #initialize(*args) ⇒ Requirements - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Requirements.

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-
-
# File 'dependencies.rb', line 46
-
-def initialize(*args)
-  super(Set.new(args))
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #<<(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-
-
# File 'dependencies.rb', line 50
-
-def <<(other)
-  if other.is_a?(Object) && other.is_a?(Comparable)
-    __getobj__.grep(other.class) do |req|
-      return self if req > other
-
-      __getobj__.delete(req)
-    end
-  end
-  # see https://sorbet.org/docs/faq#how-can-i-fix-type-errors-that-arise-from-super
-  T.bind(self, T.untyped)
-  super
-  self
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Resource.html b/docs/Resource.html deleted file mode 100644 index e98e74e1b..000000000 --- a/docs/Resource.html +++ /dev/null @@ -1,2267 +0,0 @@ - - - - - - - Class: Resource - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Resource - - - Private -

-
- -
-
Inherits:
-
- Downloadable - - - show all - -
-
- - - - - - -
-
Includes:
-
FileUtils, OnSystem::MacOSAndLinux
-
- - - - - - -
-
Defined in:
-
resource.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Resource is the fundamental representation of an external resource. The -primary formula download, along with other declared resources, are instances -of this class.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Go, PatchResource

-
-

Defined Under Namespace

-

- - - - - Classes: Go, Partial, PatchResource - - -

- - - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from Downloadable

-

#checksum, #mirrors

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from OnSystem::MacOSAndLinux

-

included

- - - - - - - - - - -

Methods inherited from Downloadable

-

#cached_download, #clear_cache, #downloaded?, #downloader, #verify_download_integrity

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(name = nil, &block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - block - - - (T.proc.bind(Resource).void, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'resource.rb', line 25
-
-def initialize(name = nil, &block)
-  super()
-  # Ensure this is synced with `initialize_dup` and `freeze` (excluding simple objects like integers and booleans)
-  @name = name
-  @patches = []
-  @livecheck = Livecheck.new(self)
-  @livecheckable = false
-  @insecure = false
-  instance_eval(&block) if block
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #checksum=(value) ⇒ Object (writeonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'resource.rb', line 17
-
-def checksum=(value)
-  @checksum = value
-end
-
-
- - - -
-

- - #download_strategyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'resource.rb', line 18
-
-def download_strategy
-  @download_strategy
-end
-
-
- - - -
-

- - #livecheck(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Livecheck can be used to check for newer versions of the software. -This method evaluates the DSL specified in the livecheck block of the -Resource (if it exists) and sets the instance variables of a Livecheck -object accordingly. This is used by brew livecheck to check for newer -versions of the software.

- -

Example

- -
livecheck do
-  url "https://example.com/foo/releases"
-  regex /foo-(\d+(?:\.\d+)+)\.tar/
-end
-
- - -
-
-
- - -
- - - - -
-
-
-
-165
-166
-167
-168
-169
-170
-
-
# File 'resource.rb', line 165
-
-def livecheck(&block)
-  return @livecheck unless block
-
-  @livecheckable = true
-  @livecheck.instance_eval(&block)
-end
-
-
- - - -
-

- - #nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Formula name must be set after the DSL, as we have no access to the -formula name before initialization of the formula.

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'resource.rb', line 22
-
-def name
-  @name
-end
-
-
- - - -
-

- - #ownerObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'resource.rb', line 16
-
-def owner
-  @owner
-end
-
-
- - - -
-

- - #patchesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'resource.rb', line 16
-
-def patches
-  @patches
-end
-
-
- - - -
-

- - #source_modified_timeObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'resource.rb', line 16
-
-def source_modified_time
-  @source_modified_time
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #apply_patchesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-
-
# File 'resource.rb', line 109
-
-def apply_patches
-  return if patches.empty?
-
-  ohai "Patching #{name}"
-  patches.each(&:apply)
-end
-
-
- -
-

- - #download_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-76
-77
-78
-79
-80
-81
-
-
# File 'resource.rb', line 76
-
-def download_name
-  return owner.name if name.nil?
-  return escaped_name if owner.nil?
-
-  "#{owner.name}--#{escaped_name}"
-end
-
-
- -
-

- - #escaped_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Removes /s from resource names; this allows Go package names -to be used as resource names without confusing software that -interacts with #download_name, e.g. github.com/foo/bar.

- - -
-
-
- - -
- - - - -
-
-
-
-72
-73
-74
-
-
# File 'resource.rb', line 72
-
-def escaped_name
-  name.tr("/", "-")
-end
-
-
- -
-

- - #fetch(verify_download_integrity: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-143
-144
-145
-146
-147
-
-
# File 'resource.rb', line 143
-
-def fetch(verify_download_integrity: true)
-  fetch_patches
-
-  super
-end
-
-
- -
-

- - #fetch_patches(skip_downloaded: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-103
-104
-105
-106
-107
-
-
# File 'resource.rb', line 103
-
-def fetch_patches(skip_downloaded: false)
-  external_patches = patches.select(&:external?)
-  external_patches.reject!(&:downloaded?) if skip_downloaded
-  external_patches.each(&:fetch)
-end
-
-
- -
-

- - #files(*files) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-139
-140
-141
-
-
# File 'resource.rb', line 139
-
-def files(*files)
-  Partial.new(self, files)
-end
-
-
- -
-

- - #freezeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-
-
# File 'resource.rb', line 43
-
-def freeze
-  @name.freeze
-  @patches.freeze
-  @livecheck.freeze
-  super
-end
-
-
- -
-

- - #initialize_dup(other) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-
-
# File 'resource.rb', line 36
-
-def initialize_dup(other)
-  super
-  @name = @name.dup
-  @patches = @patches.dup
-  @livecheck = @livecheck.dup
-end
-
-
- -
-

- - #livecheckable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether a livecheck specification is defined or not. -It returns true when a livecheck block is present in the Resource and -false otherwise and is used by livecheck.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-175
-176
-177
-
-
# File 'resource.rb', line 175
-
-def livecheckable?
-  @livecheckable == true
-end
-
-
- -
-

- - #mirror(val) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-209
-210
-211
-
-
# File 'resource.rb', line 209
-
-def mirror(val)
-  mirrors << val
-end
-
-
- -
-

- - #patch(strip = :p1, src = nil, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-213
-214
-215
-216
-
-
# File 'resource.rb', line 213
-
-def patch(strip = :p1, src = nil, &block)
-  p = Patch.create(strip, src, &block)
-  patches << p
-end
-
-
- -
-

- - #prepare_patchesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'resource.rb', line 99
-
-def prepare_patches
-  patches.grep(DATAPatch) { |p| p.path = owner.owner.path }
-end
-
-
- -
-

- - #sha256(val) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-179
-180
-181
-
-
# File 'resource.rb', line 179
-
-def sha256(val)
-  @checksum = Checksum.new(val)
-end
-
-
- -
-

- - #specsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-222
-223
-224
-
-
# File 'resource.rb', line 222
-
-def specs
-  @url&.specs || {}.freeze
-end
-
-
- -
-

- - #stage(target = nil, debug_symbols: false, &block) ⇒ Object - - - - - -

-
-

Verifies download and unpacks it. -The block may call |resource, staging| staging.retain! to retain the staging -directory. Subclasses that override stage should implement the tmp -dir using Mktemp so that works with all subtypes.

- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-
-
# File 'resource.rb', line 89
-
-def stage(target = nil, debug_symbols: false, &block)
-  raise ArgumentError, "Target directory or block is required" if !target && block.blank?
-
-  prepare_patches
-  fetch_patches(skip_downloaded: true)
-  fetch unless downloaded?
-
-  unpack(target, debug_symbols:, &block)
-end
-
-
- -
-

- - #unpack(target = nil, debug_symbols: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If a target is given, unpack there; else unpack to a temp folder. -If block is given, yield to that block with |stage|, where stage -is a ResourceStageContext. -A target or a block must be given, but not both.

- - -
-
-
- - -
- - - - -
-
-
-
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-
-
# File 'resource.rb', line 120
-
-def unpack(target = nil, debug_symbols: false)
-  current_working_directory = Pathname.pwd
-  stage_resource(download_name, debug_symbols:) do |staging|
-    downloader.stage do
-      @source_modified_time = downloader.source_modified_time
-      apply_patches
-      if block_given?
-        yield ResourceStageContext.new(self, staging)
-      elsif target
-        target = Pathname(target)
-        target = current_working_directory/target if target.relative?
-        target.install Pathname.pwd.children
-      end
-    end
-  end
-end
-
-
- -
-

- - #url(val = nil, **specs) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-
-
# File 'resource.rb', line 183
-
-def url(val = nil, **specs)
-  return @url&.to_s if val.nil?
-
-  specs = specs.dup
-  # Don't allow this to be set.
-  specs.delete(:insecure)
-
-  specs[:insecure] = true if @insecure
-
-  @url = URL.new(val, specs)
-  @downloader = nil
-  @download_strategy = @url.download_strategy
-end
-
-
- -
-

- - #usingObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-218
-219
-220
-
-
# File 'resource.rb', line 218
-
-def using
-  @url&.using
-end
-
-
- -
-

- - #version(val = nil) ⇒ Version? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - val - - - (String, Version, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Version, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-
-
# File 'resource.rb', line 198
-
-def version(val = nil)
-  return super() if val.nil?
-
-  @version = case val
-  when String
-    val.blank? ? Version::NULL : Version.new(val)
-  when Version
-    val
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Resource/Go.html b/docs/Resource/Go.html deleted file mode 100644 index a81f22c59..000000000 --- a/docs/Resource/Go.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - Class: Resource::Go - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Resource::Go - - - Private -

-
- -
-
Inherits:
-
- Resource - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
resource.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A resource containing a Go package.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from Resource

-

#checksum, #download_strategy, #livecheck, #name, #owner, #patches, #source_modified_time

- - - -

Attributes inherited from Downloadable

-

#checksum, #mirrors, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Resource

-

#apply_patches, #download_name, #escaped_name, #fetch, #fetch_patches, #files, #freeze, #initialize, #initialize_dup, #livecheckable?, #mirror, #patch, #prepare_patches, #sha256, #specs, #unpack, #url, #using, #version

- - - - - - - - - -

Methods included from OnSystem::MacOSAndLinux

-

included

- - - - - - - - - - -

Methods inherited from Downloadable

-

#cached_download, #clear_cache, #download_name, #download_strategy, #downloaded?, #downloader, #fetch, #freeze, #initialize, #initialize_dup, #verify_download_integrity, #version

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -

This class inherits a constructor from Resource

- -
- - -
-

Instance Method Details

- - -
-

- - #stage(target, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-265
-266
-267
-
-
# File 'resource.rb', line 265
-
-def stage(target, &block)
-  super(target/name, &block)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Resource/Partial.html b/docs/Resource/Partial.html deleted file mode 100644 index 83a893aa6..000000000 --- a/docs/Resource/Partial.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - Class: Resource::Partial - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Resource::Partial - - - Private -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
resource.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #files ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute files.

    -
    - -
  • - - - -
  • - - - #resource ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute resource.

    -
    - -
  • - - -
- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute files

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of files

    -
    - -
  • - -
- -
- - - - -
-
-
-
-137
-138
-139
-
-
# File 'resource.rb', line 137
-
-def files
-  @files
-end
-
-
- - - -
-

- - #resourceObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute resource

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    the current value of resource

    -
    - -
  • - -
- -
- - - - -
-
-
-
-137
-138
-139
-
-
# File 'resource.rb', line 137
-
-def resource
-  @resource
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Resource/PatchResource.html b/docs/Resource/PatchResource.html deleted file mode 100644 index c34cff578..000000000 --- a/docs/Resource/PatchResource.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - - - - Class: Resource::PatchResource - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Resource::PatchResource - - - Private -

-
- -
-
Inherits:
-
- Resource - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
resource.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A resource containing a patch.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from Resource

-

#checksum, #download_strategy, #livecheck, #name, #owner, #patches, #source_modified_time

- - - -

Attributes inherited from Downloadable

-

#checksum, #mirrors, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Resource

-

#apply_patches, #download_name, #escaped_name, #fetch, #fetch_patches, #files, #freeze, #initialize_dup, #livecheckable?, #mirror, #patch, #prepare_patches, #sha256, #specs, #stage, #unpack, #url, #using, #version

- - - - - - - - - -

Methods included from OnSystem::MacOSAndLinux

-

included

- - - - - - - - - - -

Methods inherited from Downloadable

-

#cached_download, #clear_cache, #download_name, #download_strategy, #downloaded?, #downloader, #fetch, #freeze, #initialize_dup, #verify_download_integrity, #version

- - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(&block) ⇒ PatchResource - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of PatchResource.

- - -
-
-
- - -
- - - - -
-
-
-
-274
-275
-276
-277
-278
-
-
# File 'resource.rb', line 274
-
-def initialize(&block)
-  @patch_files = []
-  @directory = nil
-  super "patch", &block
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #patch_filesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-272
-273
-274
-
-
# File 'resource.rb', line 272
-
-def patch_files
-  @patch_files
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #apply(*paths) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-280
-281
-282
-283
-284
-
-
# File 'resource.rb', line 280
-
-def apply(*paths)
-  paths.flatten!
-  @patch_files.concat(paths)
-  @patch_files.uniq!
-end
-
-
- -
-

- - #directory(val = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-286
-287
-288
-289
-290
-
-
# File 'resource.rb', line 286
-
-def directory(val = nil)
-  return @directory if val.nil?
-
-  @directory = val
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/ResourceMissingError.html b/docs/ResourceMissingError.html deleted file mode 100644 index 012ee9e22..000000000 --- a/docs/ResourceMissingError.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Exception: ResourceMissingError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: ResourceMissingError - - - Private -

-
- -
-
Inherits:
-
- ArgumentError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a resource is missing.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formula, resource) ⇒ ResourceMissingError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ResourceMissingError.

- - -
-
-
- - -
- - - - -
-
-
-
-729
-730
-731
-
-
# File 'exceptions.rb', line 729
-
-def initialize(formula, resource)
-  super "#{formula.full_name} does not define resource #{resource.inspect}"
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/ResourceStageContext.html b/docs/ResourceStageContext.html deleted file mode 100644 index e9dcb2877..000000000 --- a/docs/ResourceStageContext.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - Class: ResourceStageContext - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: ResourceStageContext - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
resource.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

The context in which a Resource#stage occurs. Supports access to both -the Resource and associated Mktemp in a single block argument. The interface -is back-compatible with Resource itself as used in that context.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(resource, staging) ⇒ ResourceStageContext - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ResourceStageContext.

- - -
-
-
- - -
- - - - -
-
-
-
-309
-310
-311
-312
-
-
# File 'resource.rb', line 309
-
-def initialize(resource, staging)
-  @resource = resource
-  @staging = staging
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #resourceObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The Resource that is being staged.

- - -
-
-
- - -
- - - - -
-
-
-
-301
-302
-303
-
-
# File 'resource.rb', line 301
-
-def resource
-  @resource
-end
-
-
- - - -
-

- - #stagingObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The Mktemp in which #resource is staged.

- - -
-
-
- - -
- - - - -
-
-
-
-304
-305
-306
-
-
# File 'resource.rb', line 304
-
-def staging
-  @staging
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop.html b/docs/RuboCop.html deleted file mode 100644 index 99928b702..000000000 --- a/docs/RuboCop.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: RuboCop - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/blank.rb,
- rubocops/desc.rb,
rubocops/text.rb,
rubocops/urls.rb,
rubocops/class.rb,
rubocops/files.rb,
rubocops/lines.rb,
rubocops/bottle.rb,
rubocops/caveats.rb,
rubocops/io_read.rb,
rubocops/options.rb,
rubocops/patches.rb,
rubocops/present.rb,
rubocops/service.rb,
rubocops/version.rb,
rubocops/cask/url.rb,
rubocops/checksum.rb,
rubocops/homepage.rb,
rubocops/keg_only.rb,
rubocops/presence.rb,
rubocops/cask/desc.rb,
rubocops/conflicts.rb,
rubocops/livecheck.rb,
rubocops/compact_blank.rb,
rubocops/cask/variables.rb,
rubocops/negate_include.rb,
rubocops/shell_commands.rb,
rubocops/cask/ast/stanza.rb,
rubocops/uses_from_macos.rb,
rubocops/cask/extend/node.rb,
rubocops/components_order.rb,
rubocops/dependency_order.rb,
rubocops/cask/discontinued.rb,
rubocops/cask/no_overrides.rb,
rubocops/cask/stanza_order.rb,
rubocops/deprecate_disable.rb,
rubocops/move_to_extend_os.rb,
rubocops/extend/formula_cop.rb,
rubocops/shared/desc_helper.rb,
rubocops/cask/ast/cask_block.rb,
rubocops/cask/ast/cask_header.rb,
rubocops/cask/mixin/cask_help.rb,
rubocops/cask/stanza_grouping.rb,
rubocops/install_bundler_gems.rb,
rubocops/cask/constants/stanza.rb,
rubocops/components_redundancy.rb,
rubocops/shared/helper_functions.rb,
rubocops/cask/mixin/on_url_stanza.rb,
rubocops/cask/mixin/on_desc_stanza.rb,
rubocops/cask/shared_filelist_glob.rb,
rubocops/cask/array_alphabetization.rb,
rubocops/safe_navigation_with_blank.rb,
rubocops/cask/on_system_conditionals.rb,
rubocops/cask/uninstall_methods_order.rb,
rubocops/cask/mixin/on_homepage_stanza.rb,
rubocops/resource_requires_dependencies.rb,
rubocops/cask/homepage_url_trailing_slash.rb,
rubocops/cask/url_legacy_comma_separators.rb,
rubocops/shared/on_system_conditionals_helper.rb,
rubocops/cask/discontinued.rbi,
rubocops/cask/on_system_conditionals.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: AST, Cask, Cop - - - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/AST.html b/docs/RuboCop/AST.html deleted file mode 100644 index 7899268f0..000000000 --- a/docs/RuboCop/AST.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Module: RuboCop::AST - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::AST - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/cask/extend/node.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Node - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/AST/Node.html b/docs/RuboCop/AST/Node.html deleted file mode 100644 index d345b1aba..000000000 --- a/docs/RuboCop/AST/Node.html +++ /dev/null @@ -1,930 +0,0 @@ - - - - - - - Class: RuboCop::AST::Node - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::AST::Node - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Cask::Constants
-
- - - - - - -
-
Defined in:
-
rubocops/cask/extend/node.rb,
- rubocops/cask/extend/node.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Cask::Constants

-

Cask::Constants::ON_SYSTEM_METHODS, Cask::Constants::ON_SYSTEM_METHODS_STANZA_ORDER, Cask::Constants::STANZA_GROUPS, Cask::Constants::STANZA_GROUP_HASH, Cask::Constants::STANZA_ORDER, Cask::Constants::UNINSTALL_METHODS_ORDER

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - #arch_variable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'rubocops/cask/extend/node.rbi', line 17
-
-def arch_variable?; end
-
-
- -
-

- - #begin_block?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-
-
# File 'rubocops/cask/extend/node.rbi', line 20
-
-def begin_block?; end
-
-
- -
-

- - #block_bodyRuboCop::AST::Node? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-8
-
-
# File 'rubocops/cask/extend/node.rbi', line 8
-
-def block_body; end
-
-
- -
-

- - #cask_block?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-
-
# File 'rubocops/cask/extend/node.rbi', line 11
-
-def cask_block?; end
-
-
- -
-

- - #cask_on_system_block?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'rubocops/cask/extend/node.rb', line 19
-
-def cask_on_system_block?
-  (on_system_block? && each_ancestor.any?(&:cask_block?)) || false
-end
-
-
- -
-

- - #heredoc?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'rubocops/cask/extend/node.rb', line 33
-
-def heredoc?
-  loc.is_a?(Parser::Source::Map::Heredoc)
-end
-
-
- -
-

- - #location_expressionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-
-
# File 'rubocops/cask/extend/node.rb', line 37
-
-def location_expression
-  base_expression = loc.expression
-  descendants.select(&:heredoc?).reduce(base_expression) do |expr, node|
-    expr.join(node.loc.heredoc_end)
-  end
-end
-
-
- -
-

- - #method_nodeRuboCop::AST::SendNode? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (RuboCop::AST::SendNode, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-5
-
-
# File 'rubocops/cask/extend/node.rbi', line 5
-
-def method_node; end
-
-
- -
-

- - #on_system_block?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-
-
# File 'rubocops/cask/extend/node.rbi', line 14
-
-def on_system_block?; end
-
-
- -
-

- - #stanza?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'rubocops/cask/extend/node.rb', line 23
-
-def stanza?
-  return true if arch_variable?
-
-  case self
-  when RuboCop::AST::BlockNode, RuboCop::AST::SendNode
-    ON_SYSTEM_METHODS.include?(method_name) || STANZA_ORDER.include?(method_name)
-  else false
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cask.html b/docs/RuboCop/Cask.html deleted file mode 100644 index fbff7a8f7..000000000 --- a/docs/RuboCop/Cask.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: RuboCop::Cask - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cask - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/cask/ast/stanza.rb,
- rubocops/cask/ast/cask_block.rb,
rubocops/cask/ast/cask_header.rb,
rubocops/cask/constants/stanza.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: AST, Constants - - - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cask/AST.html b/docs/RuboCop/Cask/AST.html deleted file mode 100644 index f46ed96aa..000000000 --- a/docs/RuboCop/Cask/AST.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: RuboCop::Cask::AST - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cask::AST - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/cask/ast/stanza.rb,
- rubocops/cask/ast/cask_block.rb,
rubocops/cask/ast/cask_header.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: CaskBlock, CaskHeader, Stanza, StanzaBlock - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cask/AST/CaskBlock.html b/docs/RuboCop/Cask/AST/CaskBlock.html deleted file mode 100644 index 732c33052..000000000 --- a/docs/RuboCop/Cask/AST/CaskBlock.html +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - - Class: RuboCop::Cask::AST::CaskBlock - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cask::AST::CaskBlock - - - Private -

-
- -
-
Inherits:
-
- StanzaBlock - - - show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
rubocops/cask/ast/cask_block.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This class wraps the AST block node that represents the entire cask -definition. It includes various helper methods to aid cops in their -analysis.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from StanzaBlock

-

#block_node, #comments

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from StanzaBlock

-

#initialize

- -
-

Constructor Details

- -

This class inherits a constructor from RuboCop::Cask::AST::StanzaBlock

- -
- - -
-

Instance Method Details

- - -
-

- - #cask_nodeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'rubocops/cask/ast/cask_block.rb', line 49
-
-def cask_node
-  block_node
-end
-
-
- -
-

- - #headerObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-55
-56
-57
-
-
# File 'rubocops/cask/ast/cask_block.rb', line 55
-
-def header
-  @header ||= CaskHeader.new(block_node.method_node)
-end
-
-
- -
-

- - #stanzasObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- TODO: -

Use StanzaBlock#stanzas for all cops, where possible.

-
-
- - - -
-
-
- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'rubocops/cask/ast/cask_block.rb', line 60
-
-def stanzas
-  return [] unless cask_body
-
-  @stanzas ||= cask_body.each_node
-                        .select(&:stanza?)
-                        .map { |node| Stanza.new(node, comments) }
-end
-
-
- -
-

- - #toplevel_stanzasObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'rubocops/cask/ast/cask_block.rb', line 68
-
-def toplevel_stanzas
-  # If a `cask` block only contains one stanza, it is that stanza's direct parent,
-  # otherwise stanzas are grouped in a block and `cask` is that block's parent.
-  is_toplevel_stanza = if cask_body.begin_block?
-    ->(stanza) { stanza.parent_node.parent.cask_block? }
-  else
-    ->(stanza) { stanza.parent_node.cask_block? }
-  end
-
-  @toplevel_stanzas ||= stanzas.select(&is_toplevel_stanza)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cask/AST/CaskHeader.html b/docs/RuboCop/Cask/AST/CaskHeader.html deleted file mode 100644 index 17a0eacdb..000000000 --- a/docs/RuboCop/Cask/AST/CaskHeader.html +++ /dev/null @@ -1,710 +0,0 @@ - - - - - - - Class: RuboCop::Cask::AST::CaskHeader - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cask::AST::CaskHeader - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/cask/ast/cask_header.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This class wraps the AST method node that represents the cask header. It -includes various helper methods to aid cops in their analysis.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(method_node) ⇒ CaskHeader - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of CaskHeader.

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'rubocops/cask/ast/cask_header.rb', line 10
-
-def initialize(method_node)
-  @method_node = method_node
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #method_nodeObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'rubocops/cask/ast/cask_header.rb', line 14
-
-def method_node
-  @method_node
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #cask_tokenObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'rubocops/cask/ast/cask_header.rb', line 29
-
-def cask_token
-  @cask_token ||= method_node.first_argument.str_content
-end
-
-
- -
-

- - #hash_nodeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'rubocops/cask/ast/cask_header.rb', line 33
-
-def hash_node
-  @hash_node ||= method_node.each_child_node(:hash).first
-end
-
-
- -
-

- - #header_strObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'rubocops/cask/ast/cask_header.rb', line 16
-
-def header_str
-  @header_str ||= source_range.source
-end
-
-
- -
-

- - #pair_nodeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'rubocops/cask/ast/cask_header.rb', line 37
-
-def pair_node
-  @pair_node ||= hash_node.each_child_node(:pair).first
-end
-
-
- -
-

- - #preferred_header_strString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'rubocops/cask/ast/cask_header.rb', line 25
-
-def preferred_header_str
-  "cask '#{cask_token}'"
-end
-
-
- -
-

- - #source_rangeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'rubocops/cask/ast/cask_header.rb', line 20
-
-def source_range
-  @source_range ||= method_node.loc.expression
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cask/AST/Stanza.html b/docs/RuboCop/Cask/AST/Stanza.html deleted file mode 100644 index 9dc022561..000000000 --- a/docs/RuboCop/Cask/AST/Stanza.html +++ /dev/null @@ -1,939 +0,0 @@ - - - - - - - Class: RuboCop::Cask::AST::Stanza - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cask::AST::Stanza - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - - - - - - -
-
Defined in:
-
rubocops/cask/ast/stanza.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This class wraps the AST send/block node that encapsulates the method -call that comprises the stanza. It includes various helper methods to -aid cops in their analysis.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(method_node, all_comments) ⇒ Stanza - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Stanza.

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-
-
# File 'rubocops/cask/ast/stanza.rb', line 15
-
-def initialize(method_node, all_comments)
-  @method_node = method_node
-  @all_comments = all_comments
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #all_commentsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'rubocops/cask/ast/stanza.rb', line 20
-
-def all_comments
-  @all_comments
-end
-
-
- - - -
-

- - #method_nodeObject (readonly) - - - - Also known as: - stanza_node - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'rubocops/cask/ast/stanza.rb', line 20
-
-def method_node
-  @method_node
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #commentsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-
-
# File 'rubocops/cask/ast/stanza.rb', line 60
-
-def comments
-  @comments ||= stanza_node.each_node.reduce([]) do |comments, node|
-    comments | comments_hash[node.loc]
-  end
-end
-
-
- -
-

- - #comments_hashObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'rubocops/cask/ast/stanza.rb', line 66
-
-def comments_hash
-  @comments_hash ||= Parser::Source::Comment.associate_locations(stanza_node.parent, all_comments)
-end
-
-
- -
-

- - #same_group?(other) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'rubocops/cask/ast/stanza.rb', line 56
-
-def same_group?(other)
-  stanza_group == other.stanza_group
-end
-
-
- -
-

- - #source_rangeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-
-
# File 'rubocops/cask/ast/stanza.rb', line 28
-
-def source_range
-  stanza_node.location_expression
-end
-
-
- -
-

- - #source_range_with_commentsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-
-
# File 'rubocops/cask/ast/stanza.rb', line 32
-
-def source_range_with_comments
-  comments.reduce(source_range) do |range, comment|
-    range.join(comment.loc.expression)
-  end
-end
-
-
- -
-

- - #stanza_groupObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'rubocops/cask/ast/stanza.rb', line 48
-
-def stanza_group
-  Constants::STANZA_GROUP_HASH[stanza_name]
-end
-
-
- -
-

- - #stanza_indexObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-52
-53
-54
-
-
# File 'rubocops/cask/ast/stanza.rb', line 52
-
-def stanza_index
-  Constants::STANZA_ORDER.index(stanza_name)
-end
-
-
- -
-

- - #stanza_nameObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-
-
# File 'rubocops/cask/ast/stanza.rb', line 42
-
-def stanza_name
-  return :on_arch_conditional if arch_variable?
-
-  stanza_node.method_name
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cask/AST/StanzaBlock.html b/docs/RuboCop/Cask/AST/StanzaBlock.html deleted file mode 100644 index 41e897317..000000000 --- a/docs/RuboCop/Cask/AST/StanzaBlock.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - - Class: RuboCop::Cask::AST::StanzaBlock - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cask::AST::StanzaBlock - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - - - - - - -
-
Defined in:
-
rubocops/cask/ast/cask_block.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-

Direct Known Subclasses

-

CaskBlock

-
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(block_node, comments) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - block_node - - - (RuboCop::AST::BlockNode) - - - -
  • - -
  • - - comments - - - (Array<Parser::Source::Comment>) - - - -
  • - -
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-
-
# File 'rubocops/cask/ast/cask_block.rb', line 19
-
-def initialize(block_node, comments)
-  @block_node = block_node
-  @comments = comments
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #block_nodeRuboCop::AST::BlockNode (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (RuboCop::AST::BlockNode) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'rubocops/cask/ast/cask_block.rb', line 13
-
-def block_node
-  @block_node
-end
-
-
- - - -
-

- - #commentsArray<Parser::Source::Comment> (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<Parser::Source::Comment>) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'rubocops/cask/ast/cask_block.rb', line 16
-
-def comments
-  @comments
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #stanzasArray<Stanza> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'rubocops/cask/ast/cask_block.rb', line 25
-
-def stanzas
-  return [] unless (block_body = block_node.block_body)
-
-  # If a block only contains one stanza, it is that stanza's direct parent, otherwise
-  # stanzas are grouped in a nested block and the block is that nested block's parent.
-  is_stanza = if block_body.begin_block?
-    ->(node) { node.parent.parent == block_node }
-  else
-    ->(node) { node.parent == block_node }
-  end
-
-  @stanzas ||= block_body.each_node
-                         .select(&:stanza?)
-                         .select(&is_stanza)
-                         .map { |node| Stanza.new(node, comments) }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cask/Constants.html b/docs/RuboCop/Cask/Constants.html deleted file mode 100644 index 21cb1e139..000000000 --- a/docs/RuboCop/Cask/Constants.html +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - Module: RuboCop::Cask::Constants - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cask::Constants - - - Private -

-
- - - - - - - - - -
-
Included in:
-
AST::Node
-
- - - -
-
Defined in:
-
rubocops/cask/constants/stanza.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Constants available globally for use in all cask cops.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
ON_SYSTEM_METHODS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:arm, :intel, *MacOSVersion::SYMBOLS.keys].map { |option| :"on_#{option}" }.freeze
- -
ON_SYSTEM_METHODS_STANZA_ORDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  :arm,
-  :intel,
-  *MacOSVersion::SYMBOLS.reverse_each.to_h.keys, # Oldest OS blocks first since that's more common in Casks.
-].map { |option, _| :"on_#{option}" }.freeze
- -
STANZA_GROUPS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  [:arch, :on_arch_conditional],
-  [:version, :sha256],
-  ON_SYSTEM_METHODS_STANZA_ORDER,
-  [:language],
-  [:url, :appcast, :name, :desc, :homepage],
-  [:livecheck],
-  [:deprecate!, :disable!],
-  [
-    :auto_updates,
-    :conflicts_with,
-    :depends_on,
-    :container,
-  ],
-  [
-    :suite,
-    :app,
-    :pkg,
-    :installer,
-    :binary,
-    :manpage,
-    :colorpicker,
-    :dictionary,
-    :font,
-    :input_method,
-    :internet_plugin,
-    :keyboard_layout,
-    :prefpane,
-    :qlplugin,
-    :mdimporter,
-    :screen_saver,
-    :service,
-    :audio_unit_plugin,
-    :vst_plugin,
-    :vst3_plugin,
-    :artifact,
-    :stage_only,
-  ],
-  [:preflight],
-  [:postflight],
-  [:uninstall_preflight],
-  [:uninstall_postflight],
-  [:uninstall],
-  [:zap],
-  [:caveats],
-].freeze
- -
STANZA_GROUP_HASH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
STANZA_GROUPS.each_with_object({}) do |stanza_group, hash|
-  stanza_group.each { |stanza| hash[stanza] = stanza_group }
-end.freeze
- -
STANZA_ORDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
STANZA_GROUPS.flatten.freeze
- -
UNINSTALL_METHODS_ORDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  :early_script,
-  :launchctl,
-  :quit,
-  :signal,
-  :login_item,
-  :kext,
-  :script,
-  :pkgutil,
-  :delete,
-  :trash,
-  :rmdir,
-].freeze
- -
- - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop.html b/docs/RuboCop/Cop.html deleted file mode 100644 index 9c2cc1f2a..000000000 --- a/docs/RuboCop/Cop.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - Module: RuboCop::Cop - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/desc.rb,
- rubocops/text.rb,
rubocops/urls.rb,
rubocops/blank.rb,
rubocops/class.rb,
rubocops/files.rb,
rubocops/lines.rb,
rubocops/bottle.rb,
rubocops/caveats.rb,
rubocops/io_read.rb,
rubocops/options.rb,
rubocops/patches.rb,
rubocops/present.rb,
rubocops/service.rb,
rubocops/version.rb,
rubocops/cask/url.rb,
rubocops/checksum.rb,
rubocops/homepage.rb,
rubocops/keg_only.rb,
rubocops/presence.rb,
rubocops/cask/desc.rb,
rubocops/conflicts.rb,
rubocops/livecheck.rb,
rubocops/compact_blank.rb,
rubocops/cask/variables.rb,
rubocops/negate_include.rb,
rubocops/shell_commands.rb,
rubocops/uses_from_macos.rb,
rubocops/components_order.rb,
rubocops/dependency_order.rb,
rubocops/cask/discontinued.rb,
rubocops/cask/no_overrides.rb,
rubocops/cask/stanza_order.rb,
rubocops/deprecate_disable.rb,
rubocops/move_to_extend_os.rb,
rubocops/extend/formula_cop.rb,
rubocops/shared/desc_helper.rb,
rubocops/cask/mixin/cask_help.rb,
rubocops/cask/stanza_grouping.rb,
rubocops/install_bundler_gems.rb,
rubocops/components_redundancy.rb,
rubocops/shared/helper_functions.rb,
rubocops/cask/mixin/on_url_stanza.rb,
rubocops/cask/mixin/on_desc_stanza.rb,
rubocops/cask/shared_filelist_glob.rb,
rubocops/cask/array_alphabetization.rb,
rubocops/safe_navigation_with_blank.rb,
rubocops/cask/on_system_conditionals.rb,
rubocops/cask/uninstall_methods_order.rb,
rubocops/cask/mixin/on_homepage_stanza.rb,
rubocops/resource_requires_dependencies.rb,
rubocops/cask/homepage_url_trailing_slash.rb,
rubocops/cask/url_legacy_comma_separators.rb,
rubocops/shared/on_system_conditionals_helper.rb,
rubocops/cask/discontinued.rbi,
rubocops/cask/on_system_conditionals.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Cask, DescHelper, FormulaAudit, FormulaAuditStrict, HelperFunctions, Homebrew, OnSystemConditionalsHelper - - - - Classes: FormulaCop - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask.html b/docs/RuboCop/Cop/Cask.html deleted file mode 100644 index d730f9933..000000000 --- a/docs/RuboCop/Cop/Cask.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - Module: RuboCop::Cop::Cask - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::Cask - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/cask/url.rb,
- rubocops/cask/desc.rb,
rubocops/cask/variables.rb,
rubocops/cask/discontinued.rb,
rubocops/cask/no_overrides.rb,
rubocops/cask/stanza_order.rb,
rubocops/cask/mixin/cask_help.rb,
rubocops/cask/stanza_grouping.rb,
rubocops/cask/mixin/on_url_stanza.rb,
rubocops/cask/mixin/on_desc_stanza.rb,
rubocops/cask/shared_filelist_glob.rb,
rubocops/cask/array_alphabetization.rb,
rubocops/cask/on_system_conditionals.rb,
rubocops/cask/uninstall_methods_order.rb,
rubocops/cask/mixin/on_homepage_stanza.rb,
rubocops/cask/homepage_url_trailing_slash.rb,
rubocops/cask/url_legacy_comma_separators.rb,
rubocops/cask/discontinued.rbi,
rubocops/cask/on_system_conditionals.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: CaskHelp, OnDescStanza, OnHomepageStanza, OnUrlStanza - - - - Classes: ArrayAlphabetization, Desc, Discontinued, HomepageUrlTrailingSlash, NoOverrides, OnSystemConditionals, SharedFilelistGlob, StanzaGrouping, StanzaOrder, UninstallMethodsOrder, Url, UrlLegacyCommaSeparators, Variables - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/ArrayAlphabetization.html b/docs/RuboCop/Cop/Cask/ArrayAlphabetization.html deleted file mode 100644 index 0099927aa..000000000 --- a/docs/RuboCop/Cop/Cask/ArrayAlphabetization.html +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::ArrayAlphabetization - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::ArrayAlphabetization - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/cask/array_alphabetization.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #on_send(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'rubocops/cask/array_alphabetization.rb', line 10
-
-def on_send(node)
-  return unless [:zap, :uninstall].include?(node.method_name)
-
-  node.each_descendant(:pair).each do |pair|
-    symbols = pair.children.select(&:sym_type?).map(&:value)
-    next if symbols.intersect?([:signal, :script, :early_script, :args, :input])
-
-    pair.each_descendant(:array).each do |array|
-      if array.children.length == 1
-        add_offense(array, message: "Avoid single-element arrays by removing the []") do |corrector|
-          corrector.replace(array.source_range, array.children.first.source)
-        end
-      end
-
-      next if array.children.length <= 1
-
-      sorted_array = sort_array(array.source.split("\n")).join("\n")
-
-      next if array.source == sorted_array
-
-      add_offense(array, message: "The array elements should be ordered alphabetically") do |corrector|
-        corrector.replace(array.source_range, sorted_array)
-      end
-    end
-  end
-end
-
-
- -
-

- - #recursively_find_comments(source, index, line) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-
-
# File 'rubocops/cask/array_alphabetization.rb', line 61
-
-def recursively_find_comments(source, index, line)
-  if source[index - 1].strip.start_with?("#")
-    return recursively_find_comments(source, index - 1, "#{source[index - 1]}\n#{line}")
-  end
-
-  line
-end
-
-
- -
-

- - #sort_array(source) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-
-
# File 'rubocops/cask/array_alphabetization.rb', line 37
-
-def sort_array(source)
-  # Combine each comment with the line(s) below so that they remain in the same relative location
-  combined_source = source.each_with_index.filter_map do |line, index|
-    next if line.blank?
-    next if line.strip.start_with?("#")
-
-    next recursively_find_comments(source, index, line)
-  end
-
-  # Separate the lines into those that should be sorted and those that should not
-  # i.e. skip the opening and closing brackets of the array.
-  to_sort, to_keep = combined_source.partition { |line| !line.include?("[") && !line.include?("]") }
-
-  # Sort the lines that should be sorted
-  to_sort.sort! do |a, b|
-    a_non_comment = a.split("\n").reject { |line| line.strip.start_with?("#") }.first
-    b_non_comment = b.split("\n").reject { |line| line.strip.start_with?("#") }.first
-    a_non_comment.downcase <=> b_non_comment.downcase
-  end
-
-  # Merge the sorted lines and the unsorted lines, preserving the original positions of the unsorted lines
-  combined_source.map { |line| to_keep.include?(line) ? line : to_sort.shift }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/CaskHelp.html b/docs/RuboCop/Cop/Cask/CaskHelp.html deleted file mode 100644 index 59bb94142..000000000 --- a/docs/RuboCop/Cop/Cask/CaskHelp.html +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - - Module: RuboCop::Cop::Cask::CaskHelp - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::Cask::CaskHelp - - - Private -

-
- - - - - - -
-
Includes:
-
CommentsHelp, RuboCop::Cop::CommentsHelp
-
- - - - -
-
Included in:
-
Discontinued, NoOverrides, OnDescStanza, OnHomepageStanza, OnSystemConditionals, OnUrlStanza, StanzaGrouping, StanzaOrder, Variables
-
- - - -
-
Defined in:
-
rubocops/cask/mixin/cask_help.rb,
- rubocops/cask/mixin/cask_help.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #inner_stanzas(block_node, comments) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-
-
# File 'rubocops/cask/mixin/cask_help.rb', line 37
-
-def inner_stanzas(block_node, comments)
-  block_contents = block_node.child_nodes.select(&:begin_type?)
-  inner_nodes = block_contents.map(&:child_nodes).flatten.select(&:send_type?)
-  inner_nodes.map { |n| RuboCop::Cask::AST::Stanza.new(n, comments) }
-end
-
-
- -
-

- - #on_block(block_node) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - block_node - - - (RuboCop::AST::BlockNode) - - - -
  • - -
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'rubocops/cask/mixin/cask_help.rb', line 18
-
-def on_block(block_node)
-  super if defined? super
-
-  return if !block_node.cask_block? && !block_node.cask_on_system_block?
-
-  comments = comments_in_range(block_node).to_a
-  stanza_block = RuboCop::Cask::AST::StanzaBlock.new(block_node, comments)
-  on_cask_stanza_block(stanza_block)
-
-  return unless block_node.cask_block?
-
-  cask_block = RuboCop::Cask::AST::CaskBlock.new(block_node, comments)
-  on_cask(cask_block)
-end
-
-
- -
-

- - #on_cask(cask_block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-12
-
-
# File 'rubocops/cask/mixin/cask_help.rb', line 12
-
-def on_cask(cask_block); end
-
-
- -
-

- - #on_cask_stanza_block(cask_stanza_block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-15
-
-
# File 'rubocops/cask/mixin/cask_help.rb', line 15
-
-def on_cask_stanza_block(cask_stanza_block); end
-
-
- -
-

- - #on_system_methods(cask_stanzas) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'rubocops/cask/mixin/cask_help.rb', line 33
-
-def on_system_methods(cask_stanzas)
-  cask_stanzas.select(&:on_system_block?)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/Desc.html b/docs/RuboCop/Cop/Cask/Desc.html deleted file mode 100644 index aaa4605b8..000000000 --- a/docs/RuboCop/Cop/Cask/Desc.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::Desc - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::Desc - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
OnDescStanza, DescHelper
-
- - - - - - -
-
Defined in:
-
rubocops/cask/desc.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits desc in casks. -See the DescHelper module for details of the checks.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from DescHelper

-

DescHelper::MAX_DESC_LENGTH, DescHelper::VALID_LOWERCASE_WORDS

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from DescHelper

-

#audit_desc, #desc_problem

- - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - - -

Methods included from OnDescStanza

-

#on_cask

- - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask, #on_cask_stanza_block, #on_system_methods

- - - - - -
-

Instance Method Details

- - -
-

- - #on_desc_stanza(stanza) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-
-
# File 'rubocops/cask/desc.rb', line 17
-
-def on_desc_stanza(stanza)
-  @name = cask_block.header.cask_token
-  desc_call = stanza.stanza_node
-  audit_desc(:cask, @name, desc_call)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/Discontinued.html b/docs/RuboCop/Cop/Cask/Discontinued.html deleted file mode 100644 index 707415502..000000000 --- a/docs/RuboCop/Cop/Cask/Discontinued.html +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::Discontinued - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::Discontinued - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
CaskHelp
-
- - - - - - -
-
Defined in:
-
rubocops/cask/discontinued.rb,
- rubocops/cask/discontinued.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop corrects caveats { discontinued } to deprecate!.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MESSAGE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Use `deprecate!` instead of `caveats { discontinued }`."
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask, #on_system_methods

- - - - - -
-

Instance Method Details

- - -
-

- - #caveats_contains_only_discontinued?(base_node, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - base_node - - - (RuboCop::AST::BlockNode) - - - -
  • - -
  • - - block - - - (T.proc.params(node: RuboCop::AST::SendNode).void, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-
-
# File 'rubocops/cask/discontinued.rbi', line 13
-
-def caveats_contains_only_discontinued?(base_node, &block); end
-
-
- -
-

- - #find_discontinued_method_call(base_node, &block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - base_node - - - (RuboCop::AST::BlockNode) - - - -
  • - -
  • - - block - - - (T.proc.params(node: RuboCop::AST::SendNode).void) - - - -
  • - -
- - -
- - - - -
-
-
-
-21
-
-
# File 'rubocops/cask/discontinued.rbi', line 21
-
-def find_discontinued_method_call(base_node, &block); end
-
-
- -
-

- - #on_cask_stanza_block(stanza_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'rubocops/cask/discontinued.rb', line 14
-
-def on_cask_stanza_block(stanza_block)
-  stanza_block.stanzas.select(&:caveats?).each do |stanza|
-    find_discontinued_method_call(stanza.stanza_node) do |node|
-      if caveats_contains_only_discontinued?(node.parent)
-        add_offense(node.parent, message: MESSAGE) do |corrector|
-          corrector.replace(node.parent.source_range,
-                            "deprecate! date: \"#{Date.today}\", because: :discontinued")
-        end
-      else
-        add_offense(node, message: MESSAGE)
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/HomepageUrlTrailingSlash.html b/docs/RuboCop/Cop/Cask/HomepageUrlTrailingSlash.html deleted file mode 100644 index 00331c42c..000000000 --- a/docs/RuboCop/Cop/Cask/HomepageUrlTrailingSlash.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::HomepageUrlTrailingSlash - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::HomepageUrlTrailingSlash - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
OnHomepageStanza, HelperFunctions
-
- - - - - - -
-
Defined in:
-
rubocops/cask/homepage_url_trailing_slash.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks that a cask's homepage ends with a slash -if it does not have a path component.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG_NO_SLASH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"'%<url>s' must have a slash after the domain."
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - - -

Methods included from OnHomepageStanza

-

#on_cask

- - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask, #on_cask_stanza_block, #on_system_methods

- - - - - -
-

Instance Method Details

- - -
-

- - #on_homepage_stanza(stanza) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'rubocops/cask/homepage_url_trailing_slash.rb', line 19
-
-def on_homepage_stanza(stanza)
-  url_node = stanza.stanza_node.first_argument
-
-  url = if url_node.dstr_type?
-    # Remove quotes from interpolated string.
-    url_node.source[1..-2]
-  else
-    url_node.str_content
-  end
-
-  return unless url&.match?(%r{^.+://[^/]+$})
-
-  domain = URI(string_content(url_node, strip_dynamic: true)).host
-  return if domain.blank?
-
-  # This also takes URLs like 'https://example.org?path'
-  # and 'https://example.org#path' into account.
-  corrected_source = url_node.source.sub("://#{domain}", "://#{domain}/")
-
-  add_offense(url_node.loc.expression, message: format(MSG_NO_SLASH, url:)) do |corrector|
-    corrector.replace(url_node.source_range, corrected_source)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/NoOverrides.html b/docs/RuboCop/Cop/Cask/NoOverrides.html deleted file mode 100644 index add383428..000000000 --- a/docs/RuboCop/Cop/Cask/NoOverrides.html +++ /dev/null @@ -1,659 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::NoOverrides - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::NoOverrides - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
CaskHelp
-
- - - - - - -
-
Defined in:
-
rubocops/cask/no_overrides.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
OVERRIDEABLE_METHODS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- -
- TODO: -

Update this list if new stanzas are added to Cask::DSL that call set_unique_stanza.

-
-
- -

These stanzas can be overridden by on_* blocks, so take them into account.

- - -
-
-
- - -
-
-
[
-  :appcast, :arch, :auto_updates, :conflicts_with, :container,
-  :desc, :homepage, :sha256, :url, :version
-].freeze
- -
MESSAGE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Do not use a top-level `%<stanza>s` stanza as the default. " \
-"Add it to an `on_{system}` block instead. " \
-"Use `:or_older` or `:or_newer` to specify a range of macOS versions."
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask_stanza_block, #on_system_methods

- - - - - -
-

Instance Method Details

- - -
-

- - #inside_livecheck_block?(node) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'rubocops/cask/no_overrides.rb', line 58
-
-def inside_livecheck_block?(node)
-  single_stanza_livecheck_block?(node) || multi_stanza_livecheck_block?(node)
-end
-
-
- -
-

- - #multi_stanza_livecheck_block?(node) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-69
-
-
# File 'rubocops/cask/no_overrides.rb', line 66
-
-def multi_stanza_livecheck_block?(node)
-  grandparent_node = node.parent.parent
-  node.parent.begin_type? && grandparent_node.block_type? && grandparent_node.method_name == :livecheck
-end
-
-
- -
-

- - #on_cask(cask_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'rubocops/cask/no_overrides.rb', line 20
-
-def on_cask(cask_block)
-  cask_stanzas = cask_block.toplevel_stanzas
-
-  return if (on_blocks = on_system_methods(cask_stanzas)).none?
-
-  stanzas_in_blocks = on_system_stanzas(on_blocks)
-
-  cask_stanzas.each do |stanza|
-    # Skip if the stanza is not allowed to be overridden.
-    next unless OVERRIDEABLE_METHODS.include?(stanza.stanza_name)
-    # Skip if the stanza outside of a block is not also in an `on_*` block.
-    next unless stanzas_in_blocks.include?(stanza.stanza_name)
-
-    add_offense(stanza.source_range, message: format(MESSAGE, stanza: stanza.stanza_name))
-  end
-end
-
-
- -
-

- - #on_system_stanzas(on_system) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'rubocops/cask/no_overrides.rb', line 37
-
-def on_system_stanzas(on_system)
-  names = Set.new
-  method_nodes = on_system.map(&:method_node)
-  method_nodes.select(&:block_type?).each do |node|
-    node.child_nodes.each do |child|
-      child.each_node(:send) do |send_node|
-        # Skip (nested) livecheck blocks as its `url` is different to a download `url`.
-        next if send_node.method_name == :livecheck || inside_livecheck_block?(send_node)
-        # Skip string interpolations.
-        if send_node.ancestors.drop_while { |a| !a.begin_type? }.any? { |a| a.dstr_type? || a.regexp_type? }
-          next
-        end
-        next if RuboCop::Cask::Constants::ON_SYSTEM_METHODS.include?(send_node.method_name)
-
-        names.add(send_node.method_name)
-      end
-    end
-  end
-  names
-end
-
-
- -
-

- - #single_stanza_livecheck_block?(node) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'rubocops/cask/no_overrides.rb', line 62
-
-def single_stanza_livecheck_block?(node)
-  node.parent.block_type? && node.parent.method_name == :livecheck
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/OnDescStanza.html b/docs/RuboCop/Cop/Cask/OnDescStanza.html deleted file mode 100644 index 4bcebcfb9..000000000 --- a/docs/RuboCop/Cop/Cask/OnDescStanza.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - Module: RuboCop::Cop::Cask::OnDescStanza - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::Cask::OnDescStanza - - - Private -

-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
CaskHelp
-
- - - - -
-
Included in:
-
Desc
-
- - - -
-
Defined in:
-
rubocops/cask/mixin/on_desc_stanza.rb,
- rubocops/cask/mixin/on_desc_stanza.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask_stanza_block, #on_system_methods

- - - - -
-

Instance Method Details

- - -
-

- - #on_cask(cask_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-
-
# File 'rubocops/cask/mixin/on_desc_stanza.rb', line 12
-
-def on_cask(cask_block)
-  @cask_block = cask_block
-
-  toplevel_stanzas.select(&:desc?).each do |stanza|
-    on_desc_stanza(stanza)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/OnHomepageStanza.html b/docs/RuboCop/Cop/Cask/OnHomepageStanza.html deleted file mode 100644 index d96108a3c..000000000 --- a/docs/RuboCop/Cop/Cask/OnHomepageStanza.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - Module: RuboCop::Cop::Cask::OnHomepageStanza - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::Cask::OnHomepageStanza - - - Private -

-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
CaskHelp
-
- - - - -
-
Included in:
-
HomepageUrlTrailingSlash
-
- - - -
-
Defined in:
-
rubocops/cask/mixin/on_homepage_stanza.rb,
- rubocops/cask/mixin/on_homepage_stanza.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask_stanza_block, #on_system_methods

- - - - -
-

Instance Method Details

- - -
-

- - #on_cask(cask_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-
-
# File 'rubocops/cask/mixin/on_homepage_stanza.rb', line 12
-
-def on_cask(cask_block)
-  @cask_block = cask_block
-
-  toplevel_stanzas.select(&:homepage?).each do |stanza|
-    on_homepage_stanza(stanza)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/OnSystemConditionals.html b/docs/RuboCop/Cop/Cask/OnSystemConditionals.html deleted file mode 100644 index 37d39c75d..000000000 --- a/docs/RuboCop/Cop/Cask/OnSystemConditionals.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::OnSystemConditionals - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::OnSystemConditionals - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector, Forwardable
-
- - - -
-
Includes:
-
CaskHelp, OnSystemConditionalsHelper
-
- - - - - - -
-
Defined in:
-
rubocops/cask/on_system_conditionals.rb,
- rubocops/cask/on_system_conditionals.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that OS conditionals are consistent.

- -

Example

- -
# bad
-cask 'foo' do
-  if MacOS.version == :high_sierra
-    sha256 "..."
-  end
-end
-
-# good
-cask 'foo' do
-  on_high_sierra do
-    sha256 "..."
-  end
-end
-
- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
FLIGHT_STANZA_NAMES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:preflight, :postflight, :uninstall_preflight, :uninstall_postflight].freeze
- -
- - - - - - -

Constants included - from OnSystemConditionalsHelper

-

OnSystemConditionalsHelper::ARCH_OPTIONS, OnSystemConditionalsHelper::BASE_OS_OPTIONS, OnSystemConditionalsHelper::MACOS_MODULE_NAMES, OnSystemConditionalsHelper::MACOS_VERSION_CONDITIONALS, OnSystemConditionalsHelper::MACOS_VERSION_OPTIONS, OnSystemConditionalsHelper::ON_SYSTEM_OPTIONS

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask_stanza_block, #on_system_methods

- - - - - - - - - - - -

Methods included from OnSystemConditionalsHelper

-

#audit_arch_conditionals, #audit_base_os_conditionals, #audit_macos_references, #audit_macos_version_conditionals, #audit_on_system_blocks, #hardware_cpu_search, #if_arch_node_search, #if_base_os_node_search, #if_macos_version_node_search, #macos_version_comparison_search, #on_macos_version_method_call, #on_system_method_call

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - -
-

Instance Method Details

- - -
-

- - #on_cask(cask_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-
-
# File 'rubocops/cask/on_system_conditionals.rb', line 37
-
-def on_cask(cask_block)
-  @cask_block = cask_block
-
-  toplevel_stanzas.each do |stanza|
-    next unless FLIGHT_STANZA_NAMES.include? stanza.stanza_name
-
-    audit_on_system_blocks(stanza.stanza_node, stanza.stanza_name)
-  end
-
-  audit_arch_conditionals(cask_body, allowed_blocks: FLIGHT_STANZA_NAMES)
-  audit_macos_version_conditionals(cask_body, recommend_on_system: false)
-  simplify_sha256_stanzas
-end
-
-
- -
-

- - #sha256_on_arch_stanzas(base_node, &block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - base_node - - - (Parser::AST::Node) - - - -
  • - -
  • - - block - - - (T.proc.params(node: Parser::AST::Node, method: Symbol, value: String).void) - - - -
  • - -
- - -
- - - - -
-
-
-
-13
-
-
# File 'rubocops/cask/on_system_conditionals.rbi', line 13
-
-def sha256_on_arch_stanzas(base_node, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/OnUrlStanza.html b/docs/RuboCop/Cop/Cask/OnUrlStanza.html deleted file mode 100644 index 956083ba2..000000000 --- a/docs/RuboCop/Cop/Cask/OnUrlStanza.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - Module: RuboCop::Cop::Cask::OnUrlStanza - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::Cask::OnUrlStanza - - - Private -

-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
CaskHelp
-
- - - - -
-
Included in:
-
Url, UrlLegacyCommaSeparators
-
- - - -
-
Defined in:
-
rubocops/cask/mixin/on_url_stanza.rb,
- rubocops/cask/mixin/on_url_stanza.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask_stanza_block, #on_system_methods

- - - - -
-

Instance Method Details

- - -
-

- - #on_cask(cask_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-18
-
-
# File 'rubocops/cask/mixin/on_url_stanza.rb', line 12
-
-def on_cask(cask_block)
-  @cask_block = cask_block
-
-  toplevel_stanzas.select(&:url?).each do |stanza|
-    on_url_stanza(stanza)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/SharedFilelistGlob.html b/docs/RuboCop/Cop/Cask/SharedFilelistGlob.html deleted file mode 100644 index 4ed054b75..000000000 --- a/docs/RuboCop/Cop/Cask/SharedFilelistGlob.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::SharedFilelistGlob - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::SharedFilelistGlob - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/cask/shared_filelist_glob.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #on_send(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'rubocops/cask/shared_filelist_glob.rb', line 10
-
-def on_send(node)
-  return if node.method_name != :zap
-
-  node.each_descendant(:pair).each do |pair|
-    symbols = pair.children.select(&:sym_type?).map(&:value)
-    next unless symbols.include?(:trash)
-
-    pair.each_descendant(:array).each do |array|
-      regex = /\.sfl\d"$/
-      message = "Use a glob (*) instead of a specific version (ie. sfl2) for trashing Shared File List paths"
-
-      array.children.each do |item|
-        next unless item.source.match?(regex)
-
-        corrected_item = item.source.sub(/sfl\d"$/, "sfl*\"")
-
-        add_offense(item,
-                    message:) do |corrector|
-          corrector.replace(item, corrected_item)
-        end
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/StanzaGrouping.html b/docs/RuboCop/Cop/Cask/StanzaGrouping.html deleted file mode 100644 index a60680c8c..000000000 --- a/docs/RuboCop/Cop/Cask/StanzaGrouping.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::StanzaGrouping - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::StanzaGrouping - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector, Forwardable
-
- - - -
-
Includes:
-
RangeHelp, CaskHelp
-
- - - - - - -
-
Defined in:
-
rubocops/cask/stanza_grouping.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks that a cask's stanzas are grouped correctly, including nested within on_* blocks.

- - -
-
- - -

- Constant Summary - collapse -

- -
- -
MISSING_LINE_MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"stanza groups should be separated by a single empty line"
- -
EXTRA_LINE_MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"stanzas within the same group should have no lines between them"
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask_stanza_block, #on_system_methods

- - - - - -
-

Instance Method Details

- - -
-

- - #on_cask(cask_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'rubocops/cask/stanza_grouping.rb', line 20
-
-def on_cask(cask_block)
-  @cask_block = cask_block
-  @line_ops = {}
-  cask_stanzas = cask_block.toplevel_stanzas
-  add_offenses(cask_stanzas)
-
-  return if (on_blocks = on_system_methods(cask_stanzas)).none?
-
-  on_blocks.map(&:method_node).select(&:block_type?).each do |on_block|
-    stanzas = inner_stanzas(on_block, processed_source.comments)
-    add_offenses(stanzas)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/StanzaOrder.html b/docs/RuboCop/Cop/Cask/StanzaOrder.html deleted file mode 100644 index 6acc716eb..000000000 --- a/docs/RuboCop/Cop/Cask/StanzaOrder.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::StanzaOrder - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::StanzaOrder - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector, Forwardable
-
- - - -
-
Includes:
-
IgnoredNode, CaskHelp
-
- - - - - - -
-
Defined in:
-
rubocops/cask/stanza_order.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks that a cask's stanzas are ordered correctly, including nested within on_* blocks.

- - -
-
- - -

- Constant Summary - collapse -

- -
- -
MESSAGE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"`%<stanza>s` stanza out of order"
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask, #on_system_methods

- - - - - - -
-

Instance Method Details

- - -
-

- - #on_cask_stanza_block(stanza_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-
-
# File 'rubocops/cask/stanza_order.rb', line 19
-
-def on_cask_stanza_block(stanza_block)
-  stanzas = stanza_block.stanzas
-  ordered_stanzas = sort_stanzas(stanzas)
-
-  return if stanzas == ordered_stanzas
-
-  stanzas.zip(ordered_stanzas).each do |stanza_before, stanza_after|
-    next if stanza_before == stanza_after
-
-    add_offense(
-      stanza_before.method_node,
-      message: format(MESSAGE, stanza: stanza_before.stanza_name),
-    ) do |corrector|
-      next if part_of_ignored_node?(stanza_before.method_node)
-
-      corrector.replace(
-        stanza_before.source_range_with_comments,
-        stanza_after.source_with_comments,
-      )
-
-      # Ignore node so that nested content is not auto-corrected and clobbered.
-      ignore_node(stanza_before.method_node)
-    end
-  end
-end
-
-
- -
-

- - #on_new_investigationObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-
-
# File 'rubocops/cask/stanza_order.rb', line 45
-
-def on_new_investigation
-  super
-
-  ignored_nodes.clear
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/UninstallMethodsOrder.html b/docs/RuboCop/Cop/Cask/UninstallMethodsOrder.html deleted file mode 100644 index 44d8ecb2c..000000000 --- a/docs/RuboCop/Cop/Cask/UninstallMethodsOrder.html +++ /dev/null @@ -1,558 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::UninstallMethodsOrder - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::UninstallMethodsOrder - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
HelperFunctions
-
- - - - - - -
-
Defined in:
-
rubocops/cask/uninstall_methods_order.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks for the correct order of methods within the 'uninstall' and 'zap' stanzas.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.let("`%<method>s` method out of order", String)
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - -
-

Instance Method Details

- - -
-

- - #method_order_index(method_node) ⇒ Integer - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - method_node - - - (AST::SymbolNode) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-61
-
-
# File 'rubocops/cask/uninstall_methods_order.rb', line 58
-
-def method_order_index(method_node)
-  method_name = method_node.children.first
-  RuboCop::Cask::Constants::UNINSTALL_METHODS_ORDER.index(method_name) || -1
-end
-
-
- -
-

- - #on_send(node) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - node - - - (AST::SendNode) - - - -
  • - -
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'rubocops/cask/uninstall_methods_order.rb', line 17
-
-def on_send(node)
-  return unless [:zap, :uninstall].include?(node.method_name)
-
-  hash_node = node.arguments.first
-  return if hash_node.nil? || (!hash_node.is_a?(AST::Node) && !hash_node.hash_type?)
-
-  method_nodes = hash_node.pairs.map(&:key)
-  expected_order = method_nodes.sort_by { |method| method_order_index(method) }
-  comments = processed_source.comments
-
-  method_nodes.each_with_index do |method, index|
-    next if method == expected_order[index]
-
-    report_and_correct_offense(method, hash_node, expected_order, comments)
-  end
-end
-
-
- -
-

- - #report_and_correct_offense(method, hash_node, expected_order, comments) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - method - - - (AST::Node) - - - -
  • - -
  • - - hash_node - - - (AST::HashNode) - - - -
  • - -
  • - - expected_order - - - (Array<AST::Node>) - - - -
  • - -
  • - - comments - - - (Array<Parser::Source::Comment>) - - - -
  • - -
- - -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# File 'rubocops/cask/uninstall_methods_order.rb', line 40
-
-def report_and_correct_offense(method, hash_node, expected_order, comments)
-  add_offense(method, message: format(MSG, method: method.children.first)) do |corrector|
-    indentation = " " * (start_column(method) - line_start_column(method))
-    new_code = expected_order.map do |expected_method|
-      method_pair = hash_node.pairs.find { |pair| pair.key == expected_method }
-      source = method_pair.source
-
-      # Find and attach a comment on the same line as the method_pair, if any
-      inline_comment = comments.find do |comment|
-        comment.location.line == method_pair.loc.line && comment.location.column > method_pair.loc.column
-      end
-      inline_comment ? "#{source} #{inline_comment.text}" : source
-    end.join(",\n#{indentation}")
-    corrector.replace(hash_node.source_range, new_code)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/Url.html b/docs/RuboCop/Cop/Cask/Url.html deleted file mode 100644 index 24e957835..000000000 --- a/docs/RuboCop/Cop/Cask/Url.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::Url - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::Url - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector, Forwardable
-
- - - -
-
Includes:
-
OnUrlStanza
-
- - - - - - -
-
Defined in:
-
rubocops/cask/url.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks that a cask's url stanza is formatted correctly.

- -

Example

- -
# bad
-url "https://example.com/download/foo.dmg",
-    verified: "https://example.com/download"
-
-# good
-url "https://example.com/download/foo.dmg",
-    verified: "example.com/download/"
-
- - -
-
-
- - -
-

Direct Known Subclasses

-

UrlLegacyCommaSeparators

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - -

Methods included from OnUrlStanza

-

#on_cask

- - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask, #on_cask_stanza_block, #on_system_methods

- - - - - -
-

Instance Method Details

- - -
-

- - #on_url_stanza(stanza) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-
-
# File 'rubocops/cask/url.rb', line 25
-
-def on_url_stanza(stanza)
-  return if stanza.stanza_node.block_type?
-
-  url_stanza = stanza.stanza_node.first_argument
-  hash_node = stanza.stanza_node.last_argument
-  return unless hash_node.hash_type?
-
-  hash_node.each_pair do |key_node, value_node|
-    next if key_node.source != "verified"
-    next unless value_node.str_type?
-
-    if value_node.source.start_with?(%r{^"https?://})
-      add_offense(
-        value_node.source_range,
-        message: "Verified URL parameter value should not contain a URL scheme.",
-      ) do |corrector|
-        corrector.replace(value_node.source_range, value_node.source.gsub(%r{^"https?://}, "\""))
-      end
-    end
-
-    # Skip if the URL and the verified value are the same.
-    next if value_node.source == url_stanza.source.gsub(%r{^"https?://}, "\"")
-    # Skip if the URL has two path components, e.g. `https://github.com/google/fonts.git`.
-    next if url_stanza.source.gsub(%r{^"https?://}, "\"").count("/") == 2
-    # Skip if the verified value ends with a slash.
-    next if value_node.str_content.end_with?("/")
-
-    add_offense(
-      value_node.source_range,
-      message: "Verified URL parameter value should end with a /.",
-    ) do |corrector|
-      corrector.replace(value_node.source_range, value_node.source.gsub(/"$/, "/\""))
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/UrlLegacyCommaSeparators.html b/docs/RuboCop/Cop/Cask/UrlLegacyCommaSeparators.html deleted file mode 100644 index 8c8198c53..000000000 --- a/docs/RuboCop/Cop/Cask/UrlLegacyCommaSeparators.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::UrlLegacyCommaSeparators - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::UrlLegacyCommaSeparators - - - Private -

-
- -
-
Inherits:
-
- Url - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
OnUrlStanza
-
- - - - - - -
-
Defined in:
-
rubocops/cask/url_legacy_comma_separators.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks for version.before_comma and version.after_comma.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG_CSV = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Use `version.csv.first` instead of `version.before_comma` " \
-"and `version.csv.second` instead of `version.after_comma`."
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from OnUrlStanza

-

#on_cask

- - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask, #on_cask_stanza_block, #on_system_methods

- - - - - - - - - - - - - -
-

Instance Method Details

- - -
-

- - #on_url_stanza(stanza) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'rubocops/cask/url_legacy_comma_separators.rb', line 15
-
-def on_url_stanza(stanza)
-  return if stanza.stanza_node.type == :block
-
-  url_node = stanza.stanza_node.first_argument
-
-  legacy_comma_separator_pattern = /version\.(before|after)_comma/
-
-  url = url_node.source
-
-  return unless url.match?(legacy_comma_separator_pattern)
-
-  corrected_url = url.sub("before_comma", "csv.first")&.sub("after_comma", "csv.second")
-
-  add_offense(url_node.loc.expression, message: format(MSG_CSV, url:)) do |corrector|
-    corrector.replace(url_node.source_range, corrected_url)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Cask/Variables.html b/docs/RuboCop/Cop/Cask/Variables.html deleted file mode 100644 index 6ac5f34bd..000000000 --- a/docs/RuboCop/Cop/Cask/Variables.html +++ /dev/null @@ -1,383 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Cask::Variables - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Cask::Variables - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector, Forwardable
-
- - - -
-
Includes:
-
CaskHelp
-
- - - - - - -
-
Defined in:
-
rubocops/cask/variables.rb,
- sorbet/rbi/dsl/rubo_cop/cop/cask/variables.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits variables in casks.

- -

Example

- -
# bad
-cask do
-  arch = Hardware::CPU.intel? ? "darwin" : "darwin-arm64"
-end
-
-# good
-cask 'foo' do
-  arch arm: "darwin-arm64", intel: "darwin"
-end
-
- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - -

Methods included from CaskHelp

-

#inner_stanzas, #on_block, #on_cask_stanza_block, #on_system_methods

- - - - - -
-

Instance Method Details

- - -
-

- - #on_cask(cask_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-32
-
-
# File 'rubocops/cask/variables.rb', line 29
-
-def on_cask(cask_block)
-  @cask_block = cask_block
-  add_offenses
-end
-
-
- -
-

- - #variable_assignment(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/cask/variables.rbi', line 17
-
-def variable_assignment(node, *pattern, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/DescHelper.html b/docs/RuboCop/Cop/DescHelper.html deleted file mode 100644 index 91a4d664a..000000000 --- a/docs/RuboCop/Cop/DescHelper.html +++ /dev/null @@ -1,532 +0,0 @@ - - - - - - - Module: RuboCop::Cop::DescHelper - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::DescHelper - - - Private -

-
- - - - - - -
-
Includes:
-
HelperFunctions
-
- - - - -
-
Included in:
-
Cask::Desc, FormulaAudit::Desc
-
- - - -
-
Defined in:
-
rubocops/shared/desc_helper.rb,
- rubocops/shared/desc_helper.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MAX_DESC_LENGTH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
80
- -
VALID_LOWERCASE_WORDS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[
-  iOS
-  iPhone
-  macOS
-].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - -
-

Instance Method Details

- - -
-

- - #audit_desc(type, name, desc_call) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-
-
# File 'rubocops/shared/desc_helper.rb', line 20
-
-def audit_desc(type, name, desc_call)
-  # Check if a desc is present.
-  if desc_call.nil?
-    problem "#{type.to_s.capitalize} should have a desc (Description)."
-    return
-  end
-
-  @offensive_node = desc_call
-
-  desc = desc_call.first_argument
-
-  # Check if the desc is empty.
-  desc_length = string_content(desc).length
-  if desc_length.zero?
-    problem "The desc (description) should not be an empty string."
-    return
-  end
-
-  # Check the desc for leading whitespace.
-  desc_problem "Description shouldn't have leading spaces." if regex_match_group(desc, /^\s+/)
-
-  # Check the desc for trailing whitespace.
-  desc_problem "Description shouldn't have trailing spaces." if regex_match_group(desc, /\s+$/)
-
-  # Check if "command-line" is spelled incorrectly in the desc.
-  if (match = regex_match_group(desc, /(command ?line)/i))
-    c = match.to_s[0]
-    desc_problem "Description should use \"#{c}ommand-line\" instead of \"#{match}\"."
-  end
-
-  # Check if the desc starts with an article.
-  desc_problem "Description shouldn't start with an article." if regex_match_group(desc, /^(the|an?)(?=\s)/i)
-
-  # Check if invalid lowercase words are at the start of a desc.
-  if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && regex_match_group(desc, /^[a-z]/)
-    desc_problem "Description should start with a capital letter."
-  end
-
-  # Check if the desc starts with the formula's or cask's name.
-  name_regex = name.delete("-").chars.join('[\s\-]?')
-  if regex_match_group(desc, /^#{name_regex}\b/i)
-    desc_problem "Description shouldn't start with the #{type} name."
-  end
-
-  if type == :cask &&
-     (match = regex_match_group(desc, /\b(macOS|Mac( ?OS( ?X)?)?|OS ?X)(?! virtual machines?)\b/i)) &&
-     match[1] != "MAC"
-    add_offense(@offensive_source_range, message: "Description shouldn't contain the platform.")
-  end
-
-  # Check if a full stop is used at the end of a desc (apart from in the case of "etc.").
-  if regex_match_group(desc, /\.$/) && !string_content(desc).end_with?("etc.")
-    desc_problem "Description shouldn't end with a full stop."
-  end
-
-  # Check if the desc contains Unicode emojis or symbols (Unicode Other Symbols category).
-  desc_problem "Description shouldn't contain Unicode emojis or symbols." if regex_match_group(desc, /\p{So}/)
-
-  # Check if the desc length exceeds maximum length.
-  return if desc_length <= MAX_DESC_LENGTH
-
-  problem "Description is too long. It should be less than #{MAX_DESC_LENGTH} characters. " \
-          "The current length is #{desc_length}."
-end
-
-
- -
-

- - #desc_problem(message) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Auto correct desc problems. regex_match_group must be called before this to populate @offense_source_range.

- - -
-
-
- - -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-
-
# File 'rubocops/shared/desc_helper.rb', line 86
-
-def desc_problem(message)
-  add_offense(@offensive_source_range, message:) do |corrector|
-    match_data = @offensive_node.source.match(/\A(?<quote>["'])(?<correction>.*)(?:\k<quote>)\Z/)
-    correction = match_data[:correction]
-    quote = match_data[:quote]
-
-    next if correction.nil?
-
-    correction.gsub!(/^\s+/, "")
-    correction.gsub!(/\s+$/, "")
-
-    correction.sub!(/^(the|an?)\s+/i, "")
-
-    first_word = correction.split.first
-    unless VALID_LOWERCASE_WORDS.include?(first_word)
-      first_char = first_word.to_s[0]
-      correction[0] = first_char.upcase if first_char
-    end
-
-    correction.gsub!(/(ommand ?line)/i, "ommand-line")
-    correction.gsub!(/(^|[^a-z])#{@name}([^a-z]|$)/i, "\\1\\2")
-    correction.gsub!(/\s?\p{So}/, "")
-    correction.gsub!(/^\s+/, "")
-    correction.gsub!(/\s+$/, "")
-    correction.gsub!(/\.$/, "")
-
-    next if correction == match_data[:correction]
-
-    corrector.replace(@offensive_node.source_range, "#{quote}#{correction}#{quote}")
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit.html b/docs/RuboCop/Cop/FormulaAudit.html deleted file mode 100644 index 801832c9d..000000000 --- a/docs/RuboCop/Cop/FormulaAudit.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: RuboCop::Cop::FormulaAudit - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::FormulaAudit - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/desc.rb,
- rubocops/text.rb,
rubocops/urls.rb,
rubocops/class.rb,
rubocops/files.rb,
rubocops/lines.rb,
rubocops/bottle.rb,
rubocops/caveats.rb,
rubocops/options.rb,
rubocops/patches.rb,
rubocops/service.rb,
rubocops/version.rb,
rubocops/checksum.rb,
rubocops/homepage.rb,
rubocops/keg_only.rb,
rubocops/conflicts.rb,
rubocops/livecheck.rb,
rubocops/uses_from_macos.rb,
rubocops/components_order.rb,
rubocops/dependency_order.rb,
rubocops/deprecate_disable.rb,
rubocops/components_redundancy.rb,
rubocops/resource_requires_dependencies.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: AssertStatements, BottleDigestIndentation, BottleFormat, BottleOrder, BottleTagIndentation, Caveats, Checksum, ChecksumCase, ClassInheritance, ClassName, Comments, ComponentsOrder, ComponentsRedundancy, Conflicts, DependencyOrder, DeprecateDisableDate, DeprecateDisableReason, Desc, Files, GenerateCompletionsDSL, GitUrls, Homepage, KegOnly, LicenseArrays, Licenses, Lines, LivecheckRegexCaseInsensitive, LivecheckRegexExtension, LivecheckRegexIfPageMatch, LivecheckRegexParentheses, LivecheckSkip, LivecheckUrlProvided, LivecheckUrlSymbol, MacOSOnLinux, Miscellaneous, MpiCheck, OnSystemConditionals, OptionDeclarations, Options, Patches, ProvidedByMacos, PyPiUrls, PyoxidizerCheck, PythonVersions, QuicTLSCheck, ResourceRequiresDependencies, SafePopenCommands, Service, ShellVariables, SingleGenerateCompletionsDSLCall, Test, Text, Urls, UsesFromMacos, Version - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/AssertStatements.html b/docs/RuboCop/Cop/FormulaAudit/AssertStatements.html deleted file mode 100644 index 57f644862..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/AssertStatements.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::AssertStatements - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::AssertStatements - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/assert_statements.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that idiomatic assert_* statements are used.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'rubocops/lines.rb', line 85
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  find_every_method_call_by_name(body_node, :assert).each do |method|
-    if method_called_ever?(method, :include?) && !method_called_ever?(method, :!)
-      problem "Use `assert_match` instead of `assert ...include?`"
-    end
-
-    if method_called_ever?(method, :exist?) && !method_called_ever?(method, :!)
-      problem "Use `assert_predicate <path_to_file>, :exist?` instead of `#{method.source}`"
-    end
-
-    if method_called_ever?(method, :exist?) && method_called_ever?(method, :!)
-      problem "Use `refute_predicate <path_to_file>, :exist?` instead of `#{method.source}`"
-    end
-
-    if method_called_ever?(method, :executable?) && !method_called_ever?(method, :!)
-      problem "Use `assert_predicate <path_to_file>, :executable?` instead of `#{method.source}`"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/BottleDigestIndentation.html b/docs/RuboCop/Cop/FormulaAudit/BottleDigestIndentation.html deleted file mode 100644 index 956b10e74..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/BottleDigestIndentation.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::BottleDigestIndentation - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::BottleDigestIndentation - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/bottle.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits the indentation of the sha256 digests in thebottle block in formulae.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'rubocops/bottle.rb', line 92
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  bottle_node = find_block(body_node, :bottle)
-  return if bottle_node.nil?
-
-  sha256_nodes = find_method_calls_by_name(bottle_node.body, :sha256)
-
-  max_digest_column = 0
-  sha256_nodes.each do |sha256_node|
-    sha256_hash = sha256_node.last_argument
-    digest_column = T.let(sha256_hash.pairs.last.value.source_range.column, Integer)
-
-    max_digest_column = digest_column if digest_column > max_digest_column
-  end
-  # This must be in a separate loop to make sure max_digest_column is truly the maximum
-  sha256_nodes.each do |sha256_node| # rubocop:disable Style/CombinableLoops
-    sha256_hash = sha256_node.last_argument
-    hash = sha256_hash.pairs.last.value
-    digest_column = hash.source_range.column
-
-    next if digest_column == max_digest_column
-
-    offending_node(hash)
-    problem "Align bottle digests" do |corrector|
-      new_line = (" " * (max_digest_column - digest_column)) + hash.source
-      corrector.replace(hash.source_range, new_line)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/BottleFormat.html b/docs/RuboCop/Cop/FormulaAudit/BottleFormat.html deleted file mode 100644 index 66b86cbdf..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/BottleFormat.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::BottleFormat - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::BottleFormat - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/bottle.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits the bottle block in formulae.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-
-
# File 'rubocops/bottle.rb', line 13
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  bottle_node = find_block(body_node, :bottle)
-  return if bottle_node.nil?
-
-  sha256_nodes = find_method_calls_by_name(bottle_node.body, :sha256)
-  cellar_node = find_node_method_by_name(bottle_node.body, :cellar)
-  cellar_source = cellar_node&.first_argument&.source
-
-  if sha256_nodes.present? && cellar_node.present?
-    offending_node(cellar_node)
-    problem "`cellar` should be a parameter to `sha256`" do |corrector|
-      corrector.remove(range_by_whole_lines(cellar_node.source_range, include_final_newline: true))
-    end
-  end
-
-  sha256_nodes.each do |sha256_node|
-    sha256_hash = sha256_node.last_argument
-    sha256_pairs = sha256_hash.pairs
-    next if sha256_pairs.count != 1
-
-    sha256_pair = sha256_pairs.first
-    sha256_key = sha256_pair.key
-    sha256_value = sha256_pair.value
-    next unless sha256_value.sym_type?
-
-    tag = sha256_value.value
-    digest_source = sha256_key.source
-    sha256_line = if cellar_source.present?
-      "sha256 cellar: #{cellar_source}, #{tag}: #{digest_source}"
-    else
-      "sha256 #{tag}: #{digest_source}"
-    end
-
-    offending_node(sha256_node)
-    problem "`sha256` should use new syntax" do |corrector|
-      corrector.replace(sha256_node.source_range, sha256_line)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/BottleOrder.html b/docs/RuboCop/Cop/FormulaAudit/BottleOrder.html deleted file mode 100644 index f32009d04..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/BottleOrder.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::BottleOrder - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::BottleOrder - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/bottle.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits the order of the bottle block in formulae.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-
-
# File 'rubocops/bottle.rb', line 126
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  bottle_node = find_block(body_node, :bottle)
-  return if bottle_node.nil?
-  return if bottle_node.child_nodes.blank?
-
-  non_sha256_nodes = []
-  sha256_nodes = []
-
-  bottle_block_method_calls = if bottle_node.child_nodes.last.begin_type?
-    bottle_node.child_nodes.last.child_nodes
-  else
-    [bottle_node.child_nodes.last]
-  end
-
-  bottle_block_method_calls.each do |node|
-    if node.method_name == :sha256
-      sha256_nodes << node
-    else
-      non_sha256_nodes << node
-    end
-  end
-
-  arm64_nodes = []
-  intel_nodes = []
-
-  sha256_nodes.each do |node|
-    version = sha256_bottle_tag node
-    if version.to_s.start_with? "arm64"
-      arm64_nodes << node
-    else
-      intel_nodes << node
-    end
-  end
-
-  return if sha256_order(sha256_nodes) == sha256_order(arm64_nodes + intel_nodes)
-
-  offending_node(bottle_node)
-  problem "ARM bottles should be listed before Intel bottles" do |corrector|
-    lines = ["bottle do"]
-    lines += non_sha256_nodes.map { |node| "    #{node.source}" }
-    lines += arm64_nodes.map { |node| "    #{node.source}" }
-    lines += intel_nodes.map { |node| "    #{node.source}" }
-    lines << "  end"
-    corrector.replace(bottle_node.source_range, lines.join("\n"))
-  end
-end
-
-
- -
-

- - #sha256_bottle_tag(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-179
-180
-181
-182
-183
-184
-185
-186
-
-
# File 'rubocops/bottle.rb', line 179
-
-def sha256_bottle_tag(node)
-  hash_pair = node.last_argument.pairs.last
-  if hash_pair.key.sym_type?
-    hash_pair.key.value
-  else
-    hash_pair.value.value
-  end
-end
-
-
- -
-

- - #sha256_order(nodes) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-173
-174
-175
-176
-177
-
-
# File 'rubocops/bottle.rb', line 173
-
-def sha256_order(nodes)
-  nodes.map do |node|
-    sha256_bottle_tag node
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/BottleTagIndentation.html b/docs/RuboCop/Cop/FormulaAudit/BottleTagIndentation.html deleted file mode 100644 index f4ba115f6..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/BottleTagIndentation.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::BottleTagIndentation - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::BottleTagIndentation - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/bottle.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits the indentation of the bottle tags in the bottle block in formulae.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-
-
# File 'rubocops/bottle.rb', line 58
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  bottle_node = find_block(body_node, :bottle)
-  return if bottle_node.nil?
-
-  sha256_nodes = find_method_calls_by_name(bottle_node.body, :sha256)
-
-  max_tag_column = 0
-  sha256_nodes.each do |sha256_node|
-    sha256_hash = sha256_node.last_argument
-    tag_column = T.let(sha256_hash.pairs.last.source_range.column, Integer)
-
-    max_tag_column = tag_column if tag_column > max_tag_column
-  end
-  # This must be in a separate loop to make sure max_tag_column is truly the maximum
-  sha256_nodes.each do |sha256_node| # rubocop:disable Style/CombinableLoops
-    sha256_hash = sha256_node.last_argument
-    hash = sha256_hash.pairs.last
-    tag_column = hash.source_range.column
-
-    next if tag_column == max_tag_column
-
-    offending_node(hash)
-    problem "Align bottle tags" do |corrector|
-      new_line = (" " * (max_tag_column - tag_column)) + hash.source
-      corrector.replace(hash.source_range, new_line)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Caveats.html b/docs/RuboCop/Cop/FormulaAudit/Caveats.html deleted file mode 100644 index aa20665cc..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Caveats.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Caveats - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Caveats - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/caveats.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that caveats don't recommend unsupported or unsafe operations.

- -

Example

- -
# bad
-def caveats
-  <<~EOS
-    Use `setuid` to allow running the exeutable by non-root users.
-  EOS
-end
-
-# good
-def caveats
-  <<~EOS
-    Use `sudo` to run the executable.
-  EOS
-end
-
- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, _body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'rubocops/caveats.rb', line 29
-
-def audit_formula(_node, _class_node, _parent_class_node, _body_node)
-  caveats_strings.each do |n|
-    if regex_match_group(n, /\bsetuid\b/i)
-      problem "Don't recommend `setuid` in the caveats, suggest `sudo` instead."
-    end
-
-    problem "Don't use ANSI escape codes in the caveats." if regex_match_group(n, /\e/)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Checksum.html b/docs/RuboCop/Cop/FormulaAudit/Checksum.html deleted file mode 100644 index 1fef43ef8..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Checksum.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Checksum - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Checksum - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/checksum.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that deprecated checksums are not used.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-
-
# File 'rubocops/checksum.rb', line 11
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  problem "MD5 checksums are deprecated, please use SHA-256" if method_called_ever?(body_node, :md5)
-
-  problem "SHA1 checksums are deprecated, please use SHA-256" if method_called_ever?(body_node, :sha1)
-
-  sha256_calls = find_every_method_call_by_name(body_node, :sha256)
-  sha256_calls.each do |sha256_call|
-    sha256_node = get_checksum_node(sha256_call)
-    audit_sha256(sha256_node)
-  end
-end
-
-
- -
-

- - #audit_sha256(checksum) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'rubocops/checksum.rb', line 25
-
-def audit_sha256(checksum)
-  return if checksum.nil?
-
-  if regex_match_group(checksum, /^$/)
-    problem "sha256 is empty"
-    return
-  end
-
-  if string_content(checksum).size != 64 && regex_match_group(checksum, /^\w*$/)
-    problem "sha256 should be 64 characters"
-  end
-
-  return unless regex_match_group(checksum, /[^a-f0-9]+/i)
-
-  add_offense(@offensive_source_range, message: "sha256 contains invalid characters")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/ChecksumCase.html b/docs/RuboCop/Cop/FormulaAudit/ChecksumCase.html deleted file mode 100644 index 68a97fd61..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/ChecksumCase.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::ChecksumCase - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::ChecksumCase - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/checksum.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that checksum strings are lowercase.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-
-
# File 'rubocops/checksum.rb', line 47
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  sha256_calls = find_every_method_call_by_name(body_node, :sha256)
-  sha256_calls.each do |sha256_call|
-    checksum = get_checksum_node(sha256_call)
-    next if checksum.nil?
-    next unless regex_match_group(checksum, /[A-F]+/)
-
-    add_offense(@offensive_source_range, message: "sha256 should be lowercase") do |corrector|
-      correction = @offensive_node.source.downcase
-      corrector.insert_before(@offensive_node.source_range, correction)
-      corrector.remove(@offensive_node.source_range)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/ClassInheritance.html b/docs/RuboCop/Cop/FormulaAudit/ClassInheritance.html deleted file mode 100644 index e51cdd82a..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/ClassInheritance.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::ClassInheritance - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::ClassInheritance - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/class_inheritance.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that a space is used for class inheritance.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, class_node, parent_class_node, _body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'rubocops/lines.rb', line 34
-
-def audit_formula(_node, class_node, parent_class_node, _body_node)
-  begin_pos = start_column(parent_class_node)
-  end_pos = end_column(class_node)
-  return if begin_pos-end_pos == 3
-
-  problem "Use a space in class inheritance: " \
-          "class #{@formula_name.capitalize} < #{class_name(parent_class_node)}"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/ClassName.html b/docs/RuboCop/Cop/FormulaAudit/ClassName.html deleted file mode 100644 index b1254106c..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/ClassName.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::ClassName - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::ClassName - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/class.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/class_name.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that Formula is used as superclass.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
DEPRECATED_CLASSES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[
-  GithubGistFormula
-  ScriptFileFormula
-  AmazonWebServicesFormula
-].freeze
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, parent_class_node, _body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'rubocops/class.rb', line 19
-
-def audit_formula(_node, _class_node, parent_class_node, _body_node)
-  parent_class = class_name(parent_class_node)
-  return unless DEPRECATED_CLASSES.include?(parent_class)
-
-  problem "#{parent_class} is deprecated, use Formula instead" do |corrector|
-    corrector.replace(parent_class_node.source_range, "Formula")
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Comments.html b/docs/RuboCop/Cop/FormulaAudit/Comments.html deleted file mode 100644 index 684b1a46c..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Comments.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Comments - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Comments - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/comments.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that template comments are removed.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, _body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'rubocops/lines.rb', line 46
-
-def audit_formula(_node, _class_node, _parent_class_node, _body_node)
-  audit_comments do |comment|
-    [
-      "# PLEASE REMOVE",
-      "# Documentation:",
-      "# if this fails, try separate make/make install steps",
-      "# The URL of the archive",
-      "## Naming --",
-      "# if your formula fails when building in parallel",
-      "# Remove unrecognized options if warned by configure",
-      '# system "cmake',
-    ].each do |template_comment|
-      next unless comment.include?(template_comment)
-
-      problem "Please remove default template comments"
-      break
-    end
-  end
-
-  audit_comments do |comment|
-    # Commented-out depends_on
-    next unless comment =~ /#\s*depends_on\s+(.+)\s*$/
-
-    problem "Commented-out dependency #{Regexp.last_match(1)}"
-  end
-
-  return if formula_tap != "homebrew-core"
-
-  # Citation and tag comments from third-party taps
-  audit_comments do |comment|
-    next if comment !~ /#\s*(cite(?=\s*\w+:)|doi(?=\s*['"])|tag(?=\s*['"]))/
-
-    problem "Formulae in homebrew/core should not use `#{Regexp.last_match(1)}` comments"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/ComponentsOrder.html b/docs/RuboCop/Cop/FormulaAudit/ComponentsOrder.html deleted file mode 100644 index c342034ba..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/ComponentsOrder.html +++ /dev/null @@ -1,1162 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::ComponentsOrder - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::ComponentsOrder - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/components_order.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/components_order.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks for correct order of components in formulae.

- -
    -
  • component_precedence_list has component hierarchy in a nested list -where each sub array contains components' details which are at same precedence level
  • -
- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'rubocops/components_order.rb', line 17
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  @present_components, @offensive_nodes = check_order(FORMULA_COMPONENT_PRECEDENCE_LIST, body_node)
-
-  component_problem @offensive_nodes[0], @offensive_nodes[1] if @offensive_nodes
-
-  component_precedence_list = [
-    [{ name: :depends_on, type: :method_call }],
-    [{ name: :resource, type: :block_call }],
-    [{ name: :patch, type: :method_call }, { name: :patch, type: :block_call }],
-  ]
-
-  head_blocks = find_blocks(body_node, :head)
-  head_blocks.each do |head_block|
-    check_block_component_order(FORMULA_COMPONENT_PRECEDENCE_LIST, head_block)
-  end
-
-  on_system_methods.each do |on_method|
-    on_method_blocks = find_blocks(body_node, on_method)
-    next if on_method_blocks.empty?
-
-    if on_method_blocks.length > 1
-      @offensive_node = on_method_blocks.second
-      problem "there can only be one `#{on_method}` block in a formula."
-    end
-
-    check_on_system_block_content(component_precedence_list, on_method_blocks.first)
-  end
-
-  resource_blocks = find_blocks(body_node, :resource)
-  resource_blocks.each do |resource_block|
-    check_block_component_order(FORMULA_COMPONENT_PRECEDENCE_LIST, resource_block)
-
-    on_system_blocks = {}
-
-    on_system_methods.each do |on_method|
-      on_system_blocks[on_method] = find_blocks(resource_block.body, on_method)
-    end
-
-    if on_system_blocks.empty?
-      # Found nothing. Try without .body as depending on the code,
-      # on_{system} might be in .body or not ...
-      on_system_methods.each do |on_method|
-        on_system_blocks[on_method] = find_blocks(resource_block, on_method)
-      end
-    end
-    next if on_system_blocks.empty?
-
-    @offensive_node = resource_block
-
-    on_system_bodies = T.let([], T::Array[[RuboCop::AST::BlockNode, RuboCop::AST::Node]])
-
-    on_system_blocks.each_value do |blocks|
-      blocks.each do |on_system_block|
-        on_system_body = on_system_block.body
-        branches = on_system_body.if_type? ? on_system_body.branches : [on_system_body]
-        on_system_bodies += branches.map { |branch| [on_system_block, branch] }
-      end
-    end
-
-    message = T.let(nil, T.nilable(String))
-    allowed_methods = [
-      [:url, :sha256],
-      [:url, :mirror, :sha256],
-      [:url, :version, :sha256],
-      [:url, :mirror, :version, :sha256],
-    ]
-    minimum_methods = allowed_methods.first.map { |m| "`#{m}`" }.to_sentence
-    maximum_methods = allowed_methods.last.map { |m| "`#{m}`" }.to_sentence
-
-    on_system_bodies.each do |on_system_block, on_system_body|
-      method_name = on_system_block.method_name
-      child_nodes = on_system_body.begin_type? ? on_system_body.child_nodes : [on_system_body]
-      if child_nodes.all? { |n| n.send_type? || n.block_type? || n.lvasgn_type? }
-        method_names = child_nodes.filter_map do |node|
-          next if node.lvasgn_type?
-          next if node.method_name == :patch
-          next if on_system_methods.include? node.method_name
-
-          node.method_name
-        end
-        next if method_names.empty? || allowed_methods.include?(method_names)
-      end
-      offending_node(on_system_block)
-      message = "`#{method_name}` blocks within `resource` blocks must contain at least " \
-                "#{minimum_methods} and at most #{maximum_methods} (in order)."
-      break
-    end
-
-    if message
-      problem message
-      next
-    end
-
-    on_system_blocks.each do |on_method, blocks|
-      if blocks.length > 1
-        problem "there can only be one `#{on_method}` block in a resource block."
-        next
-      end
-    end
-  end
-end
-
-
- -
-

- - #check_block_component_order(component_precedence_list, block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-121
-122
-123
-124
-
-
# File 'rubocops/components_order.rb', line 121
-
-def check_block_component_order(component_precedence_list, block)
-  @present_components, offensive_node = check_order(component_precedence_list, block.body)
-  component_problem(*offensive_node) if offensive_node
-end
-
-
- -
-

- - #check_on_system_block_content(component_precedence_list, on_system_block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-
-
# File 'rubocops/components_order.rb', line 126
-
-def check_on_system_block_content(component_precedence_list, on_system_block)
-  if on_system_block.body.block_type? && !on_system_methods.include?(on_system_block.body.method_name)
-    offending_node(on_system_block)
-    problem "Nest `#{on_system_block.method_name}` blocks inside `#{on_system_block.body.method_name}` " \
-            "blocks when there is only one inner block." do |corrector|
-      original_source = on_system_block.source.split("\n")
-      new_source = [original_source.second, original_source.first, *original_source.drop(2)]
-      corrector.replace(on_system_block.source_range, new_source.join("\n"))
-    end
-  end
-  on_system_allowed_methods = %w[
-    livecheck
-    keg_only
-    disable!
-    deprecate!
-    depends_on
-    conflicts_with
-    fails_with
-    resource
-    patch
-  ]
-  on_system_allowed_methods += on_system_methods.map(&:to_s)
-  _, offensive_node = check_order(component_precedence_list, on_system_block.body)
-  component_problem(*offensive_node) if offensive_node
-  child_nodes = on_system_block.body.begin_type? ? on_system_block.body.child_nodes : [on_system_block.body]
-  child_nodes.each do |child|
-    valid_node = depends_on_node?(child)
-    # Check for RuboCop::AST::SendNode and RuboCop::AST::BlockNode instances
-    # only, as we are checking the method_name for `patch`, `resource`, etc.
-    method_type = child.send_type? || child.block_type?
-    next unless method_type
-
-    valid_node ||= on_system_allowed_methods.include? child.method_name.to_s
-
-    @offensive_node = child
-    next if valid_node
-
-    problem "`#{on_system_block.method_name}` cannot include `#{child.method_name}`. " \
-            "Only #{on_system_allowed_methods.map { |m| "`#{m}`" }.to_sentence} are allowed."
-  end
-end
-
-
- -
-

- - #check_order(component_precedence_list, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-
-
# File 'rubocops/components_order.rb', line 199
-
-def check_order(component_precedence_list, body_node)
-  present_components = component_precedence_list.map do |components|
-    components.flat_map do |component|
-      case component[:type]
-      when :method_call
-        find_method_calls_by_name(body_node, component[:name]).to_a
-      when :block_call
-        find_blocks(body_node, component[:name]).to_a
-      when :method_definition
-        find_method_def(body_node, component[:name])
-      end
-    end.compact
-  end
-
-  # Check if each present_components is above rest of the present_components
-  offensive_nodes = T.let(nil, T.nilable(T::Array[RuboCop::AST::Node]))
-  present_components.take(present_components.size - 1).each_with_index do |preceding_component, p_idx|
-    next if preceding_component.empty?
-
-    present_components.drop(p_idx + 1).each do |succeeding_component|
-      next if succeeding_component.empty?
-
-      offensive_nodes = check_precedence(preceding_component, succeeding_component)
-      return [present_components, offensive_nodes] if offensive_nodes
-    end
-  end
-  nil
-end
-
-
- -
-

- - #component_problem(component1, component2) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Method to report and correct component precedence violations.

- - -
-
-
- - -
- - - - -
-
-
-
-229
-230
-231
-232
-233
-234
-235
-236
-237
-
-
# File 'rubocops/components_order.rb', line 229
-
-def component_problem(component1, component2)
-  return if tap_style_exception? :components_order_exceptions
-
-  problem "`#{format_component(component1)}` (line #{line_number(component1)}) " \
-          "should be put before `#{format_component(component2)}` " \
-          "(line #{line_number(component2)})" do |corrector|
-    reorder_components(corrector, component1, component2)
-  end
-end
-
-
- -
-

- - #depends_on_node?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/components_order.rbi', line 10
-
-def depends_on_node?(node, **kwargs, &block); end
-
-
- -
-

- - #get_state(node1) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns precedence index and component's index to properly reorder and group during autocorrect.

- - -
-
-
- - -
- - - - -
-
-
-
-193
-194
-195
-196
-197
-
-
# File 'rubocops/components_order.rb', line 193
-
-def get_state(node1)
-  @present_components.each_with_index do |comp, idx|
-    return [idx, comp.index(node1), comp] if comp.member?(node1)
-  end
-end
-
-
- -
-

- - #reorder_components(corrector, node1, node2) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Reorder two nodes in the source, using the corrector instance in autocorrect method. -Components of same type are grouped together when rewriting the source. -Linebreaks are introduced if components are of two different methods/blocks/multilines.

- - -
-
-
- - -
- - - - -
-
-
-
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-
-
# File 'rubocops/components_order.rb', line 171
-
-def reorder_components(corrector, node1, node2)
-  # order_idx : node1's index in component_precedence_list
-  # curr_p_idx: node1's index in preceding_comp_arr
-  # preceding_comp_arr: array containing components of same type
-  order_idx, curr_p_idx, preceding_comp_arr = get_state(node1)
-
-  # curr_p_idx.positive? means node1 needs to be grouped with its own kind
-  if curr_p_idx.positive?
-    node2 = preceding_comp_arr[curr_p_idx - 1]
-    indentation = " " * (start_column(node2) - line_start_column(node2))
-    line_breaks = node2.multiline? ? "\n\n" : "\n"
-    corrector.insert_after(node2.source_range, line_breaks + indentation + node1.source)
-  else
-    indentation = " " * (start_column(node2) - line_start_column(node2))
-    # No line breaks up to version_scheme, order_idx == 8
-    line_breaks = (order_idx > 8) ? "\n\n" : "\n"
-    corrector.insert_before(node2.source_range, node1.source + line_breaks + indentation)
-  end
-  corrector.remove(range_with_surrounding_space(range: node1.source_range, side: :left))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/ComponentsRedundancy.html b/docs/RuboCop/Cop/FormulaAudit/ComponentsRedundancy.html deleted file mode 100644 index a228598ae..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/ComponentsRedundancy.html +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::ComponentsRedundancy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::ComponentsRedundancy - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/components_redundancy.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks if redundant components are present and for other component errors.

- -
    -
  • url|checksum|mirror|version should be inside stable block
  • -
  • head and head do should not be simultaneously present
  • -
  • bottle :unneeded/:disable and bottle do should not be simultaneously present
  • -
  • stable do should not be present without a head spec
  • -
  • stable do should not be present with only url|checksum|mirror|version
  • -
  • head do should not be present with only url
  • -
- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
HEAD_MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"`head` and `head do` should not be simultaneously present"
- -
BOTTLE_MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"`bottle :modifier` and `bottle do` should not be simultaneously present"
- -
STABLE_MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"`stable do` should not be present without a `head` spec"
- -
STABLE_BLOCK_METHODS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:url, :sha256, :mirror, :version].freeze
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'rubocops/components_redundancy.rb', line 23
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  urls = find_method_calls_by_name(body_node, :url)
-
-  urls.each do |url|
-    url.arguments.each do |arg|
-      next if arg.class != RuboCop::AST::HashNode
-
-      url_args = arg.keys.each.map(&:value)
-      if method_called?(body_node, :sha256) && url_args.include?(:tag) && url_args.include?(:revision)
-        problem "Do not use both sha256 and tag/revision."
-      end
-    end
-  end
-
-  stable_block = find_block(body_node, :stable)
-  if stable_block
-    STABLE_BLOCK_METHODS.each do |method_name|
-      problem "`#{method_name}` should be put inside `stable` block" if method_called?(body_node, method_name)
-    end
-
-    unless stable_block.body.nil?
-      child_nodes = stable_block.body.begin_type? ? stable_block.body.child_nodes : [stable_block.body]
-      if child_nodes.all? { |n| n.send_type? && STABLE_BLOCK_METHODS.include?(n.method_name) }
-        problem "`stable do` should not be present with only #{STABLE_BLOCK_METHODS.join("/")}"
-      end
-    end
-  end
-
-  head_block = find_block(body_node, :head)
-  if head_block && !head_block.body.nil?
-    child_nodes = head_block.body.begin_type? ? head_block.body.child_nodes : [head_block.body]
-    if child_nodes.all? { |n| n.send_type? && n.method_name == :url }
-      problem "`head do` should not be present with only `url`"
-    end
-  end
-
-  problem HEAD_MSG if method_called?(body_node, :head) &&
-                      find_block(body_node, :head)
-
-  problem BOTTLE_MSG if method_called?(body_node, :bottle) &&
-                        find_block(body_node, :bottle)
-
-  return if method_called?(body_node, :head) ||
-            find_block(body_node, :head)
-
-  problem STABLE_MSG if stable_block
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Conflicts.html b/docs/RuboCop/Cop/FormulaAudit/Conflicts.html deleted file mode 100644 index 8ed3a9902..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Conflicts.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Conflicts - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Conflicts - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/conflicts.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits versioned formulae for conflicts_with.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Versioned formulae should not use `conflicts_with`. " \
-"Use `keg_only :versioned_formula` instead."
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'rubocops/conflicts.rb', line 16
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  find_method_calls_by_name(body_node, :conflicts_with).each do |conflicts_with_call|
-    next unless parameters(conflicts_with_call).last.respond_to? :values
-
-    reason = parameters(conflicts_with_call).last.values.first
-    offending_node(reason)
-    name = Regexp.new(@formula_name, Regexp::IGNORECASE)
-    reason_text = string_content(reason).sub(name, "")
-    first_word = reason_text.split.first
-
-    if reason_text.match?(/\A[A-Z]/)
-      problem "'#{first_word}' from the `conflicts_with` reason " \
-              "should be '#{first_word.downcase}'." do |corrector|
-        reason_text[0] = reason_text[0].downcase
-        corrector.replace(reason.source_range, "\"#{reason_text}\"")
-      end
-    end
-    next unless reason_text.end_with?(".")
-
-    problem "`conflicts_with` reason should not end with a period." do |corrector|
-      corrector.replace(reason.source_range, "\"#{reason_text.chop}\"")
-    end
-  end
-
-  return unless versioned_formula?
-
-  if !tap_style_exception?(:versioned_formulae_conflicts_allowlist) && method_called_ever?(body_node,
-                                                                                           :conflicts_with)
-    problem MSG do |corrector|
-      corrector.replace(@offensive_node.source_range, "keg_only :versioned_formula")
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/DependencyOrder.html b/docs/RuboCop/Cop/FormulaAudit/DependencyOrder.html deleted file mode 100644 index 27c82e539..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/DependencyOrder.html +++ /dev/null @@ -1,2112 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::DependencyOrder - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::DependencyOrder - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/dependency_order.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks for correct order of depends_on in formulae.

- -

precedence order: -build-time > test > normal > recommended > optional

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'rubocops/dependency_order.rb', line 16
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  check_dependency_nodes_order(body_node)
-  check_uses_from_macos_nodes_order(body_node)
-  ([:head, :stable] + on_system_methods).each do |block_name|
-    block = find_block(body_node, block_name)
-    next unless block
-
-    check_dependency_nodes_order(block.body)
-    check_uses_from_macos_nodes_order(block.body)
-  end
-end
-
-
- -
-

- - #build_with_dependency_name(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-156
-157
-158
-159
-160
-
-
# File 'rubocops/dependency_order.rb', line 156
-
-def build_with_dependency_name(node)
-  match_nodes = build_with_dependency_node(node)
-  match_nodes = match_nodes.to_a.compact
-  match_nodes.map { |n| string_content(n) } unless match_nodes.empty?
-end
-
-
- -
-

- - #build_with_dependency_node(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi', line 17
-
-def build_with_dependency_node(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #buildtime_dependency?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi', line 27
-
-def buildtime_dependency?(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #check_dependency_nodes_order(parent_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-
-
# File 'rubocops/dependency_order.rb', line 35
-
-def check_dependency_nodes_order(parent_node)
-  return if parent_node.nil?
-
-  dependency_nodes = parent_node.each_child_node.select { |x| depends_on_node?(x) }
-  ensure_dependency_order(dependency_nodes)
-end
-
-
- -
-

- - #check_uses_from_macos_nodes_order(parent_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-
-
# File 'rubocops/dependency_order.rb', line 28
-
-def check_uses_from_macos_nodes_order(parent_node)
-  return if parent_node.nil?
-
-  dependency_nodes = parent_node.each_child_node.select { |x| uses_from_macos_node?(x) }
-  ensure_dependency_order(dependency_nodes)
-end
-
-
- -
-

- - #dependency_name(dependency_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-162
-163
-164
-165
-
-
# File 'rubocops/dependency_order.rb', line 162
-
-def dependency_name(dependency_node)
-  match_node = dependency_name_node(dependency_node).to_a.first
-  string_content(match_node) if match_node
-end
-
-
- -
-

- - #dependency_name_node(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi', line 37
-
-def dependency_name_node(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #depends_on_node?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-40
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi', line 40
-
-def depends_on_node?(node, **kwargs, &block); end
-
-
- -
-

- - #ensure_dependency_order(nodes) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-47
-
-
# File 'rubocops/dependency_order.rb', line 42
-
-def ensure_dependency_order(nodes)
-  ordered = nodes.sort_by { |node| dependency_name(node).downcase }
-  ordered = sort_dependencies_by_type(ordered)
-  sort_conditional_dependencies!(ordered)
-  verify_order_in_source(ordered)
-end
-
-
- -
-

- - #insert_after!(arr, idx1, idx2) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-152
-153
-154
-
-
# File 'rubocops/dependency_order.rb', line 152
-
-def insert_after!(arr, idx1, idx2)
-  arr.insert(idx2+1, arr.delete_at(idx1))
-end
-
-
- -
-

- - #negate_normal_dependency?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi', line 50
-
-def negate_normal_dependency?(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #optional_dependency?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi', line 60
-
-def optional_dependency?(node, *pattern, **kwargs, &block); end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi', line 70
-
-def recommended_dependency?(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #sort_conditional_dependencies!(ordered) ⇒ Array<RuboCop::AST::Node> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

depends_on :apple if build.with? "foo" should always be defined - after depends_on :foo. -This method reorders the dependencies array according to the above rule.

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-
-
# File 'rubocops/dependency_order.rb', line 69
-
-def sort_conditional_dependencies!(ordered)
-  length = ordered.size
-  idx = 0
-  while idx < length
-    idx1 = T.let(nil, T.nilable(Integer))
-    idx2 = T.let(nil, T.nilable(Integer))
-    ordered.each_with_index do |dep, pos|
-      idx = pos+1
-      match_nodes = build_with_dependency_name(dep)
-      next if match_nodes.blank?
-
-      idx1 = pos
-      ordered.drop(idx1+1).each_with_index do |dep2, pos2|
-        next unless match_nodes.index(dependency_name(dep2))
-
-        idx2 = pos2 if idx2.nil? || pos2 > idx2
-      end
-      break if idx2
-    end
-    insert_after!(ordered, idx1, idx2 + T.must(idx1)) if idx2
-  end
-  ordered
-end
-
-
- -
-

- - #sort_dependencies_by_type(dependency_nodes) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Separate dependencies according to precedence order: -build-time > test > normal > recommended > optional

- - -
-
-
- - -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-
-
# File 'rubocops/dependency_order.rb', line 51
-
-def sort_dependencies_by_type(dependency_nodes)
-  unsorted_deps = dependency_nodes.to_a
-  ordered = []
-  ordered.concat(unsorted_deps.select { |dep| buildtime_dependency? dep })
-  unsorted_deps -= ordered
-  ordered.concat(unsorted_deps.select { |dep| test_dependency? dep })
-  unsorted_deps -= ordered
-  ordered.concat(unsorted_deps.reject { |dep| negate_normal_dependency? dep })
-  unsorted_deps -= ordered
-  ordered.concat(unsorted_deps.select { |dep| recommended_dependency? dep })
-  unsorted_deps -= ordered
-  ordered.concat(unsorted_deps.select { |dep| optional_dependency? dep })
-end
-
-
- -
-

- - #test_dependency?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-80
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi', line 80
-
-def test_dependency?(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #uses_from_macos_node?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-83
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/dependency_order.rbi', line 83
-
-def uses_from_macos_node?(node, **kwargs, &block); end
-
-
- -
-

- - #verify_order_in_source(ordered) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Verify actual order of sorted depends_on nodes in source code; -raise RuboCop problem otherwise.

- - -
-
-
- - -
- - - - -
-
-
-
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
-
# File 'rubocops/dependency_order.rb', line 95
-
-def verify_order_in_source(ordered)
-  ordered.each_with_index do |node_1, idx|
-    l1 = line_number(node_1)
-    l2 = T.let(nil, T.nilable(Integer))
-    node_2 = T.let(nil, T.nilable(RuboCop::AST::Node))
-    ordered.drop(idx + 1).each do |test_node|
-      l2 = line_number(test_node)
-      node_2 = test_node if l2 < l1
-    end
-    next unless node_2
-
-    offending_node(node_1)
-
-    problem "dependency \"#{dependency_name(node_1)}\" (line #{l1}) should be put before dependency " \
-            "\"#{dependency_name(node_2)}\" (line #{l2})" do |corrector|
-      indentation = " " * (start_column(node_2) - line_start_column(node_2))
-      line_breaks = "\n"
-      corrector.insert_before(node_2.source_range,
-                              node_1.source + line_breaks + indentation)
-      corrector.remove(range_with_surrounding_space(range: node_1.source_range, side: :left))
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/DeprecateDisableDate.html b/docs/RuboCop/Cop/FormulaAudit/DeprecateDisableDate.html deleted file mode 100644 index 15fe3132a..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/DeprecateDisableDate.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::DeprecateDisableDate - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::DeprecateDisableDate - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/deprecate_disable.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/deprecate_disable_date.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits deprecate! and disable! dates.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'rubocops/deprecate_disable.rb', line 13
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  [:deprecate!, :disable!].each do |method|
-    node = find_node_method_by_name(body_node, method)
-
-    next if node.nil?
-
-    date(node) do |date_node|
-      Date.iso8601(string_content(date_node))
-    rescue ArgumentError
-      fixed_date_string = Date.parse(string_content(date_node)).iso8601
-      offending_node(date_node)
-      problem "Use `#{fixed_date_string}` to comply with ISO 8601" do |corrector|
-        corrector.replace(date_node.source_range, "\"#{fixed_date_string}\"")
-      end
-    end
-  end
-end
-
-
- -
-

- - #date(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/deprecate_disable_date.rbi', line 17
-
-def date(node, *pattern, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/DeprecateDisableReason.html b/docs/RuboCop/Cop/FormulaAudit/DeprecateDisableReason.html deleted file mode 100644 index 16a395f86..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/DeprecateDisableReason.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::DeprecateDisableReason - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::DeprecateDisableReason - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/deprecate_disable.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/deprecate_disable_reason.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits deprecate! and disable! reasons.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PUNCTUATION_MARKS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[. ! ?].freeze
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'rubocops/deprecate_disable.rb', line 42
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  [:deprecate!, :disable!].each do |method|
-    node = find_node_method_by_name(body_node, method)
-
-    next if node.nil?
-
-    reason_found = T.let(false, T::Boolean)
-    reason(node) do |reason_node|
-      reason_found = true
-      next if reason_node.sym_type?
-
-      offending_node(reason_node)
-      reason_string = string_content(reason_node)
-
-      if reason_string.start_with?("it ")
-        problem "Do not start the reason with `it`" do |corrector|
-          corrector.replace(@offensive_node.source_range, "\"#{reason_string[3..]}\"")
-        end
-      end
-
-      if PUNCTUATION_MARKS.include?(reason_string[-1])
-        problem "Do not end the reason with a punctuation mark" do |corrector|
-          corrector.replace(@offensive_node.source_range, "\"#{reason_string.chop}\"")
-        end
-      end
-    end
-
-    next if reason_found
-
-    case method
-    when :deprecate!
-      problem 'Add a reason for deprecation: `deprecate! because: "..."`'
-    when :disable!
-      problem 'Add a reason for disabling: `disable! because: "..."`'
-    end
-  end
-end
-
-
- -
-

- - #reason(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/deprecate_disable_reason.rbi', line 17
-
-def reason(node, *pattern, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Desc.html b/docs/RuboCop/Cop/FormulaAudit/Desc.html deleted file mode 100644 index 6ebc5ea47..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Desc.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Desc - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Desc - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
DescHelper
-
- - - - - - -
-
Defined in:
-
rubocops/desc.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits desc in formulae. -See the DescHelper module for details of the checks.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from DescHelper

-

DescHelper::MAX_DESC_LENGTH, DescHelper::VALID_LOWERCASE_WORDS

- - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from DescHelper

-

#audit_desc, #desc_problem

- - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-
-
# File 'rubocops/desc.rb', line 16
-
-def audit_formula(_node, class_node, _parent_class_node, body_node)
-  @name = @formula_name
-  desc_call = find_node_method_by_name(body_node, :desc)
-  offending_node(class_node) if body_node.nil?
-  audit_desc(:formula, @name, desc_call)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Files.html b/docs/RuboCop/Cop/FormulaAudit/Files.html deleted file mode 100644 index 4aa37a41a..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Files.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Files - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Files - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/files.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that a formula's file permissions are correct.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(node, _class_node, _parent_class_node, _body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'rubocops/files.rb', line 11
-
-def audit_formula(node, _class_node, _parent_class_node, _body_node)
-  return unless file_path
-
-  # Codespaces routinely screws up all permissions so don't complain there.
-  return if ENV["CODESPACES"] || ENV["HOMEBREW_CODESPACES"]
-
-  offending_node(node)
-  actual_mode = File.stat(file_path).mode
-  # Check that the file is world-readable.
-  if actual_mode & 0444 != 0444
-    problem format("Incorrect file permissions (%03<actual>o): chmod %<wanted>s %<path>s",
-                   actual: actual_mode & 0777,
-                   wanted: "a+r",
-                   path:   file_path)
-  end
-  # Check that the file is user-writeable.
-  if actual_mode & 0200 != 0200
-    problem format("Incorrect file permissions (%03<actual>o): chmod %<wanted>s %<path>s",
-                   actual: actual_mode & 0777,
-                   wanted: "u+w",
-                   path:   file_path)
-  end
-  # Check that the file is *not* other-writeable.
-  return if actual_mode & 0002 != 002
-
-  problem format("Incorrect file permissions (%03<actual>o): chmod %<wanted>s %<path>s",
-                 actual: actual_mode & 0777,
-                 wanted: "o-w",
-                 path:   file_path)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/GenerateCompletionsDSL.html b/docs/RuboCop/Cop/FormulaAudit/GenerateCompletionsDSL.html deleted file mode 100644 index 61d33d9b5..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/GenerateCompletionsDSL.html +++ /dev/null @@ -1,606 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::GenerateCompletionsDSL - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::GenerateCompletionsDSL - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/generate_completions_dsl.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that the generate_completions_from_executable DSL is used.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-
-
# File 'rubocops/lines.rb', line 441
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  install = find_method_def(body_node, :install)
-  return if install.blank?
-
-  correctable_shell_completion_node(install) do |node, shell, base_name, executable, subcmd, shell_parameter|
-    # generate_completions_from_executable only applicable if shell is passed
-    next unless shell_parameter.match?(/(bash|zsh|fish)/)
-
-    base_name = base_name.delete_prefix("_").delete_suffix(".fish")
-    shell = shell.to_s.delete_suffix("_completion").to_sym
-    shell_parameter_stripped = shell_parameter
-                               .delete_suffix("bash")
-                               .delete_suffix("zsh")
-                               .delete_suffix("fish")
-    shell_parameter_format = if shell_parameter_stripped.empty?
-      nil
-    elsif shell_parameter_stripped == "--"
-      :flag
-    elsif shell_parameter_stripped == "--shell="
-      :arg
-    else
-      shell_parameter_stripped
-    end
-
-    replacement_args = %w[]
-    replacement_args << executable.source
-    replacement_args << subcmd.source
-    replacement_args << "base_name: \"#{base_name}\"" if base_name != @formula_name
-    replacement_args << "shells: [:#{shell}]"
-    unless shell_parameter_format.nil?
-      replacement_args << "shell_parameter_format: #{shell_parameter_format.inspect}"
-    end
-
-    offending_node(node)
-    replacement = "generate_completions_from_executable(#{replacement_args.join(", ")})"
-
-    problem "Use `#{replacement}` instead of `#{@offensive_node.source}`." do |corrector|
-      corrector.replace(@offensive_node.source_range, replacement)
-    end
-  end
-
-  shell_completion_node(install) do |node|
-    next if node.source.include?("<<~") # skip heredoc completion scripts
-    next if node.source.match?(/{.*=>.*}/) # skip commands needing custom ENV variables
-
-    offending_node(node)
-    problem "Use `generate_completions_from_executable` DSL instead of `#{@offensive_node.source}`."
-  end
-end
-
-
- -
-

- - #correctable_shell_completion_node(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/generate_completions_dsl.rbi', line 17
-
-def correctable_shell_completion_node(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #shell_completion_node(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/generate_completions_dsl.rbi', line 27
-
-def shell_completion_node(node, *pattern, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/GitUrls.html b/docs/RuboCop/Cop/FormulaAudit/GitUrls.html deleted file mode 100644 index 4c237247b..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/GitUrls.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::GitUrls - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::GitUrls - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/urls.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/git_urls.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that git URLs have a revision.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-
-
# File 'rubocops/urls.rb', line 294
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-  return if formula_tap != "homebrew-core"
-
-  find_method_calls_by_name(body_node, :url).each do |url|
-    next unless string_content(parameters(url).first).match?(/\.git$/)
-    next if url_has_revision?(parameters(url).last)
-
-    offending_node(url)
-    problem "Formulae in homebrew/core should specify a revision for git URLs"
-  end
-end
-
-
- -
-

- - #url_has_revision?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/git_urls.rbi', line 10
-
-def url_has_revision?(node, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Homepage.html b/docs/RuboCop/Cop/FormulaAudit/Homepage.html deleted file mode 100644 index beb555d6f..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Homepage.html +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Homepage - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Homepage - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/homepage.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits the homepage URL in formulae.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-
-
# File 'rubocops/homepage.rb', line 13
-
-def audit_formula(_node, class_node, _parent_class_node, body_node)
-  homepage_node = find_node_method_by_name(body_node, :homepage)
-
-  if homepage_node.nil?
-    offending_node(class_node) if body_node.nil?
-    problem "Formula should have a homepage."
-    return
-  end
-
-  homepage_parameter_node = parameters(homepage_node).first
-  offending_node(homepage_parameter_node)
-  homepage = string_content(homepage_parameter_node)
-
-  problem "Formula should have a homepage." if homepage.empty?
-
-  problem "The homepage should start with http or https." unless homepage.match?(%r{^https?://})
-
-  case homepage
-  # Freedesktop is complicated to handle - It has SSL/TLS, but only on certain subdomains.
-  # To enable https Freedesktop change the URL from http://project.freedesktop.org/wiki to
-  # https://wiki.freedesktop.org/project_name.
-  # "Software" is redirected to https://wiki.freedesktop.org/www/Software/project_name
-  when %r{^http://((?:www|nice|libopenraw|liboil|telepathy|xorg)\.)?freedesktop\.org/(?:wiki/)?}
-    if homepage.include?("Software")
-      problem "Freedesktop homepages should be styled " \
-              "`https://wiki.freedesktop.org/www/Software/project_name`"
-    else
-      problem "Freedesktop homepages should be styled `https://wiki.freedesktop.org/project_name`"
-    end
-
-  # Google Code homepages should end in a slash
-  when %r{^https?://code\.google\.com/p/[^/]+[^/]$}
-    problem "Google Code homepages should end with a slash" do |corrector|
-      corrector.replace(homepage_parameter_node.source_range, "\"#{homepage}/\"")
-    end
-
-  when %r{^http://([^/]*)\.(sf|sourceforge)\.net(/|$)}
-    fixed = "https://#{Regexp.last_match(1)}.sourceforge.io/"
-    problem "Sourceforge homepages should be `#{fixed}`" do |corrector|
-      corrector.replace(homepage_parameter_node.source_range, "\"#{fixed}\"")
-    end
-
-  when /readthedocs\.org/
-    fixed = homepage.sub("readthedocs.org", "readthedocs.io")
-    problem "Readthedocs homepages should be `#{fixed}`" do |corrector|
-      corrector.replace(homepage_parameter_node.source_range, "\"#{fixed}\"")
-    end
-
-  when %r{^https://github.com.*\.git$}
-    problem "GitHub homepages should not end with .git" do |corrector|
-      corrector.replace(homepage_parameter_node.source_range, "\"#{homepage.delete_suffix(".git")}\"")
-    end
-
-  # People will run into mixed content sometimes, but we should enforce and then add
-  # exemptions as they are discovered. Treat mixed content on homepages as a bug.
-  # Justify each exemptions with a code comment so we can keep track here.
-  #
-  # Compact the above into this list as we're able to remove detailed notations, etc over time.
-  when
-       # Check for `http://` GitHub homepage URLs, `https://` is preferred.
-       # NOTE: Only check homepages that are repository pages, not `*.github.com` hosts.
-       %r{^http://github\.com/},
-       %r{^http://[^/]*\.github\.io/},
-
-       # Savannah has full SSL/TLS support but no auto-redirect.
-       # Doesn't apply to the download URLs, only the homepage.
-       %r{^http://savannah\.nongnu\.org/},
-
-       %r{^http://[^/]*\.sourceforge\.io/},
-       # There's an auto-redirect here, but this mistake is incredibly common too.
-       # Only applies to the homepage and subdomains for now, not the FTP URLs.
-       %r{^http://((?:build|cloud|developer|download|extensions|git|
-                       glade|help|library|live|nagios|news|people|
-                       projects|rt|static|wiki|www)\.)?gnome\.org}x,
-       %r{^http://[^/]*\.apache\.org},
-       %r{^http://packages\.debian\.org},
-       %r{^http://wiki\.freedesktop\.org/},
-       %r{^http://((?:www)\.)?gnupg\.org/},
-       %r{^http://ietf\.org},
-       %r{^http://[^/.]+\.ietf\.org},
-       %r{^http://[^/.]+\.tools\.ietf\.org},
-       %r{^http://www\.gnu\.org/},
-       %r{^http://code\.google\.com/},
-       %r{^http://bitbucket\.org/},
-       %r{^http://(?:[^/]*\.)?archive\.org}
-    problem "Please use https:// for #{homepage}" do |corrector|
-      corrector.replace(homepage_parameter_node.source_range, "\"#{homepage.sub("http", "https")}\"")
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/KegOnly.html b/docs/RuboCop/Cop/FormulaAudit/KegOnly.html deleted file mode 100644 index 81bf3b081..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/KegOnly.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::KegOnly - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::KegOnly - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/keg_only.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that a keg_only reason has the correct format.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'rubocops/keg_only.rb', line 13
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  keg_only_node = find_node_method_by_name(body_node, :keg_only)
-  return unless keg_only_node
-
-  allowlist = %w[
-    Apple
-    macOS
-    OS
-    Homebrew
-    Xcode
-    GPG
-    GNOME
-    BSD
-    Firefox
-  ].freeze
-
-  reason = parameters(keg_only_node).first
-  offending_node(reason)
-  name = Regexp.new(@formula_name, Regexp::IGNORECASE)
-  reason = string_content(reason).sub(name, "")
-  first_word = reason.split.first
-
-  if /\A[A-Z]/.match?(reason) && !reason.start_with?(*allowlist)
-    problem "'#{first_word}' from the `keg_only` reason should be '#{first_word.downcase}'." do |corrector|
-      reason[0] = reason[0].downcase
-      corrector.replace(@offensive_node.source_range, "\"#{reason}\"")
-    end
-  end
-
-  return unless reason.end_with?(".")
-
-  problem "`keg_only` reason should not end with a period." do |corrector|
-    corrector.replace(@offensive_node.source_range, "\"#{reason.chop}\"")
-  end
-end
-
-
- -
-

- - #autocorrect(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'rubocops/keg_only.rb', line 49
-
-def autocorrect(node)
-  lambda do |corrector|
-    reason = string_content(node)
-    reason[0] = reason[0].downcase
-    reason = reason.delete_suffix(".")
-    corrector.replace(node.source_range, "\"#{reason}\"")
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/LicenseArrays.html b/docs/RuboCop/Cop/FormulaAudit/LicenseArrays.html deleted file mode 100644 index bc09c93a7..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/LicenseArrays.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::LicenseArrays - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::LicenseArrays - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/license_arrays.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that license has the correct format.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-
-
# File 'rubocops/lines.rb', line 305
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  license_node = find_node_method_by_name(body_node, :license)
-  return unless license_node
-
-  license = parameters(license_node).first
-  return unless license.array_type?
-
-  problem "Use `license any_of: #{license.source}` instead of `license #{license.source}`" do |corrector|
-    corrector.replace(license_node.source_range, "license any_of: #{parameters(license_node).first.source}")
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Licenses.html b/docs/RuboCop/Cop/FormulaAudit/Licenses.html deleted file mode 100644 index 05d55fa68..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Licenses.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Licenses - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Licenses - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/licenses.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that nested license declarations are split onto multiple lines.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-
-
# File 'rubocops/lines.rb', line 322
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  license_node = find_node_method_by_name(body_node, :license)
-  return unless license_node
-  return if license_node.source.include?("\n")
-
-  parameters(license_node).first.each_descendant(:hash).each do |license_hash|
-    next if license_exception? license_hash
-
-    problem "Split nested license declarations onto multiple lines"
-  end
-end
-
-
- -
-

- - #license_exception?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/licenses.rbi', line 10
-
-def license_exception?(node, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Lines.html b/docs/RuboCop/Cop/FormulaAudit/Lines.html deleted file mode 100644 index f69e7832f..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Lines.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Lines - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Lines - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/lines.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks for various miscellaneous Homebrew coding styles.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, _body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'rubocops/lines.rb', line 13
-
-def audit_formula(_node, _class_node, _parent_class_node, _body_node)
-  [:automake, :ant, :autoconf, :emacs, :expat, :libtool, :mysql, :perl,
-   :postgresql, :python, :python3, :rbenv, :ruby].each do |dependency|
-    next unless depends_on?(dependency)
-
-    problem ":#{dependency} is deprecated. Usage should be \"#{dependency}\"."
-  end
-
-  { apr: "apr-util", fortran: "gcc", gpg: "gnupg", hg: "mercurial",
-    mpi: "open-mpi", python2: "python" }.each do |requirement, dependency|
-    next unless depends_on?(requirement)
-
-    problem ":#{requirement} is deprecated. Usage should be \"#{dependency}\"."
-  end
-
-  problem ":tex is deprecated." if depends_on?(:tex)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexCaseInsensitive.html b/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexCaseInsensitive.html deleted file mode 100644 index 16fd626fa..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexCaseInsensitive.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::LivecheckRegexCaseInsensitive - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::LivecheckRegexCaseInsensitive - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/livecheck.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that the regex provided to livecheck is case-insensitive, -unless sensitivity is explicitly required for proper matching.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Regexes should be case-insensitive unless sensitivity is explicitly required for proper matching."
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-
-
# File 'rubocops/livecheck.rb', line 202
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if tap_style_exception? :regex_case_sensitive_allowlist
-
-  livecheck_node = find_block(body_node, :livecheck)
-  return if livecheck_node.blank?
-
-  skip = find_every_method_call_by_name(livecheck_node, :skip).first.present?
-  return if skip.present?
-
-  livecheck_regex_node = find_every_method_call_by_name(livecheck_node, :regex).first
-  return if livecheck_regex_node.blank?
-
-  regex_node = livecheck_regex_node.descendants.first
-  options_node = regex_node.regopt
-  return if options_node.source.include?("i")
-
-  offending_node(regex_node)
-  problem MSG do |corrector|
-    node = regex_node.regopt
-    corrector.replace(node.source_range, "i#{node.source}".chars.sort.join)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexExtension.html b/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexExtension.html deleted file mode 100644 index 06c793a5e..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexExtension.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::LivecheckRegexExtension - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::LivecheckRegexExtension - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/livecheck.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that the pattern provided to livecheck's regex uses \.t instead of -\.tgz, \.tar.gz and variants.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
TAR_PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/\\?\.t(ar|(g|l|x)z$|[bz2]{2,4}$)(\\?\.((g|l|x)z)|[bz2]{2,4}|Z)?$/i
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-
-
# File 'rubocops/livecheck.rb', line 147
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  livecheck_node = find_block(body_node, :livecheck)
-  return if livecheck_node.blank?
-
-  skip = find_every_method_call_by_name(livecheck_node, :skip).first.present?
-  return if skip.present?
-
-  livecheck_regex_node = find_every_method_call_by_name(livecheck_node, :regex).first
-  return if livecheck_regex_node.blank?
-
-  regex_node = livecheck_regex_node.descendants.first
-  pattern = string_content(find_strings(regex_node).first)
-  match = pattern.match(TAR_PATTERN)
-  return if match.blank?
-
-  offending_node(regex_node)
-  problem "Use `\\.t` instead of `#{match}`" do |corrector|
-    node = find_strings(regex_node).first
-    correct = node.source.gsub(TAR_PATTERN, "\\.t")
-    corrector.replace(node.source_range, correct)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexIfPageMatch.html b/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexIfPageMatch.html deleted file mode 100644 index 93bc97f0c..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexIfPageMatch.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::LivecheckRegexIfPageMatch - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::LivecheckRegexIfPageMatch - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/livecheck.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that a regex is provided when strategy :page_match is specified -in the livecheck block.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-
-
# File 'rubocops/livecheck.rb', line 174
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  livecheck_node = find_block(body_node, :livecheck)
-  return if livecheck_node.blank?
-
-  skip = find_every_method_call_by_name(livecheck_node, :skip).first.present?
-  return if skip.present?
-
-  livecheck_strategy_node = find_every_method_call_by_name(livecheck_node, :strategy).first
-  return if livecheck_strategy_node.blank?
-
-  strategy = livecheck_strategy_node.descendants.first.source
-  return if strategy != ":page_match"
-
-  livecheck_regex_node = find_every_method_call_by_name(livecheck_node, :regex).first
-  return if livecheck_regex_node.present?
-
-  offending_node(livecheck_node)
-  problem "A `regex` is required if `strategy :page_match` is present."
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexParentheses.html b/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexParentheses.html deleted file mode 100644 index 25e2b350d..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/LivecheckRegexParentheses.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::LivecheckRegexParentheses - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::LivecheckRegexParentheses - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/livecheck.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that the regex call in the livecheck block uses parentheses.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-
-
# File 'rubocops/livecheck.rb', line 120
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  livecheck_node = find_block(body_node, :livecheck)
-  return if livecheck_node.blank?
-
-  skip = find_every_method_call_by_name(livecheck_node, :skip).first.present?
-  return if skip.present?
-
-  livecheck_regex_node = find_every_method_call_by_name(livecheck_node, :regex).first
-  return if livecheck_regex_node.blank?
-
-  return if parentheses?(livecheck_regex_node)
-
-  offending_node(livecheck_regex_node)
-  problem "The `regex` call should always use parentheses." do |corrector|
-    pattern = livecheck_regex_node.source.split[1..].join
-    corrector.replace(livecheck_regex_node.source_range, "regex(#{pattern})")
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/LivecheckSkip.html b/docs/RuboCop/Cop/FormulaAudit/LivecheckSkip.html deleted file mode 100644 index a45e78262..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/LivecheckSkip.html +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::LivecheckSkip - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::LivecheckSkip - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/livecheck.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that no other livecheck information is provided for -skipped formulae.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'rubocops/livecheck.rb', line 14
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  livecheck_node = find_block(body_node, :livecheck)
-  return if livecheck_node.blank?
-
-  skip = find_every_method_call_by_name(livecheck_node, :skip).first
-  return if skip.blank?
-
-  return if find_every_method_call_by_name(livecheck_node).length < 3
-
-  offending_node(livecheck_node)
-  problem "Skipped formulae must not contain other livecheck information." do |corrector|
-    skip = find_every_method_call_by_name(livecheck_node, :skip).first
-    skip = find_strings(skip).first
-    skip = string_content(skip) if skip.present?
-    corrector.replace(
-      livecheck_node.source_range,
-      <<~EOS.strip,
-        livecheck do
-            skip#{" \"#{skip}\"" if skip.present?}
-          end
-      EOS
-    )
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/LivecheckUrlProvided.html b/docs/RuboCop/Cop/FormulaAudit/LivecheckUrlProvided.html deleted file mode 100644 index 87212eb8f..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/LivecheckUrlProvided.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::LivecheckUrlProvided - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::LivecheckUrlProvided - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/livecheck.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that a url is specified in the livecheck block.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'rubocops/livecheck.rb', line 42
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  livecheck_node = find_block(body_node, :livecheck)
-  return unless livecheck_node
-
-  url_node = find_every_method_call_by_name(livecheck_node, :url).first
-  return if url_node
-
-  # A regex and/or strategy is specific to a particular URL, so we
-  # should require an explicit URL.
-  regex_node = find_every_method_call_by_name(livecheck_node, :regex).first
-  strategy_node = find_every_method_call_by_name(livecheck_node, :strategy).first
-  return if !regex_node && !strategy_node
-
-  offending_node(livecheck_node)
-  problem "A `url` should be provided when `regex` or `strategy` are used."
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/LivecheckUrlSymbol.html b/docs/RuboCop/Cop/FormulaAudit/LivecheckUrlSymbol.html deleted file mode 100644 index 553eb3e47..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/LivecheckUrlSymbol.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::LivecheckUrlSymbol - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::LivecheckUrlSymbol - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/livecheck.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that a supported symbol (head, stable,homepage) -is used when the livecheckurl` is identical to one of these formula URLs.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-
-
# File 'rubocops/livecheck.rb', line 65
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  livecheck_node = find_block(body_node, :livecheck)
-  return if livecheck_node.blank?
-
-  skip = find_every_method_call_by_name(livecheck_node, :skip).first.present?
-  return if skip.present?
-
-  livecheck_url_node = find_every_method_call_by_name(livecheck_node, :url).first
-  livecheck_url = find_strings(livecheck_url_node).first
-  return if livecheck_url.blank?
-
-  livecheck_url = string_content(livecheck_url)
-
-  head = find_every_method_call_by_name(body_node, :head).first
-  head_url = find_strings(head).first
-
-  if head.present? && head_url.blank?
-    head = find_every_method_call_by_name(head, :url).first
-    head_url = find_strings(head).first
-  end
-
-  head_url = string_content(head_url) if head_url.present?
-
-  stable = find_every_method_call_by_name(body_node, :url).first
-  stable_url = find_strings(stable).first
-
-  if stable_url.blank?
-    stable = find_every_method_call_by_name(body_node, :stable).first
-    stable = find_every_method_call_by_name(stable, :url).first
-    stable_url = find_strings(stable).first
-  end
-
-  stable_url = string_content(stable_url) if stable_url.present?
-
-  homepage = find_every_method_call_by_name(body_node, :homepage).first
-  homepage_url = string_content(find_strings(homepage).first) if homepage.present?
-
-  formula_urls = { head: head_url, stable: stable_url, homepage: homepage_url }.compact
-
-  formula_urls.each do |symbol, url|
-    next if url != livecheck_url && url != "#{livecheck_url}/" && "#{url}/" != livecheck_url
-
-    offending_node(livecheck_url_node)
-    problem "Use `url :#{symbol}`" do |corrector|
-      corrector.replace(livecheck_url_node.source_range, "url :#{symbol}")
-    end
-    break
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/MacOSOnLinux.html b/docs/RuboCop/Cop/FormulaAudit/MacOSOnLinux.html deleted file mode 100644 index 8c7d21728..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/MacOSOnLinux.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::MacOSOnLinux - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::MacOSOnLinux - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - -
-
Includes:
-
OnSystemConditionalsHelper
-
- - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/mac_os_on_linux.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure the MacOS module is not used in Linux-facing formula code

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
ON_MACOS_BLOCKS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:macos, *MACOS_VERSION_OPTIONS].map { |os| :"on_#{os}" }.freeze
- -
- - - - - - -

Constants included - from OnSystemConditionalsHelper

-

OnSystemConditionalsHelper::ARCH_OPTIONS, OnSystemConditionalsHelper::BASE_OS_OPTIONS, OnSystemConditionalsHelper::MACOS_MODULE_NAMES, OnSystemConditionalsHelper::MACOS_VERSION_CONDITIONALS, OnSystemConditionalsHelper::MACOS_VERSION_OPTIONS, OnSystemConditionalsHelper::ON_SYSTEM_OPTIONS

- - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from OnSystemConditionalsHelper

-

#audit_arch_conditionals, #audit_base_os_conditionals, #audit_macos_references, #audit_macos_version_conditionals, #audit_on_system_blocks, #hardware_cpu_search, #if_arch_node_search, #if_base_os_node_search, #if_macos_version_node_search, #macos_version_comparison_search, #on_macos_version_method_call, #on_system_method_call

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-430
-431
-432
-433
-434
-
-
# File 'rubocops/lines.rb', line 430
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  audit_macos_references(body_node,
-                         allowed_methods: OnSystemConditionals::NO_ON_SYSTEM_METHOD_NAMES,
-                         allowed_blocks:  OnSystemConditionals::NO_ON_SYSTEM_BLOCK_NAMES + ON_MACOS_BLOCKS)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Miscellaneous.html b/docs/RuboCop/Cop/FormulaAudit/Miscellaneous.html deleted file mode 100644 index 609a30d1e..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Miscellaneous.html +++ /dev/null @@ -1,1390 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Miscellaneous - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Miscellaneous - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/miscellaneous.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks for other miscellaneous style violations.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-592
-593
-594
-595
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-638
-639
-640
-641
-642
-643
-644
-645
-646
-647
-648
-649
-650
-651
-652
-653
-654
-655
-656
-657
-658
-659
-660
-661
-662
-663
-664
-665
-666
-667
-668
-669
-670
-671
-672
-673
-674
-675
-676
-677
-678
-679
-680
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-700
-701
-702
-703
-704
-705
-706
-707
-708
-709
-710
-711
-712
-713
-714
-715
-716
-717
-718
-719
-720
-721
-722
-723
-724
-725
-726
-727
-728
-729
-730
-731
-732
-733
-734
-735
-736
-737
-738
-739
-740
-741
-742
-743
-744
-745
-746
-747
-748
-749
-750
-751
-752
-753
-754
-755
-756
-757
-758
-759
-760
-761
-762
-763
-764
-765
-766
-767
-768
-769
-770
-771
-772
-773
-774
-775
-776
-777
-778
-779
-780
-781
-782
-783
-784
-785
-786
-787
-788
-789
-790
-791
-792
-793
-794
-795
-796
-797
-798
-799
-800
-801
-802
-803
-804
-805
-806
-807
-808
-809
-810
-
-
# File 'rubocops/lines.rb', line 580
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  # FileUtils is included in Formula
-  # encfs modifies a file with this name, so check for some leading characters
-  find_instance_method_call(body_node, "FileUtils", nil) do |method_node|
-    problem "Don't need 'FileUtils.' before #{method_node.method_name}"
-  end
-
-  # Check for long inreplace block vars
-  find_all_blocks(body_node, :inreplace) do |node|
-    block_arg = node.arguments.children.first
-    next if block_arg.source.size <= 1
-
-    problem "\"inreplace <filenames> do |s|\" is preferred over \"|#{block_arg.source}|\"."
-  end
-
-  [:rebuild, :version_scheme].each do |method_name|
-    find_method_with_args(body_node, method_name, 0) do
-      problem "'#{method_name} 0' should be removed"
-    end
-  end
-
-  find_instance_call(body_node, "ARGV") do |_method_node|
-    problem "Use build instead of ARGV to check options"
-  end
-
-  find_instance_method_call(body_node, :man, :+) do |method|
-    next unless (match = regex_match_group(parameters(method).first, /^man[1-8]$/))
-
-    problem "\"#{method.source}\" should be \"#{match[0]}\""
-  end
-
-  # Avoid hard-coding compilers
-  find_every_method_call_by_name(body_node, :system).each do |method|
-    next if @formula_name == "bazel" # TODO: Remove shim bypass in bazel.
-
-    param = parameters(method).first
-    if (match = regex_match_group(param, %r{^(/usr/bin/)?(gcc|clang|cc|c[89]9)(\s|$)}))
-      problem "Use \"\#{ENV.cc}\" instead of hard-coding \"#{match[2]}\""
-    elsif (match = regex_match_group(param, %r{^(/usr/bin/)?((g|clang|c)\+\+)(\s|$)}))
-      problem "Use \"\#{ENV.cxx}\" instead of hard-coding \"#{match[2]}\""
-    end
-  end
-
-  find_instance_method_call(body_node, "ENV", :[]=) do |method|
-    next if @formula_name == "bazel" # TODO: Remove shim bypass in bazel.
-
-    param = parameters(method)[1]
-    if (match = regex_match_group(param, %r{^(/usr/bin/)?(gcc|clang|cc|c[89]9)(\s|$)}))
-      problem "Use \"\#{ENV.cc}\" instead of hard-coding \"#{match[2]}\""
-    elsif (match = regex_match_group(param, %r{^(/usr/bin/)?((g|clang|c)\+\+)(\s|$)}))
-      problem "Use \"\#{ENV.cxx}\" instead of hard-coding \"#{match[2]}\""
-    end
-  end
-
-  # Prefer formula path shortcuts in strings
-  formula_path_strings(body_node, :share) do |p|
-    next unless (match = regex_match_group(p, %r{^(/(man))/?}))
-
-    problem "\"\#{share}#{match[1]}\" should be \"\#{#{match[2]}}\""
-  end
-
-  formula_path_strings(body_node, :prefix) do |p|
-    if (match = regex_match_group(p, %r{^(/share/(info|man))$}))
-      problem ['"#', "{prefix}", match[1], '" should be "#{', match[2], '}"'].join
-    end
-    if (match = regex_match_group(p, %r{^((/share/man/)(man[1-8]))}))
-      problem ['"#', "{prefix}", match[1], '" should be "#{', match[3], '}"'].join
-    end
-    if (match = regex_match_group(p, %r{^(/(bin|include|libexec|lib|sbin|share|Frameworks))}i))
-      problem ['"#', "{prefix}", match[1], '" should be "#{', match[2].downcase, '}"'].join
-    end
-  end
-
-  find_every_method_call_by_name(body_node, :depends_on).each do |method|
-    key, value = destructure_hash(parameters(method).first)
-    next if key.nil? || value.nil?
-    next unless (match = regex_match_group(value, /^(lua|perl|python|ruby)(\d*)/))
-
-    problem "#{match[1]} modules should be vendored rather than use deprecated `#{method.source}`"
-  end
-
-  find_every_method_call_by_name(body_node, :system).each do |method|
-    next unless (match = regex_match_group(parameters(method).first, /^(env|export)(\s+)?/))
-
-    problem "Use ENV instead of invoking '#{match[1]}' to modify the environment"
-  end
-
-  find_every_method_call_by_name(body_node, :depends_on).each do |method|
-    param = parameters(method).first
-    dep, option_child_nodes = hash_dep(param)
-    next if dep.nil? || option_child_nodes.empty?
-
-    option_child_nodes.each do |option|
-      find_strings(option).each do |dependency|
-        next unless (match = regex_match_group(dependency, /(with(out)?-\w+|c\+\+11)/))
-
-        problem "Dependency #{string_content(dep)} should not use option #{match[0]}"
-      end
-    end
-  end
-
-  find_instance_method_call(body_node, :version, :==) do |method|
-    next unless parameters_passed?(method, ["HEAD"])
-
-    problem "Use 'build.head?' instead of inspecting 'version'"
-  end
-
-  find_instance_method_call(body_node, "ARGV", :include?) do |method|
-    next unless parameters_passed?(method, ["--HEAD"])
-
-    problem "Use \"if build.head?\" instead"
-  end
-
-  find_const(body_node, "MACOS_VERSION") do
-    problem "Use MacOS.version instead of MACOS_VERSION"
-  end
-
-  find_const(body_node, "MACOS_FULL_VERSION") do
-    problem "Use MacOS.full_version instead of MACOS_FULL_VERSION"
-  end
-
-  conditional_dependencies(body_node) do |node, method, param, dep_node|
-    dep = string_content(dep_node)
-    if node.if?
-      if (method == :include? && regex_match_group(param, /^with-#{dep}$/)) ||
-         (method == :with? && regex_match_group(param, /^#{dep}$/))
-        offending_node(dep_node.parent)
-        problem "Replace #{node.source} with #{dep_node.parent.source} => :optional"
-      end
-    elsif node.unless?
-      if (method == :include? && regex_match_group(param, /^without-#{dep}$/)) ||
-         (method == :without? && regex_match_group(param, /^#{dep}$/))
-        offending_node(dep_node.parent)
-        problem "Replace #{node.source} with #{dep_node.parent.source} => :recommended"
-      end
-    end
-  end
-
-  find_method_with_args(body_node, :fails_with, :llvm) do
-    problem "'fails_with :llvm' is now a no-op so should be removed"
-  end
-
-  find_method_with_args(body_node, :needs, :openmp) do
-    problem "'needs :openmp' should be replaced with 'depends_on \"gcc\"'"
-  end
-
-  find_method_with_args(body_node, :system, /^(otool|install_name_tool|lipo)/) do
-    problem "Use ruby-macho instead of calling #{@offensive_node.source}"
-  end
-
-  find_every_method_call_by_name(body_node, :system).each do |method_node|
-    # Skip Kibana: npm cache edge (see formula for more details)
-    next if @formula_name.match?(/^kibana(@\d[\d.]*)?$/)
-
-    first_param, second_param = parameters(method_node)
-    next if !node_equals?(first_param, "npm") ||
-            !node_equals?(second_param, "install")
-
-    offending_node(method_node)
-    problem "Use Language::Node for npm install args" unless languageNodeModule?(method_node)
-  end
-
-  problem "Use new-style test definitions (test do)" if find_method_def(body_node, :test)
-
-  find_method_with_args(body_node, :skip_clean, :all) do
-    problem "`skip_clean :all` is deprecated; brew no longer strips symbols. " \
-            "Pass explicit paths to prevent Homebrew from removing empty folders."
-  end
-
-  if find_method_def(processed_source.ast)
-    problem "Define method #{method_name(@offensive_node)} in the class body, not at the top-level"
-  end
-
-  find_instance_method_call(body_node, :build, :universal?) do
-    next if @formula_name == "wine"
-
-    problem "macOS has been 64-bit only since 10.6 so build.universal? is deprecated."
-  end
-
-  find_instance_method_call(body_node, "ENV", :universal_binary) do
-    next if @formula_name == "wine"
-
-    problem "macOS has been 64-bit only since 10.6 so ENV.universal_binary is deprecated."
-  end
-
-  find_instance_method_call(body_node, "ENV", :runtime_cpu_detection) do
-    next if tap_style_exception? :runtime_cpu_detection_allowlist
-
-    problem "Formulae should be verified as having support for runtime hardware detection before " \
-            "using ENV.runtime_cpu_detection."
-  end
-
-  find_every_method_call_by_name(body_node, :depends_on).each do |method|
-    next unless method_called?(method, :new)
-
-    problem "`depends_on` can take requirement classes instead of instances"
-  end
-
-  find_instance_method_call(body_node, "ENV", :[]) do |method|
-    next unless modifier?(method.parent)
-
-    param = parameters(method).first
-    next unless node_equals?(param, "CI")
-
-    problem 'Don\'t use ENV["CI"] for Homebrew CI checks.'
-  end
-
-  find_instance_method_call(body_node, "Dir", :[]) do |method|
-    next if parameters(method).size != 1
-
-    path = parameters(method).first
-    next unless path.str_type?
-    next unless (match = regex_match_group(path, /^[^*{},]+$/))
-
-    problem "Dir([\"#{string_content(path)}\"]) is unnecessary; just use \"#{match[0]}\""
-  end
-
-  fileutils_methods = Regexp.new(
-    FileUtils.singleton_methods(false)
-             .map { |m| "(?-mix:^#{Regexp.escape(m)}$)" }
-             .join("|"),
-  )
-  find_every_method_call_by_name(body_node, :system).each do |method|
-    param = parameters(method).first
-    next unless (match = regex_match_group(param, fileutils_methods))
-
-    problem "Use the `#{match}` Ruby method instead of `#{method.source}`"
-  end
-end
-
-
- -
-

- - #conditional_dependencies(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/miscellaneous.rbi', line 17
-
-def conditional_dependencies(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #destructure_hash(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/miscellaneous.rbi', line 20
-
-def destructure_hash(node, **kwargs, &block); end
-
-
- -
-

- - #formula_path_strings(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/miscellaneous.rbi', line 30
-
-def formula_path_strings(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #hash_dep(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/miscellaneous.rbi', line 33
-
-def hash_dep(node, **kwargs, &block); end
-
-
- -
-

- - #languageNodeModule?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/miscellaneous.rbi', line 43
-
-def languageNodeModule?(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #modifier?(node) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-812
-813
-814
-815
-816
-
-
# File 'rubocops/lines.rb', line 812
-
-def modifier?(node)
-  return false unless node.if_type?
-
-  node.modifier_form?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/MpiCheck.html b/docs/RuboCop/Cop/FormulaAudit/MpiCheck.html deleted file mode 100644 index 707b5ac08..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/MpiCheck.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::MpiCheck - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::MpiCheck - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/mpi_check.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that formulae depend on open-mpi instead of mpich.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-
-
# File 'rubocops/lines.rb', line 195
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  # Enforce use of OpenMPI for MPI dependency in core
-  return if formula_tap != "homebrew-core"
-
-  find_method_with_args(body_node, :depends_on, "mpich") do
-    problem "Formulae in homebrew/core should use 'depends_on \"open-mpi\"' " \
-            "instead of '#{@offensive_node.source}'." do |corrector|
-      corrector.replace(@offensive_node.source_range, "depends_on \"open-mpi\"")
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/OnSystemConditionals.html b/docs/RuboCop/Cop/FormulaAudit/OnSystemConditionals.html deleted file mode 100644 index 0f8156a83..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/OnSystemConditionals.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::OnSystemConditionals - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::OnSystemConditionals - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
OnSystemConditionalsHelper
-
- - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/on_system_conditionals.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that OS conditionals are consistent.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
NO_ON_SYSTEM_METHOD_NAMES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:install, :post_install].freeze
- -
NO_ON_SYSTEM_BLOCK_NAMES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:service, :test].freeze
- -
- - - - - - -

Constants included - from OnSystemConditionalsHelper

-

OnSystemConditionalsHelper::ARCH_OPTIONS, OnSystemConditionalsHelper::BASE_OS_OPTIONS, OnSystemConditionalsHelper::MACOS_MODULE_NAMES, OnSystemConditionalsHelper::MACOS_VERSION_CONDITIONALS, OnSystemConditionalsHelper::MACOS_VERSION_OPTIONS, OnSystemConditionalsHelper::ON_SYSTEM_OPTIONS

- - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from OnSystemConditionalsHelper

-

#audit_arch_conditionals, #audit_base_os_conditionals, #audit_macos_references, #audit_macos_version_conditionals, #audit_on_system_blocks, #hardware_cpu_search, #if_arch_node_search, #if_base_os_node_search, #if_macos_version_node_search, #macos_version_comparison_search, #on_macos_version_method_call, #on_system_method_call

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-
-
# File 'rubocops/lines.rb', line 393
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  NO_ON_SYSTEM_METHOD_NAMES.each do |formula_method_name|
-    method_node = find_method_def(body_node, formula_method_name)
-    audit_on_system_blocks(method_node, formula_method_name) if method_node
-  end
-  NO_ON_SYSTEM_BLOCK_NAMES.each do |formula_block_name|
-    block_node = find_block(body_node, formula_block_name)
-    audit_on_system_blocks(block_node, formula_block_name) if block_node
-  end
-
-  # Don't restrict OS.mac? or OS.linux? usage in taps; they don't care
-  # as much as we do about e.g. formulae.brew.sh generation, often use
-  # platform-specific URLs and we don't want to add DSLs to support
-  # that case.
-  return if formula_tap != "homebrew-core"
-
-  audit_arch_conditionals(body_node,
-                          allowed_methods: NO_ON_SYSTEM_METHOD_NAMES,
-                          allowed_blocks:  NO_ON_SYSTEM_BLOCK_NAMES)
-
-  audit_base_os_conditionals(body_node,
-                             allowed_methods: NO_ON_SYSTEM_METHOD_NAMES,
-                             allowed_blocks:  NO_ON_SYSTEM_BLOCK_NAMES)
-
-  audit_macos_version_conditionals(body_node,
-                                   allowed_methods:     NO_ON_SYSTEM_METHOD_NAMES,
-                                   allowed_blocks:      NO_ON_SYSTEM_BLOCK_NAMES,
-                                   recommend_on_system: true)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/OptionDeclarations.html b/docs/RuboCop/Cop/FormulaAudit/OptionDeclarations.html deleted file mode 100644 index 1e17d7502..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/OptionDeclarations.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::OptionDeclarations - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::OptionDeclarations - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/option_declarations.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that options are used idiomatically.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-
-
# File 'rubocops/lines.rb', line 110
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  problem "Use new-style option definitions" if find_method_def(body_node, :options)
-
-  if formula_tap == "homebrew-core"
-    # Use of build.with? implies options, which are forbidden in homebrew/core
-    find_instance_method_call(body_node, :build, :without?) do
-      problem "Formulae in homebrew/core should not use `build.without?`."
-    end
-    find_instance_method_call(body_node, :build, :with?) do
-      problem "Formulae in homebrew/core should not use `build.with?`."
-    end
-
-    return
-  end
-
-  depends_on_build_with(body_node) do |build_with_node|
-    offending_node(build_with_node)
-    problem "Use `:optional` or `:recommended` instead of `if #{build_with_node.source}`"
-  end
-
-  find_instance_method_call(body_node, :build, :without?) do |method|
-    next unless unless_modifier?(method.parent)
-
-    correct = method.source.gsub("out?", "?")
-    problem "Use if #{correct} instead of unless #{method.source}"
-  end
-
-  find_instance_method_call(body_node, :build, :with?) do |method|
-    next unless unless_modifier?(method.parent)
-
-    correct = method.source.gsub("?", "out?")
-    problem "Use if #{correct} instead of unless #{method.source}"
-  end
-
-  find_instance_method_call(body_node, :build, :with?) do |method|
-    next unless expression_negated?(method)
-
-    problem "Don't negate 'build.with?': use 'build.without?'"
-  end
-
-  find_instance_method_call(body_node, :build, :without?) do |method|
-    next unless expression_negated?(method)
-
-    problem "Don't negate 'build.without?': use 'build.with?'"
-  end
-
-  find_instance_method_call(body_node, :build, :without?) do |method|
-    arg = parameters(method).first
-    next unless (match = regex_match_group(arg, /^-?-?without-(.*)/))
-
-    problem "Don't duplicate 'without': " \
-            "Use `build.without? \"#{match[1]}\"` to check for \"--without-#{match[1]}\""
-  end
-
-  find_instance_method_call(body_node, :build, :with?) do |method|
-    arg = parameters(method).first
-    next unless (match = regex_match_group(arg, /^-?-?with-(.*)/))
-
-    problem "Don't duplicate 'with': Use `build.with? \"#{match[1]}\"` to check for \"--with-#{match[1]}\""
-  end
-
-  find_instance_method_call(body_node, :build, :include?) do
-    problem "`build.include?` is deprecated"
-  end
-end
-
-
- -
-

- - #depends_on_build_with(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/option_declarations.rbi', line 17
-
-def depends_on_build_with(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #unless_modifier?(node) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-178
-179
-180
-181
-182
-
-
# File 'rubocops/lines.rb', line 178
-
-def unless_modifier?(node)
-  return false unless node.if_type?
-
-  node.modifier_form? && node.unless?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Options.html b/docs/RuboCop/Cop/FormulaAudit/Options.html deleted file mode 100644 index ef5ebac53..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Options.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Options - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Options - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/options.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits options in formulae.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
DEPRECATION_MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"macOS has been 64-bit only since 10.6 so 32-bit options are deprecated."
- -
UNI_DEPRECATION_MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"macOS has been 64-bit only since 10.6 so universal options are deprecated."
- -
DEP_OPTION = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Formulae in homebrew/core should not use `deprecated_option`."
- -
OPTION = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Formulae in homebrew/core should not use `option`."
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'rubocops/options.rb', line 17
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  option_call_nodes = find_every_method_call_by_name(body_node, :option)
-  option_call_nodes.each do |option_call|
-    option = parameters(option_call).first
-    problem DEPRECATION_MSG if regex_match_group(option, /32-bit/)
-
-    offending_node(option_call)
-    option = string_content(option)
-    problem UNI_DEPRECATION_MSG if option == "universal"
-
-    if !/with(out)?-/.match?(option) &&
-       option != "cxx11" &&
-       option != "universal"
-      problem "Options should begin with with/without. " \
-              "Migrate '--#{option}' with `deprecated_option`."
-    end
-
-    next unless option =~ /^with(out)?-(?:checks?|tests)$/
-    next if depends_on?("check", :optional, :recommended)
-
-    problem "Use '--with#{Regexp.last_match(1)}-test' instead of '--#{option}'. " \
-            "Migrate '--#{option}' with `deprecated_option`."
-  end
-
-  return if formula_tap != "homebrew-core"
-
-  problem DEP_OPTION if method_called_ever?(body_node, :deprecated_option)
-  problem OPTION if method_called_ever?(body_node, :option)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Patches.html b/docs/RuboCop/Cop/FormulaAudit/Patches.html deleted file mode 100644 index eac1f4942..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Patches.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Patches - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Patches - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/patches.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/patches.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- -
- TODO: -

Many of these could be auto-corrected.

-
-
- -

This cop audits patches in formulae.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(node, _class_node, _parent_class_node, body) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'rubocops/patches.rb', line 14
-
-def audit_formula(node, _class_node, _parent_class_node, body)
-  @full_source_content = source_buffer(node).source
-
-  return if body.nil?
-
-  external_patches = find_all_blocks(body, :patch)
-  external_patches.each do |patch_block|
-    url_node = find_every_method_call_by_name(patch_block, :url).first
-    url_string = parameters(url_node).first
-    patch_problems(url_string)
-  end
-
-  inline_patches = find_every_method_call_by_name(body, :patch)
-  inline_patches.each { |patch| inline_patch_problems(patch) }
-
-  if inline_patches.empty? && patch_end?
-    offending_patch_end_node(node)
-    add_offense(@offense_source_range, message: "patch is missing 'DATA'")
-  end
-
-  patches_node = find_method_def(body, :patches)
-  return if patches_node.nil?
-
-  legacy_patches = find_strings(patches_node)
-  problem "Use the patch DSL instead of defining a 'patches' method"
-  legacy_patches.each { |p| patch_problems(p) }
-end
-
-
- -
-

- - #patch_data?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/patches.rbi', line 17
-
-def patch_data?(node, *pattern, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/ProvidedByMacos.html b/docs/RuboCop/Cop/FormulaAudit/ProvidedByMacos.html deleted file mode 100644 index a62d7248e..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/ProvidedByMacos.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::ProvidedByMacos - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::ProvidedByMacos - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/uses_from_macos.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits formulae that are keg-only because they are provided by macos.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PROVIDED_BY_MACOS_FORMULAE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[
-  apr
-  bc
-  berkeley-db
-  bison
-  bzip2
-  cups
-  curl
-  cyrus-sasl
-  dyld-headers
-  ed
-  expat
-  file-formula
-  flex
-  gnu-getopt
-  gperf
-  icu4c
-  krb5
-  libarchive
-  libedit
-  libffi
-  libiconv
-  libpcap
-  libressl
-  libxcrypt
-  libxml2
-  libxslt
-  llvm
-  lsof
-  m4
-  ncompress
-  ncurses
-  net-snmp
-  netcat
-  openldap
-  pax
-  pcsc-lite
-  pod2man
-  rpcgen
-  ruby
-  sqlite
-  ssh-copy-id
-  swift
-  tcl-tk
-  unifdef
-  unzip
-  whois
-  zip
-  zlib
-].freeze
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'rubocops/uses_from_macos.rb', line 62
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  find_method_with_args(body_node, :keg_only, :provided_by_macos) do
-    return if PROVIDED_BY_MACOS_FORMULAE.include? @formula_name
-
-    problem "Formulae that are `keg_only :provided_by_macos` should be " \
-            "added to the `PROVIDED_BY_MACOS_FORMULAE` list (in the Homebrew/brew repo)"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/PyPiUrls.html b/docs/RuboCop/Cop/FormulaAudit/PyPiUrls.html deleted file mode 100644 index 89129d91c..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/PyPiUrls.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::PyPiUrls - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::PyPiUrls - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/urls.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/py_pi_urls.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that the correct format for PyPI URLs is used.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-
-
# File 'rubocops/urls.rb', line 264
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  urls = find_every_func_call_by_name(body_node, :url)
-  mirrors = find_every_func_call_by_name(body_node, :mirror)
-  urls += mirrors
-
-  # Check pypi URLs
-  pypi_pattern = %r{^https?://pypi\.python\.org/}
-  audit_urls(urls, pypi_pattern) do |_, url|
-    problem "use the `Source` url found on PyPI downloads page (`#{get_pypi_url(url)}`)"
-  end
-
-  # Require long files.pythonhosted.org URLs
-  pythonhosted_pattern = %r{^https?://files\.pythonhosted\.org/packages/source/}
-  audit_urls(urls, pythonhosted_pattern) do |_, url|
-    problem "use the `Source` url found on PyPI downloads page (`#{get_pypi_url(url)}`)"
-  end
-end
-
-
- -
-

- - #get_pypi_url(url) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-285
-286
-287
-288
-289
-
-
# File 'rubocops/urls.rb', line 285
-
-def get_pypi_url(url)
-  package_file = File.basename(url)
-  package_name = T.must(package_file.match(/^(.+)-[a-z0-9.]+$/))[1]
-  "https://pypi.org/project/#{package_name}/#files"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/PyoxidizerCheck.html b/docs/RuboCop/Cop/FormulaAudit/PyoxidizerCheck.html deleted file mode 100644 index 534fa03ed..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/PyoxidizerCheck.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::PyoxidizerCheck - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::PyoxidizerCheck - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/pyoxidizer_check.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that formulae do not depend on pyoxidizer at build-time -or run-time.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-232
-233
-234
-235
-236
-237
-238
-239
-
-
# File 'rubocops/lines.rb', line 232
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-  # Disallow use of PyOxidizer as a dependency in core
-  return if formula_tap != "homebrew-core"
-  return unless depends_on?("pyoxidizer")
-
-  problem "Formulae in homebrew/core should not use '#{@offensive_node.source}'."
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/PythonVersions.html b/docs/RuboCop/Cop/FormulaAudit/PythonVersions.html deleted file mode 100644 index d202a3be9..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/PythonVersions.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::PythonVersions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::PythonVersions - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/python_versions.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that Python versions are consistent.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-
-
# File 'rubocops/lines.rb', line 345
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  python_formula_node = find_every_method_call_by_name(body_node, :depends_on).find do |dep|
-    string_content(parameters(dep).first).start_with? "python@"
-  end
-
-  python_version = if python_formula_node.blank?
-    other_python_nodes = find_every_method_call_by_name(body_node, :depends_on).select do |dep|
-      parameters(dep).first.instance_of?(RuboCop::AST::HashNode) &&
-        string_content(parameters(dep).first.keys.first).start_with?("python@")
-    end
-    return if other_python_nodes.size != 1
-
-    string_content(parameters(other_python_nodes.first).first.keys.first).split("@").last
-  else
-    string_content(parameters(python_formula_node).first).split("@").last
-  end
-
-  find_strings(body_node).each do |str|
-    content = string_content(str)
-
-    next unless (match = content.match(/^python(@)?(\d\.\d+)$/))
-    next if python_version == match[2]
-
-    fix = if match[1]
-      "python@#{python_version}"
-    else
-      "python#{python_version}"
-    end
-
-    offending_node(str)
-    problem "References to `#{content}` should " \
-            "match the specified python dependency (`#{fix}`)" do |corrector|
-      corrector.replace(str.source_range, "\"#{fix}\"")
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/QuicTLSCheck.html b/docs/RuboCop/Cop/FormulaAudit/QuicTLSCheck.html deleted file mode 100644 index c81d3ca61..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/QuicTLSCheck.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::QuicTLSCheck - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::QuicTLSCheck - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/quic_tls_check.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that formulae depend on openssl instead of quictls.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-
-
# File 'rubocops/lines.rb', line 214
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  # Enforce use of OpenSSL for TLS dependency in core
-  return if formula_tap != "homebrew-core"
-
-  find_method_with_args(body_node, :depends_on, "quictls") do
-    problem "Formulae in homebrew/core should use 'depends_on \"openssl@3\"' " \
-            "instead of '#{@offensive_node.source}'." do |corrector|
-      corrector.replace(@offensive_node.source_range, "depends_on \"openssl@3\"")
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/ResourceRequiresDependencies.html b/docs/RuboCop/Cop/FormulaAudit/ResourceRequiresDependencies.html deleted file mode 100644 index 7080b8588..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/ResourceRequiresDependencies.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::ResourceRequiresDependencies - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::ResourceRequiresDependencies - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/resource_requires_dependencies.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits Python formulae that include certain resources -to ensure that they also have the correct uses_from_macos -dependencies.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'rubocops/resource_requires_dependencies.rb', line 13
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  resource_nodes = find_every_method_call_by_name(body_node, :resource)
-  return if resource_nodes.empty?
-
-  %w[lxml pyyaml].each do |resource_name|
-    found = resource_nodes.find { |node| node.arguments&.first&.str_content == resource_name }
-    next unless found
-
-    uses_from_macos_nodes = find_every_method_call_by_name(body_node, :uses_from_macos)
-    depends_on_nodes = find_every_method_call_by_name(body_node, :depends_on)
-    uses_from_macos_or_depends_on = (uses_from_macos_nodes + depends_on_nodes).filter_map do |node|
-      if (dep = node.arguments.first).hash_type?
-        dep_types = dep.values.first
-        dep_types = dep_types.array_type? ? dep_types.values : [dep_types]
-        dep.keys.first.str_content if dep_types.select(&:sym_type?).map(&:value).include?(:build)
-      else
-        dep.str_content
-      end
-    end
-
-    required_deps = case resource_name
-    when "lxml"
-      kind = depends_on?(:linux) ? "depends_on" : "uses_from_macos"
-      ["libxml2", "libxslt"]
-    when "pyyaml"
-      kind = "depends_on"
-      ["libyaml"]
-    else
-      []
-    end
-    next if required_deps.all? { |dep| uses_from_macos_or_depends_on.include?(dep) }
-
-    offending_node(found)
-    problem "Add `#{kind}` lines above for #{required_deps.map { |req| "`\"#{req}\"`" }.join(" and ")}."
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/SafePopenCommands.html b/docs/RuboCop/Cop/FormulaAudit/SafePopenCommands.html deleted file mode 100644 index caee67053..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/SafePopenCommands.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::SafePopenCommands - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::SafePopenCommands - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/safe_popen_commands.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that the safe versions of popen_* calls are used.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-
-
# File 'rubocops/lines.rb', line 246
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  test = find_block(body_node, :test)
-
-  [:popen_read, :popen_write].each do |unsafe_command|
-    test_methods = []
-
-    unless test.nil?
-      find_instance_method_call(test, "Utils", unsafe_command) do |method|
-        test_methods << method.source_range
-      end
-    end
-
-    find_instance_method_call(body_node, "Utils", unsafe_command) do |method|
-      unless test_methods.include?(method.source_range)
-        problem "Use `Utils.safe_#{unsafe_command}` instead of `Utils.#{unsafe_command}`" do |corrector|
-          corrector.replace(@offensive_node.loc.selector, "safe_#{@offensive_node.method_name}")
-        end
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Service.html b/docs/RuboCop/Cop/FormulaAudit/Service.html deleted file mode 100644 index 61c0c0111..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Service.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Service - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Service - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/service.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits the service block.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
CELLAR_PATH_AUDIT_CORRECTIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  bin:      :opt_bin,
-  libexec:  :opt_libexec,
-  pkgshare: :opt_pkgshare,
-  prefix:   :opt_prefix,
-  sbin:     :opt_sbin,
-  share:    :opt_share,
-}.freeze
- -
REQUIRED_METHOD_CALLS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

At least one of these methods must be defined in a service block.

- - -
-
-
- - -
-
-
[:run, :name].freeze
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'rubocops/service.rb', line 25
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  service_node = find_block(body_node, :service)
-  return if service_node.blank?
-
-  method_calls = service_node.each_descendant(:send).group_by(&:method_name)
-  method_calls.delete(:service)
-
-  # NOTE: Solving the first problem here might solve the second one too
-  #       so we don't show both of them at the same time.
-  if !method_calls.keys.intersect?(REQUIRED_METHOD_CALLS)
-    offending_node(service_node)
-    problem "Service blocks require `run` or `name` to be defined."
-  elsif !method_calls.key?(:run)
-    other_method_calls = method_calls.keys - [:name, :require_root]
-    if other_method_calls.any?
-      offending_node(service_node)
-      problem "`run` must be defined to use methods other than `name` like #{other_method_calls}."
-    end
-  end
-
-  # This check ensures that cellar paths like `bin` are not referenced
-  # because their `opt_` variants are more portable and work with the API.
-  CELLAR_PATH_AUDIT_CORRECTIONS.each do |path, opt_path|
-    next unless method_calls.key?(path)
-
-    method_calls.fetch(path).each do |node|
-      offending_node(node)
-      problem "Use `#{opt_path}` instead of `#{path}` in service blocks." do |corrector|
-        corrector.replace(node.source_range, opt_path)
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/ShellVariables.html b/docs/RuboCop/Cop/FormulaAudit/ShellVariables.html deleted file mode 100644 index 4b76a3114..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/ShellVariables.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::ShellVariables - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::ShellVariables - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/shell_variables.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that environment variables are passed correctly to popen_* calls.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-
-
# File 'rubocops/lines.rb', line 275
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  popen_commands = [
-    :popen,
-    :popen_read,
-    :safe_popen_read,
-    :popen_write,
-    :safe_popen_write,
-  ]
-
-  popen_commands.each do |command|
-    find_instance_method_call(body_node, "Utils", command) do |method|
-      next unless (match = regex_match_group(parameters(method).first, /^([^"' ]+)=([^"' ]+)(?: (.*))?$/))
-
-      good_args = "Utils.#{command}({ \"#{match[1]}\" => \"#{match[2]}\" }, \"#{match[3]}\")"
-
-      problem "Use `#{good_args}` instead of `#{method.source}`" do |corrector|
-        corrector.replace(@offensive_node.source_range,
-                          "{ \"#{match[1]}\" => \"#{match[2]}\" }, \"#{match[3]}\"")
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/SingleGenerateCompletionsDSLCall.html b/docs/RuboCop/Cop/FormulaAudit/SingleGenerateCompletionsDSLCall.html deleted file mode 100644 index 2370e59e5..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/SingleGenerateCompletionsDSLCall.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::SingleGenerateCompletionsDSLCall - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::SingleGenerateCompletionsDSLCall - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/single_generate_completions_dsl_call.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that the generate_completions_from_executable DSL is used with only -a single, combined call for all shells.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-567
-568
-569
-570
-571
-572
-573
-574
-575
-
-
# File 'rubocops/lines.rb', line 522
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  install = find_method_def(body_node, :install)
-  return if install.blank?
-
-  methods = find_every_method_call_by_name(install, :generate_completions_from_executable)
-  return if methods.length <= 1
-
-  offenses = []
-  shells = []
-  methods.each do |method|
-    next unless method.source.include?("shells:")
-
-    shells << method.source.match(/shells: \[(:bash|:zsh|:fish)\]/).captures.first
-    offenses << method
-  end
-
-  return if offenses.blank?
-
-  T.must(offenses[0...-1]).each_with_index do |node, i|
-    # commands have to be the same to be combined
-    # send_type? matches `bin/"foo"`, str_type? matches remaining command parts,
-    # the rest are kwargs we need to filter out
-    method_commands = node.arguments.filter { |arg| arg.send_type? || arg.str_type? }
-    next_method_commands = offenses[i + 1].arguments.filter { |arg| arg.send_type? || arg.str_type? }
-    if method_commands != next_method_commands
-      shells.delete_at(i)
-      next
-    end
-
-    offending_node(node)
-    problem "Use a single `generate_completions_from_executable` " \
-            "call combining all specified shells." do |corrector|
-      # adjust range by -4 and +1 to also include & remove leading spaces and trailing \n
-      corrector.replace(@offensive_node.source_range.adjust(begin_pos: -4, end_pos: 1), "")
-    end
-  end
-
-  return if shells.length <= 1 # no shells to combine left
-
-  offending_node(offenses.last)
-  replacement = if (%w[:bash :zsh :fish] - shells).empty?
-    @offensive_node.source.sub(/shells: \[(:bash|:zsh|:fish)\]/, "")
-                   .sub(", )", ")") # clean up dangling trailing comma
-                   .sub("(, ", "(") # clean up dangling leading comma
-                   .sub(", , ", ", ") # clean up dangling enclosed comma
-  else
-    @offensive_node.source.sub(/shells: \[(:bash|:zsh|:fish)\]/,
-                               "shells: [#{shells.join(", ")}]")
-  end
-
-  problem "Use `#{replacement}` instead of `#{@offensive_node.source}`." do |corrector|
-    corrector.replace(@offensive_node.source_range, replacement)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Test.html b/docs/RuboCop/Cop/FormulaAudit/Test.html deleted file mode 100644 index 4182909df..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Test.html +++ /dev/null @@ -1,444 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Test - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Test - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/class.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/test.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that a test block contains a proper test.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-
-
# File 'rubocops/class.rb', line 33
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  test = find_block(body_node, :test)
-  return unless test
-
-  if test.body.nil?
-    problem "`test do` should not be empty"
-    return
-  end
-
-  problem "`test do` should contain a real test" if test.body.single_line? && test.body.source.to_s == "true"
-
-  test_calls(test) do |node, params|
-    p1, p2 = params
-    if (match = string_content(p1).match(%r{(/usr/local/(s?bin))}))
-      offending_node(p1)
-      problem "use \#{#{match[2]}} instead of #{match[1]} in #{node}" do |corrector|
-        corrector.replace(p1.source_range, p1.source.sub(match[1], "\#{#{match[2]}}"))
-      end
-    end
-
-    if node == :shell_output && node_equals?(p2, 0)
-      offending_node(p2)
-      problem "Passing 0 to shell_output() is redundant" do |corrector|
-        corrector.remove(range_with_surrounding_comma(range_with_surrounding_space(range: p2.source_range,
-                                                                                   side:  :left)))
-      end
-    end
-  end
-end
-
-
- -
-

- - #test_calls(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/test.rbi', line 17
-
-def test_calls(node, *pattern, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Text.html b/docs/RuboCop/Cop/FormulaAudit/Text.html deleted file mode 100644 index 315c0b505..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Text.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Text - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Text - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/text.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/text.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop checks for various problems in a formula's source code.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'rubocops/text.rb', line 13
-
-def audit_formula(node, _class_node, _parent_class_node, body_node)
-  full_source_content = source_buffer(node).source
-
-  if (match = full_source_content.match(/^require ['"]formula['"]$/))
-    range = source_range(source_buffer(node), match.pre_match.count("\n") + 1, 0, match[0].length)
-    add_offense(range, message: "`#{match}` is now unnecessary") do |corrector|
-      corrector.remove(range_with_surrounding_space(range:))
-    end
-  end
-
-  return if body_node.nil?
-
-  if find_method_def(body_node, :plist)
-    problem "`def plist` is deprecated. Please use services instead: https://docs.brew.sh/Formula-Cookbook#service-files"
-  end
-
-  if (depends_on?("openssl") || depends_on?("openssl@3")) && depends_on?("libressl")
-    problem "Formulae should not depend on both OpenSSL and LibreSSL (even optionally)."
-  end
-
-  if formula_tap == "homebrew-core"
-    if depends_on?("veclibfort") || depends_on?("lapack")
-      problem "Formulae in homebrew/core should use OpenBLAS as the default serial linear algebra library."
-    end
-
-    if find_node_method_by_name(body_node, :keg_only)&.source&.include?("HOMEBREW_PREFIX")
-      problem "`keg_only` reason should not include `HOMEBREW_PREFIX` " \
-              "as it creates confusing `brew info` output."
-    end
-  end
-
-  unless method_called_ever?(body_node, :go_resource)
-    # processed_source.ast is passed instead of body_node because `require` would be outside body_node
-    find_method_with_args(processed_source.ast, :require, "language/go") do
-      problem "require \"language/go\" is unnecessary unless using `go_resource`s"
-    end
-  end
-
-  find_instance_method_call(body_node, "Formula", :factory) do
-    problem "\"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\""
-  end
-
-  find_method_with_args(body_node, :revision, 0) do
-    problem "\"revision 0\" is unnecessary"
-  end
-
-  find_method_with_args(body_node, :system, "xcodebuild") do
-    problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args")
-  end
-
-  if (method_node = find_method_def(body_node, :install))
-    find_method_with_args(method_node, :system, "go", "get") do
-      problem "Do not use `go get`. Please ask upstream to implement Go vendoring"
-    end
-
-    find_method_with_args(method_node, :system, "cargo", "build") do |m|
-      next if parameters_passed?(m, [/--lib/])
-
-      problem "use \"cargo\", \"install\", *std_cargo_args"
-    end
-  end
-
-  find_method_with_args(body_node, :system, "dep", "ensure") do |d|
-    next if parameters_passed?(d, [/vendor-only/])
-    next if @formula_name == "goose" # needed in 2.3.0
-
-    problem "use \"dep\", \"ensure\", \"-vendor-only\""
-  end
-
-  find_every_method_call_by_name(body_node, :system).each do |m|
-    next unless parameters_passed?(m, [/make && make/])
-
-    offending_node(m)
-    problem "Use separate `make` calls"
-  end
-
-  body_node.each_descendant(:dstr) do |dstr_node|
-    dstr_node.each_descendant(:begin) do |interpolation_node|
-      next unless interpolation_node.source.match?(/#\{\w+\s*\+\s*['"][^}]+\}/)
-
-      offending_node(interpolation_node)
-      problem "Do not concatenate paths in string interpolation"
-    end
-  end
-
-  prefix_path(body_node) do |prefix_node, path|
-    next unless (match = path.match(%r{^(bin|include|libexec|lib|sbin|share|Frameworks)(?:/| |$)}))
-
-    offending_node(prefix_node)
-    problem "Use `#{match[1].downcase}` instead of `prefix + \"#{match[1]}\"`"
-  end
-end
-
-
- -
-

- - #prefix_path(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit/text.rbi', line 17
-
-def prefix_path(node, *pattern, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Urls.html b/docs/RuboCop/Cop/FormulaAudit/Urls.html deleted file mode 100644 index ae49592da..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Urls.html +++ /dev/null @@ -1,756 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Urls - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Urls - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/urls.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit/urls.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits urls and mirrors in formulae.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-
-
# File 'rubocops/urls.rb', line 11
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  urls = find_every_func_call_by_name(body_node, :url)
-  mirrors = find_every_func_call_by_name(body_node, :mirror)
-
-  # Identify livecheck URLs, to skip some checks for them
-  livecheck_url = if (livecheck = find_every_func_call_by_name(body_node, :livecheck).first) &&
-                     (livecheck_url = find_every_func_call_by_name(livecheck.parent, :url).first)
-    string_content(parameters(livecheck_url).first)
-  end
-
-  # GNU URLs; doesn't apply to mirrors
-  gnu_pattern = %r{^(?:https?|ftp)://ftpmirror\.gnu\.org/(.*)}
-  audit_urls(urls, gnu_pattern) do |match, url|
-    problem "Please use \"https://ftp.gnu.org/gnu/#{match[1]}\" instead of #{url}."
-  end
-
-  # Fossies upstream requests they aren't used as primary URLs
-  # https://github.com/Homebrew/homebrew-core/issues/14486#issuecomment-307753234
-  fossies_pattern = %r{^https?://fossies\.org/}
-  audit_urls(urls, fossies_pattern) do
-    problem "Please don't use fossies.org in the url (using as a mirror is fine)"
-  end
-
-  apache_pattern = %r{^https?://(?:[^/]*\.)?apache\.org/(?:dyn/closer\.cgi\?path=/?|dist/)(.*)}i
-  audit_urls(urls, apache_pattern) do |match, url|
-    next if url == livecheck_url
-
-    problem "#{url} should be `https://www.apache.org/dyn/closer.lua?path=#{match[1]}`"
-  end
-
-  version_control_pattern = %r{^(cvs|bzr|hg|fossil)://}
-  audit_urls(urls, version_control_pattern) do |match, _|
-    problem "Use of the #{match[1]}:// scheme is deprecated, pass `:using => :#{match[1]}` instead"
-  end
-
-  svn_pattern = %r{^svn\+http://}
-  audit_urls(urls, svn_pattern) do |_, _|
-    problem "Use of the svn+http:// scheme is deprecated, pass `:using => :svn` instead"
-  end
-
-  audit_urls(mirrors, /.*/) do |_, mirror|
-    urls.each do |url|
-      url_string = string_content(parameters(url).first)
-      next unless url_string.eql?(mirror)
-
-      problem "URL should not be duplicated as a mirror: #{url_string}"
-    end
-  end
-
-  urls += mirrors
-
-  # Check a variety of SSL/TLS URLs that don't consistently auto-redirect
-  # or are overly common errors that need to be reduced & fixed over time.
-  http_to_https_patterns = Regexp.union([%r{^http://ftp\.gnu\.org/},
-                                         %r{^http://ftpmirror\.gnu\.org/},
-                                         %r{^http://download\.savannah\.gnu\.org/},
-                                         %r{^http://download-mirror\.savannah\.gnu\.org/},
-                                         %r{^http://(?:[^/]*\.)?apache\.org/},
-                                         %r{^http://code\.google\.com/},
-                                         %r{^http://fossies\.org/},
-                                         %r{^http://mirrors\.kernel\.org/},
-                                         %r{^http://mirrors\.ocf\.berkeley\.edu/},
-                                         %r{^http://(?:[^/]*\.)?bintray\.com/},
-                                         %r{^http://tools\.ietf\.org/},
-                                         %r{^http://launchpad\.net/},
-                                         %r{^http://github\.com/},
-                                         %r{^http://bitbucket\.org/},
-                                         %r{^http://anonscm\.debian\.org/},
-                                         %r{^http://cpan\.metacpan\.org/},
-                                         %r{^http://hackage\.haskell\.org/},
-                                         %r{^http://(?:[^/]*\.)?archive\.org},
-                                         %r{^http://(?:[^/]*\.)?freedesktop\.org},
-                                         %r{^http://(?:[^/]*\.)?mirrorservice\.org/}])
-  audit_urls(urls, http_to_https_patterns) do |_, url, index|
-    # It's fine to have a plain HTTP mirror further down the mirror list.
-    https_url = url.dup.insert(4, "s")
-    https_index = T.let(nil, T.nilable(Integer))
-    audit_urls(urls, https_url) do |_, _, found_https_index|
-      https_index = found_https_index
-    end
-    problem "Please use https:// for #{url}" if !https_index || https_index > index
-  end
-
-  apache_mirror_pattern = %r{^https?://(?:[^/]*\.)?apache\.org/dyn/closer\.(?:cgi|lua)\?path=/?(.*)}i
-  audit_urls(mirrors, apache_mirror_pattern) do |match, mirror|
-    problem "Please use `https://archive.apache.org/dist/#{match[1]}` as a mirror instead of #{mirror}."
-  end
-
-  cpan_pattern = %r{^http://search\.mcpan\.org/CPAN/(.*)}i
-  audit_urls(urls, cpan_pattern) do |match, url|
-    problem "#{url} should be `https://cpan.metacpan.org/#{match[1]}`"
-  end
-
-  gnome_pattern = %r{^(http|ftp)://ftp\.gnome\.org/pub/gnome/(.*)}i
-  audit_urls(urls, gnome_pattern) do |match, url|
-    problem "#{url} should be `https://download.gnome.org/#{match[2]}`"
-  end
-
-  debian_pattern = %r{^git://anonscm\.debian\.org/users/(.*)}i
-  audit_urls(urls, debian_pattern) do |match, url|
-    problem "#{url} should be `https://anonscm.debian.org/git/users/#{match[1]}`"
-  end
-
-  # Prefer HTTP/S when possible over FTP protocol due to possible firewalls.
-  mirror_service_pattern = %r{^ftp://ftp\.mirrorservice\.org}
-  audit_urls(urls, mirror_service_pattern) do |_, url|
-    problem "Please use https:// for #{url}"
-  end
-
-  cpan_ftp_pattern = %r{^ftp://ftp\.cpan\.org/pub/CPAN(.*)}i
-  audit_urls(urls, cpan_ftp_pattern) do |match_obj, url|
-    problem "#{url} should be `http://search.cpan.org/CPAN#{match_obj[1]}`"
-  end
-
-  # SourceForge url patterns
-  sourceforge_patterns = %r{^https?://.*\b(sourceforge|sf)\.(com|net)}
-  audit_urls(urls, sourceforge_patterns) do |_, url|
-    # Skip if the URL looks like a SVN repository.
-    next if url.include? "/svnroot/"
-    next if url.include? "svn.sourceforge"
-    next if url.include? "/p/"
-
-    if url =~ /(\?|&)use_mirror=/
-      problem "Don't use #{Regexp.last_match(1)}use_mirror in SourceForge urls (url is #{url})."
-    end
-
-    problem "Don't use /download in SourceForge urls (url is #{url})." if url.end_with?("/download")
-
-    if url.match?(%r{^https?://sourceforge\.}) && url != livecheck_url
-      problem "Use https://downloads.sourceforge.net to get geolocation (url is #{url})."
-    end
-
-    if url.match?(%r{^https?://prdownloads\.})
-      problem "Don't use prdownloads in SourceForge urls (url is #{url})."
-    end
-
-    if url.match?(%r{^http://\w+\.dl\.})
-      problem "Don't use specific dl mirrors in SourceForge urls (url is #{url})."
-    end
-
-    problem "Please use https:// for #{url}" if url.start_with? "http://downloads"
-  end
-
-  # Debian has an abundance of secure mirrors. Let's not pluck the insecure
-  # one out of the grab bag.
-  unsecure_deb_pattern = %r{^http://http\.debian\.net/debian/(.*)}i
-  audit_urls(urls, unsecure_deb_pattern) do |match, _|
-    problem <<~EOS
-      Please use a secure mirror for Debian URLs.
-      We recommend:
-        https://deb.debian.org/debian/#{match[1]}
-    EOS
-  end
-
-  # Check to use canonical URLs for Debian packages
-  noncanon_deb_pattern =
-    Regexp.union([%r{^https://mirrors\.kernel\.org/debian/},
-                  %r{^https://mirrors\.ocf\.berkeley\.edu/debian/},
-                  %r{^https://(?:[^/]*\.)?mirrorservice\.org/sites/ftp\.debian\.org/debian/}])
-  audit_urls(urls, noncanon_deb_pattern) do |_, url|
-    problem "Please use https://deb.debian.org/debian/ for #{url}"
-  end
-
-  # Check for new-url Google Code download URLs, https:// is preferred
-  google_code_pattern = Regexp.union([%r{^http://[A-Za-z0-9\-.]*\.googlecode\.com/files.*},
-                                      %r{^http://code\.google\.com/}])
-  audit_urls(urls, google_code_pattern) do |_, url|
-    problem "Please use https:// for #{url}"
-  end
-
-  # Check for `git://` GitHub repository URLs, https:// is preferred.
-  git_gh_pattern = %r{^git://[^/]*github\.com/}
-  audit_urls(urls, git_gh_pattern) do |_, url|
-    problem "Please use https:// for #{url}"
-  end
-
-  # Check for `git://` Gitorious repository URLs, https:// is preferred.
-  git_gitorious_pattern = %r{^git://[^/]*gitorious\.org/}
-  audit_urls(urls, git_gitorious_pattern) do |_, url|
-    problem "Please use https:// for #{url}"
-  end
-
-  # Check for `http://` GitHub repository URLs, https:// is preferred.
-  gh_pattern = %r{^http://github\.com/.*\.git$}
-  audit_urls(urls, gh_pattern) do |_, url|
-    problem "Please use https:// for #{url}"
-  end
-
-  # Check for master branch GitHub archives.
-  tarball_gh_pattern = %r{^https://github\.com/.*archive/master\.(tar\.gz|zip)$}
-  audit_urls(urls, tarball_gh_pattern) do
-    problem "Use versioned rather than branch tarballs for stable checksums."
-  end
-
-  # Use new-style archive downloads.
-  archive_gh_pattern = %r{https://.*github.*/(?:tar|zip)ball/}
-  audit_urls(urls, archive_gh_pattern) do |_, url|
-    next if url.end_with?(".git")
-
-    problem "Use /archive/ URLs for GitHub tarballs (url is #{url})."
-  end
-
-  archive_refs_gh_pattern = %r{https://.*github.+/archive/(?![a-fA-F0-9]{40})(?!refs/(tags|heads)/)(.*)\.tar\.gz$}
-  audit_urls(urls, archive_refs_gh_pattern) do |match, url|
-    next if url.end_with?(".git")
-
-    problem "Use refs/tags/#{match[2]} or refs/heads/#{match[2]} for GitHub references (url is #{url})."
-  end
-
-  # Don't use GitHub .zip files
-  zip_gh_pattern = %r{https://.*github.*/(archive|releases)/.*\.zip$}
-  audit_urls(urls, zip_gh_pattern) do |_, url|
-    next if url.include?("releases/download")
-
-    problem "Use GitHub tarballs rather than zipballs (url is #{url})."
-  end
-
-  # Don't use GitHub codeload URLs
-  codeload_gh_pattern = %r{https?://codeload\.github\.com/(.+)/(.+)/(?:tar\.gz|zip)/(.+)}
-  audit_urls(urls, codeload_gh_pattern) do |match, url|
-    problem <<~EOS
-      Use GitHub archive URLs:
-        https://github.com/#{match[1]}/#{match[2]}/archive/#{match[3]}.tar.gz
-      Rather than codeload:
-        #{url}
-    EOS
-  end
-
-  # Check for Maven Central URLs, prefer HTTPS redirector over specific host
-  maven_pattern = %r{https?://(?:central|repo\d+)\.maven\.org/maven2/(.+)$}
-  audit_urls(urls, maven_pattern) do |match, url|
-    problem "#{url} should be `https://search.maven.org/remotecontent?filepath=#{match[1]}`"
-  end
-
-  return if formula_tap != "homebrew-core"
-
-  # Check for binary URLs
-  audit_urls(urls, /(darwin|macos|osx)/i) do |match, url|
-    next if @formula_name.include?(match.to_s.downcase)
-    next if url.match?(/.(patch|diff)(\?full_index=1)?$/)
-    next if tap_style_exception? :not_a_binary_url_prefix_allowlist
-    next if tap_style_exception? :binary_bootstrap_formula_urls_allowlist
-
-    problem "#{url} looks like a binary package, not a source archive; " \
-            "homebrew/core is source-only."
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/UsesFromMacos.html b/docs/RuboCop/Cop/FormulaAudit/UsesFromMacos.html deleted file mode 100644 index 28c8d54f3..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/UsesFromMacos.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::UsesFromMacos - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::UsesFromMacos - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/uses_from_macos.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop audits uses_from_macos dependencies in formulae.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
ALLOWED_USES_FROM_MACOS_DEPS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- -
- TODO: -

consider making some of these keg-only.

-
-
- -

These formulae aren't keg_only :provided_by_macos but are provided by -macOS (or very similarly, e.g. OpenSSL where system provides LibreSSL).

- - -
-
-
- - -
-
-
%w[
-  bash
-  cpio
-  expect
-  git
-  groff
-  gzip
-  less
-  mandoc
-  openssl
-  perl
-  php
-  python
-  rsync
-  vim
-  xz
-  zsh
-].freeze
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'rubocops/uses_from_macos.rb', line 98
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  depends_on_linux = depends_on?(:linux)
-
-  find_method_with_args(body_node, :uses_from_macos, /^"(.+)"/).each do |method|
-    @offensive_node = method
-    problem "`uses_from_macos` should not be used when Linux is required." if depends_on_linux
-
-    dep = if parameters(method).first.instance_of?(RuboCop::AST::StrNode)
-      parameters(method).first
-    elsif parameters(method).first.instance_of?(RuboCop::AST::HashNode)
-      parameters(method).first.keys.first
-    end
-
-    dep_name = string_content(dep)
-    next if ALLOWED_USES_FROM_MACOS_DEPS.include? dep_name
-    next if ProvidedByMacos::PROVIDED_BY_MACOS_FORMULAE.include? dep_name
-
-    problem "`uses_from_macos` should only be used for macOS dependencies, not #{dep_name}."
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAudit/Version.html b/docs/RuboCop/Cop/FormulaAudit/Version.html deleted file mode 100644 index 92b7cbe09..000000000 --- a/docs/RuboCop/Cop/FormulaAudit/Version.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAudit::Version - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAudit::Version - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that a version is in the correct format.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'rubocops/version.rb', line 11
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  version_node = find_node_method_by_name(body_node, :version)
-  return unless version_node
-
-  version = string_content(parameters(version_node).first)
-
-  problem "version is set to an empty string" if version.empty?
-
-  problem "version #{version} should not have a leading 'v'" if version.start_with?("v")
-
-  return unless version.match?(/_\d+$/)
-
-  problem "version #{version} should not end with an underline and a number"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAuditStrict.html b/docs/RuboCop/Cop/FormulaAuditStrict.html deleted file mode 100644 index 3cca8e0f4..000000000 --- a/docs/RuboCop/Cop/FormulaAuditStrict.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: RuboCop::Cop::FormulaAuditStrict - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::FormulaAuditStrict - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/text.rb,
- rubocops/urls.rb,
rubocops/class.rb,
rubocops/lines.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: GitUrls, MakeCheck, Requirements, RustCheck, TestPresent, Text - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAuditStrict/GitUrls.html b/docs/RuboCop/Cop/FormulaAuditStrict/GitUrls.html deleted file mode 100644 index 332c0e64e..000000000 --- a/docs/RuboCop/Cop/FormulaAuditStrict/GitUrls.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAuditStrict::GitUrls - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAuditStrict::GitUrls - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/urls.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit_strict/git_urls.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that git URLs have a tag.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-
-
# File 'rubocops/urls.rb', line 316
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-  return if formula_tap != "homebrew-core"
-
-  find_method_calls_by_name(body_node, :url).each do |url|
-    next unless string_content(parameters(url).first).match?(/\.git$/)
-    next if url_has_tag?(parameters(url).last)
-
-    offending_node(url)
-    problem "Formulae in homebrew/core should specify a tag for git URLs"
-  end
-end
-
-
- -
-

- - #url_has_tag?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit_strict/git_urls.rbi', line 10
-
-def url_has_tag?(node, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAuditStrict/MakeCheck.html b/docs/RuboCop/Cop/FormulaAuditStrict/MakeCheck.html deleted file mode 100644 index 485723290..000000000 --- a/docs/RuboCop/Cop/FormulaAuditStrict/MakeCheck.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAuditStrict::MakeCheck - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAuditStrict::MakeCheck - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit_strict/make_check.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that no build-time checks are performed.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-849
-850
-851
-852
-853
-854
-855
-856
-857
-858
-859
-860
-861
-862
-863
-864
-865
-866
-867
-868
-
-
# File 'rubocops/lines.rb', line 849
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if formula_tap != "homebrew-core"
-
-  # Avoid build-time checks in homebrew/core
-  find_every_method_call_by_name(body_node, :system).each do |method|
-    next if @formula_name.start_with?("lib")
-    next if tap_style_exception? :make_check_allowlist
-
-    params = parameters(method)
-    next unless node_equals?(params[0], "make")
-
-    params[1..].each do |arg|
-      next unless regex_match_group(arg, /^(checks?|tests?)$/)
-
-      offending_node(method)
-      problem "Formulae in homebrew/core (except e.g. cryptography, libraries) " \
-              "should not run build-time checks"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAuditStrict/Requirements.html b/docs/RuboCop/Cop/FormulaAuditStrict/Requirements.html deleted file mode 100644 index dc1379325..000000000 --- a/docs/RuboCop/Cop/FormulaAuditStrict/Requirements.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAuditStrict::Requirements - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAuditStrict::Requirements - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit_strict/requirements.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that new formulae depending on removed Requirements are not used

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, _body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-873
-874
-875
-876
-877
-878
-
-
# File 'rubocops/lines.rb', line 873
-
-def audit_formula(_node, _class_node, _parent_class_node, _body_node)
-  problem "Formulae should depend on a versioned `openjdk` instead of :java" if depends_on? :java
-  problem "Formulae should depend on specific X libraries instead of :x11" if depends_on? :x11
-  problem "Formulae should not depend on :osxfuse" if depends_on? :osxfuse
-  problem "Formulae should not depend on :tuntap" if depends_on? :tuntap
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAuditStrict/RustCheck.html b/docs/RuboCop/Cop/FormulaAuditStrict/RustCheck.html deleted file mode 100644 index 5211d42f5..000000000 --- a/docs/RuboCop/Cop/FormulaAuditStrict/RustCheck.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAuditStrict::RustCheck - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAuditStrict::RustCheck - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/lines.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit_strict/rust_check.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that formulae build with rust instead of rustup-init.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-885
-886
-887
-888
-889
-890
-891
-892
-893
-894
-895
-896
-897
-898
-899
-900
-901
-902
-903
-904
-905
-906
-907
-908
-909
-910
-911
-912
-913
-914
-915
-916
-917
-918
-919
-920
-
-
# File 'rubocops/lines.rb', line 885
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  # Enforce use of `rust` for rust dependency in core
-  return if formula_tap != "homebrew-core"
-
-  find_method_with_args(body_node, :depends_on, "rustup-init") do
-    problem "Formulae in homebrew/core should use 'depends_on \"rust\"' " \
-            "instead of '#{@offensive_node.source}'." do |corrector|
-      corrector.replace(@offensive_node.source_range, "depends_on \"rust\"")
-    end
-  end
-
-  # TODO: Enforce order of dependency types so we don't need to check for
-  #       depends_on "rustup-init" => [:test, :build]
-  [:build, [:build, :test], [:test, :build]].each do |type|
-    find_method_with_args(body_node, :depends_on, "rustup-init" => type) do
-      problem "Formulae in homebrew/core should use 'depends_on \"rust\" => #{type}' " \
-              "instead of '#{@offensive_node.source}'." do |corrector|
-        corrector.replace(@offensive_node.source_range, "depends_on \"rust\" => #{type}")
-      end
-    end
-  end
-
-  install_node = find_method_def(body_node, :install)
-  return if install_node.blank?
-
-  find_every_method_call_by_name(install_node, :system).each do |method|
-    param = parameters(method).first
-    next if param.blank?
-    # FIXME: Handle Pathname parameters (e.g. `system bin/"rustup-init"`).
-    next if regex_match_group(param, /rustup-init$/).blank?
-
-    problem "Formula in homebrew/core should not use `rustup-init` at build-time."
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAuditStrict/TestPresent.html b/docs/RuboCop/Cop/FormulaAuditStrict/TestPresent.html deleted file mode 100644 index acf448396..000000000 --- a/docs/RuboCop/Cop/FormulaAuditStrict/TestPresent.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAuditStrict::TestPresent - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAuditStrict::TestPresent - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/class.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit_strict/test_present.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that a test block exists.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-77
-
-
# File 'rubocops/class.rb', line 72
-
-def audit_formula(_node, class_node, _parent_class_node, body_node)
-  return if find_block(body_node, :test)
-
-  offending_node(class_node) if body_node.nil?
-  problem "A `test do` test block should be added"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaAuditStrict/Text.html b/docs/RuboCop/Cop/FormulaAuditStrict/Text.html deleted file mode 100644 index 7b1b4a36d..000000000 --- a/docs/RuboCop/Cop/FormulaAuditStrict/Text.html +++ /dev/null @@ -1,636 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaAuditStrict::Text - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaAuditStrict::Text - - - Private -

-
- -
-
Inherits:
-
- RuboCop::Cop::FormulaCop - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/text.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_audit_strict/text.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop contains stricter checks for various problems in a formula's source code.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from RuboCop::Cop::FormulaCop

-

#file_path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RuboCop::Cop::FormulaCop

-

#audit_comments, #audit_urls, #caveats_strings, #dependency_name_hash_match?, #dependency_type_hash_match?, #depends_on?, #depends_on_name_type?, #formula_tap, #get_checksum_node, #on_class, #required_dependency?, #required_dependency_name?, #style_exceptions_dir, #tap_style_exception?, #versioned_formula?

- - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - -
-

Instance Method Details

- - -
-

- - #audit_formula(_node, _class_node, _parent_class_node, body_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-
-
# File 'rubocops/text.rb', line 116
-
-def audit_formula(_node, _class_node, _parent_class_node, body_node)
-  return if body_node.nil?
-
-  find_method_with_args(body_node, :go_resource) do
-    problem "`go_resource`s are deprecated. Please ask upstream to implement Go vendoring"
-  end
-
-  find_method_with_args(body_node, :env, :userpaths) do
-    problem "`env :userpaths` in homebrew/core formulae is deprecated"
-  end
-
-  share_path_starts_with(body_node, @formula_name) do |share_node|
-    offending_node(share_node)
-    problem "Use `pkgshare` instead of `share/\"#{@formula_name}\"`"
-  end
-
-  interpolated_share_path_starts_with(body_node, "/#{@formula_name}") do |share_node|
-    offending_node(share_node)
-    problem "Use `\#{pkgshare}` instead of `\#{share}/#{@formula_name}`"
-  end
-
-  return if formula_tap != "homebrew-core"
-
-  find_method_with_args(body_node, :env, :std) do
-    problem "`env :std` in homebrew/core formulae is deprecated"
-  end
-end
-
-
- -
-

- - #interpolated_share_path_starts_with(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit_strict/text.rbi', line 17
-
-def interpolated_share_path_starts_with(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #path_starts_with?(path, starts_with) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether value starts with the formula name and then a "/", " " or EOS.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-145
-146
-147
-
-
# File 'rubocops/text.rb', line 145
-
-def path_starts_with?(path, starts_with)
-  path.match?(%r{^#{Regexp.escape(starts_with)}(/| |$)})
-end
-
-
- -
-

- - #share_path_starts_with(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_audit_strict/text.rbi', line 27
-
-def share_path_starts_with(node, *pattern, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/FormulaCop.html b/docs/RuboCop/Cop/FormulaCop.html deleted file mode 100644 index 1f65e3c62..000000000 --- a/docs/RuboCop/Cop/FormulaCop.html +++ /dev/null @@ -1,1943 +0,0 @@ - - - - - - - Class: RuboCop::Cop::FormulaCop - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::FormulaCop - Abstract - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - -
-
Includes:
-
RangeHelp, HelperFunctions
-
- - - - - - -
-
Defined in:
-
rubocops/extend/formula_cop.rb,
- sorbet/rbi/dsl/rubo_cop/cop/formula_cop.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

It cannot be directly instantiated. Subclasses must implement the abstract methods below.

-
-
-

Abstract base class for all formula cops.

- - -
-
-
- - -
-

Direct Known Subclasses

-

RuboCop::Cop::FormulaAudit::AssertStatements, RuboCop::Cop::FormulaAudit::BottleDigestIndentation, RuboCop::Cop::FormulaAudit::BottleFormat, RuboCop::Cop::FormulaAudit::BottleOrder, RuboCop::Cop::FormulaAudit::BottleTagIndentation, RuboCop::Cop::FormulaAudit::Caveats, RuboCop::Cop::FormulaAudit::Checksum, RuboCop::Cop::FormulaAudit::ChecksumCase, RuboCop::Cop::FormulaAudit::ClassInheritance, RuboCop::Cop::FormulaAudit::ClassName, RuboCop::Cop::FormulaAudit::Comments, RuboCop::Cop::FormulaAudit::ComponentsOrder, RuboCop::Cop::FormulaAudit::ComponentsRedundancy, RuboCop::Cop::FormulaAudit::Conflicts, RuboCop::Cop::FormulaAudit::DependencyOrder, RuboCop::Cop::FormulaAudit::DeprecateDisableDate, RuboCop::Cop::FormulaAudit::DeprecateDisableReason, RuboCop::Cop::FormulaAudit::Desc, RuboCop::Cop::FormulaAudit::Files, RuboCop::Cop::FormulaAudit::GenerateCompletionsDSL, RuboCop::Cop::FormulaAudit::GitUrls, RuboCop::Cop::FormulaAudit::Homepage, RuboCop::Cop::FormulaAudit::KegOnly, RuboCop::Cop::FormulaAudit::LicenseArrays, RuboCop::Cop::FormulaAudit::Licenses, RuboCop::Cop::FormulaAudit::Lines, RuboCop::Cop::FormulaAudit::LivecheckRegexCaseInsensitive, RuboCop::Cop::FormulaAudit::LivecheckRegexExtension, RuboCop::Cop::FormulaAudit::LivecheckRegexIfPageMatch, RuboCop::Cop::FormulaAudit::LivecheckRegexParentheses, RuboCop::Cop::FormulaAudit::LivecheckSkip, RuboCop::Cop::FormulaAudit::LivecheckUrlProvided, RuboCop::Cop::FormulaAudit::LivecheckUrlSymbol, RuboCop::Cop::FormulaAudit::MacOSOnLinux, RuboCop::Cop::FormulaAudit::Miscellaneous, RuboCop::Cop::FormulaAudit::MpiCheck, RuboCop::Cop::FormulaAudit::OnSystemConditionals, RuboCop::Cop::FormulaAudit::OptionDeclarations, RuboCop::Cop::FormulaAudit::Options, RuboCop::Cop::FormulaAudit::Patches, RuboCop::Cop::FormulaAudit::ProvidedByMacos, RuboCop::Cop::FormulaAudit::PyPiUrls, RuboCop::Cop::FormulaAudit::PyoxidizerCheck, RuboCop::Cop::FormulaAudit::PythonVersions, RuboCop::Cop::FormulaAudit::QuicTLSCheck, RuboCop::Cop::FormulaAudit::ResourceRequiresDependencies, RuboCop::Cop::FormulaAudit::SafePopenCommands, RuboCop::Cop::FormulaAudit::Service, RuboCop::Cop::FormulaAudit::ShellVariables, RuboCop::Cop::FormulaAudit::SingleGenerateCompletionsDSLCall, RuboCop::Cop::FormulaAudit::Test, RuboCop::Cop::FormulaAudit::Text, RuboCop::Cop::FormulaAudit::Urls, RuboCop::Cop::FormulaAudit::UsesFromMacos, RuboCop::Cop::FormulaAudit::Version, RuboCop::Cop::FormulaAuditStrict::GitUrls, RuboCop::Cop::FormulaAuditStrict::MakeCheck, RuboCop::Cop::FormulaAuditStrict::Requirements, RuboCop::Cop::FormulaAuditStrict::RustCheck, RuboCop::Cop::FormulaAuditStrict::TestPresent, RuboCop::Cop::FormulaAuditStrict::Text

-
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - -
-

Instance Attribute Details

- - - -
-

- - #file_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'rubocops/extend/formula_cop.rb', line 17
-
-def file_path
-  @file_path
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #audit_commentsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Yields to a block with comment text as parameter.

- - -
-
-
- - -
- - - - -
-
-
-
-148
-149
-150
-151
-152
-153
-
-
# File 'rubocops/extend/formula_cop.rb', line 148
-
-def audit_comments
-  processed_source.comments.each do |comment_node|
-    @offensive_node = comment_node
-    yield comment_node.text
-  end
-end
-
-
- -
-

- - #audit_formula(node, class_node, parent_class_node, body_node) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::ClassNode) - - - -
  • - -
  • - - class_node - - - (RuboCop::AST::ConstNode) - - - -
  • - -
  • - - parent_class_node - - - (RuboCop::AST::ConstNode) - - - -
  • - -
  • - - body_node - - - (RuboCop::AST::Node) - - - -
  • - -
- - -
- - - - -
-
-
-
-42
-
-
# File 'rubocops/extend/formula_cop.rb', line 42
-
-def audit_formula(node, class_node, parent_class_node, body_node); end
-
-
- -
-

- - #audit_urls(urls, regex) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Yields to block when there is a match.

- - -
-
-
-

Parameters:

-
    - -
  • - - urls - - - (Array) - - - - — -

    url/mirror method call nodes

    -
    - -
  • - -
  • - - regex - - - (Regexp) - - - - — -

    pattern to match URLs

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'rubocops/extend/formula_cop.rb', line 48
-
-def audit_urls(urls, regex)
-  urls.each_with_index do |url_node, index|
-    url_string_node = parameters(url_node).first
-    url_string = string_content(url_string_node)
-    match_object = regex_match_group(url_string_node, regex)
-    next unless match_object
-
-    offending_node(url_string_node.parent)
-    yield match_object, url_string, index
-  end
-end
-
-
- -
-

- - #caveats_stringsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return all the caveats' string nodes in an array.

- - -
-
-
- - -
- - - - -
-
-
-
-119
-120
-121
-122
-123
-
-
# File 'rubocops/extend/formula_cop.rb', line 119
-
-def caveats_strings
-  return [] if @body.nil?
-
-  find_strings(find_method_def(@body, :caveats))
-end
-
-
- -
-

- - #dependency_name_hash_match?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_cop.rbi', line 17
-
-def dependency_name_hash_match?(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #dependency_type_hash_match?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_cop.rbi', line 27
-
-def dependency_type_hash_match?(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #depends_on?(dependency_name, *types) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns if the formula depends on dependency_name.

- - -
-
-
-

Parameters:

-
    - -
  • - - dependency_name - - - - - - - — -

    dependency's name

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-
-
# File 'rubocops/extend/formula_cop.rb', line 63
-
-def depends_on?(dependency_name, *types)
-  return false if @body.nil?
-
-  types = [:any] if types.empty?
-  dependency_nodes = find_every_method_call_by_name(@body, :depends_on)
-  idx = dependency_nodes.index do |n|
-    types.any? { |type| depends_on_name_type?(n, dependency_name, type) }
-  end
-  return false if idx.nil?
-
-  @offensive_node = dependency_nodes[idx]
-
-  true
-end
-
-
- -
-

- - #depends_on_name_type?(node, name = nil, type = :required) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- TODO: -

Add case where key of hash is an array

-
-
- -

Returns true if given dependency name and dependency type exist in given dependency method call node.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-
-
# File 'rubocops/extend/formula_cop.rb', line 80
-
-def depends_on_name_type?(node, name = nil, type = :required)
-  name_match = !name # Match only by type when name is nil
-
-  case type
-  when :required
-    type_match = required_dependency?(node)
-    name_match ||= required_dependency_name?(node, name) if type_match
-  when :build, :test, :optional, :recommended
-    type_match = dependency_type_hash_match?(node, type)
-    name_match ||= dependency_name_hash_match?(node, name) if type_match
-  when :any
-    type_match = true
-    name_match ||= required_dependency_name?(node, name)
-    name_match ||= dependency_name_hash_match?(node, name)
-  else
-    type_match = false
-  end
-
-  @offensive_node = node if type_match || name_match
-  type_match && name_match
-end
-
-
- -
-

- - #formula_tapObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the formula tap.

- - -
-
-
- - -
- - - - -
-
-
-
-161
-162
-163
-164
-165
-
-
# File 'rubocops/extend/formula_cop.rb', line 161
-
-def formula_tap
-  return unless (match_obj = @file_path.match(%r{/(homebrew-\w+)/}))
-
-  match_obj[1]
-end
-
-
- -
-

- - #get_checksum_node(call) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the sha256 str node given a sha256 call node.

- - -
-
-
- - -
- - - - -
-
-
-
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-
-
# File 'rubocops/extend/formula_cop.rb', line 126
-
-def get_checksum_node(call)
-  return if parameters(call).empty? || parameters(call).nil?
-
-  if parameters(call).first.str_type?
-    parameters(call).first
-  # sha256 is passed as a key-value pair in bottle blocks
-  elsif parameters(call).first.hash_type?
-    if parameters(call).first.keys.first.value == :cellar
-      # sha256 :cellar :any, :tag "hexdigest"
-      parameters(call).first.values.last
-    elsif parameters(call).first.keys.first.is_a?(RuboCop::AST::SymbolNode)
-      # sha256 :tag "hexdigest"
-      parameters(call).first.values.first
-    else
-      # Legacy bottle block syntax
-      # sha256 "hexdigest" => :tag
-      parameters(call).first.keys.first
-    end
-  end
-end
-
-
- -
-

- - #on_class(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method is called by RuboCop and is the main entry point.

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'rubocops/extend/formula_cop.rb', line 22
-
-def on_class(node)
-  @file_path = processed_source.file_path
-  return unless file_path_allowed?
-  return unless formula_class?(node)
-
-  class_node, parent_class_node, @body = *node
-  @formula_name = Pathname.new(@file_path).basename(".rb").to_s
-  @tap_style_exceptions = nil
-  audit_formula(node, class_node, parent_class_node, @body)
-end
-
-
- -
-

- - #required_dependency?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_cop.rbi', line 37
-
-def required_dependency?(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #required_dependency_name?(node, *pattern, **kwargs, &block) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/formula_cop.rbi', line 47
-
-def required_dependency_name?(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #style_exceptions_dirObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the style exceptions directory from the file path.

- - -
-
-
- - -
- - - - -
-
-
-
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-
-
# File 'rubocops/extend/formula_cop.rb', line 168
-
-def style_exceptions_dir
-  file_directory = File.dirname(@file_path)
-
-  # if we're in a sharded subdirectory, look below that.
-  directory_name = File.basename(file_directory)
-  formula_directory = if directory_name.length == 1 || directory_name == "lib"
-    File.dirname(file_directory)
-  else
-    file_directory
-  end
-
-  # if we're in a Formula or HomebrewFormula subdirectory, look below that.
-  formula_directory_names = ["Formula", "HomebrewFormula"].freeze
-  directory_name = File.basename(formula_directory)
-  tap_root_directory = if formula_directory_names.include?(directory_name)
-    File.dirname(formula_directory)
-  else
-    formula_directory
-  end
-
-  "#{tap_root_directory}/style_exceptions"
-end
-
-
- -
-

- - #tap_style_exception?(list, formula = nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns whether the given formula exists in the given style exception list. -Defaults to the current formula being checked.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-
-
# File 'rubocops/extend/formula_cop.rb', line 193
-
-def tap_style_exception?(list, formula = nil)
-  if @tap_style_exceptions.nil? && !formula_tap.nil?
-    @tap_style_exceptions = {}
-
-    Pathname.glob("#{style_exceptions_dir}/*.json").each do |exception_file|
-      list_name = exception_file.basename.to_s.chomp(".json").to_sym
-      list_contents = begin
-        JSON.parse exception_file.read
-      rescue JSON::ParserError
-        nil
-      end
-      next if list_contents.nil? || list_contents.count.zero?
-
-      @tap_style_exceptions[list_name] = list_contents
-    end
-  end
-
-  return false if @tap_style_exceptions.nil? || @tap_style_exceptions.count.zero?
-  return false unless @tap_style_exceptions.key? list
-
-  @tap_style_exceptions[list].include?(formula || @formula_name)
-end
-
-
- -
-

- - #versioned_formula?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns true if the formula is versioned.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-156
-157
-158
-
-
# File 'rubocops/extend/formula_cop.rb', line 156
-
-def versioned_formula?
-  @formula_name.include?("@")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/HelperFunctions.html b/docs/RuboCop/Cop/HelperFunctions.html deleted file mode 100644 index b30781964..000000000 --- a/docs/RuboCop/Cop/HelperFunctions.html +++ /dev/null @@ -1,3099 +0,0 @@ - - - - - - - Module: RuboCop::Cop::HelperFunctions - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::HelperFunctions - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel, RangeHelp
-
- - - - -
-
Included in:
-
Cask::HomepageUrlTrailingSlash, Cask::UninstallMethodsOrder, DescHelper, FormulaCop, RuboCop::Cop::Homebrew::ExecShellMetacharacters, RuboCop::Cop::Homebrew::ShellCommands, OnSystemConditionalsHelper
-
- - - -
-
Defined in:
-
rubocops/shared/helper_functions.rb,
- rubocops/shared/helper_functions.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - -
-

Instance Method Details

- - -
-

- - #block_method_called_in_block?(node, method_name) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if a block method is called inside a block.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-
-
# File 'rubocops/shared/helper_functions.rb', line 302
-
-def block_method_called_in_block?(node, method_name)
-  node.body.each_child_node do |call_node|
-    next if !call_node.block_type? && !call_node.send_type?
-    next if call_node.method_name != method_name
-
-    @offensive_node = call_node
-    return true
-  end
-  false
-end
-
-
- -
-

- - #block_size(block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the block length of the block node.

- - -
-
-
- - -
- - - - -
-
-
-
-410
-411
-412
-
-
# File 'rubocops/shared/helper_functions.rb', line 410
-
-def block_size(block)
-  block.loc.end.line - block.loc.begin.line
-end
-
-
- -
-

- - #check_precedence(first_nodes, next_nodes) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks for precedence; returns the first pair of precedence-violating nodes.

- - -
-
-
- - -
- - - - -
-
-
-
-341
-342
-343
-344
-345
-346
-347
-348
-
-
# File 'rubocops/shared/helper_functions.rb', line 341
-
-def check_precedence(first_nodes, next_nodes)
-  next_nodes.each do |each_next_node|
-    first_nodes.each do |each_first_node|
-      return [each_first_node, each_next_node] if component_precedes?(each_first_node, each_next_node)
-    end
-  end
-  nil
-end
-
-
- -
-

- - #class_name(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the class node's name, or nil if not a class node.

- - -
-
-
- - -
- - - - -
-
-
-
-394
-395
-396
-397
-
-
# File 'rubocops/shared/helper_functions.rb', line 394
-
-def class_name(node)
-  @offensive_node = node
-  node.const_name
-end
-
-
- -
-

- - #component_precedes?(first_node, next_node) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

If first node does not precede next_node, sets appropriate instance variables for reporting.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-351
-352
-353
-354
-355
-356
-
-
# File 'rubocops/shared/helper_functions.rb', line 351
-
-def component_precedes?(first_node, next_node)
-  return false if line_number(first_node) < line_number(next_node)
-
-  @offensive_node = first_node
-  true
-end
-
-
- -
-

- - #end_column(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the ending position of the node in source code.

- - -
-
-
- - -
- - - - -
-
-
-
-389
-390
-391
-
-
# File 'rubocops/shared/helper_functions.rb', line 389
-
-def end_column(node)
-  node.source_range.end_pos
-end
-
-
- -
-

- - #expression_negated?(node) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if negation is present in the given node.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-359
-360
-361
-362
-363
-364
-
-
# File 'rubocops/shared/helper_functions.rb', line 359
-
-def expression_negated?(node)
-  return false unless node.parent&.send_type?
-  return false unless node.parent.method_name.equal?(:!)
-
-  offending_node(node.parent)
-end
-
-
- -
-

- - #find_all_blocks(node, block_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns an array of block nodes of any depth below node in AST. -If a block is given then yields matching block node to the block!

- - -
-
-
- - -
- - - - -
-
-
-
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-
-
# File 'rubocops/shared/helper_functions.rb', line 270
-
-def find_all_blocks(node, block_name)
-  return if node.nil?
-
-  blocks = node.each_descendant(:block).select { |block_node| block_name == block_node.method_name }
-  return blocks unless block_given?
-
-  blocks.each do |block_node|
-    offending_node(block_node)
-    yield block_node
-  end
-end
-
-
- -
-

- - #find_block(node, block_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a block named block_name inside node.

- - -
-
-
- - -
- - - - -
-
-
-
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-
-
# File 'rubocops/shared/helper_functions.rb', line 247
-
-def find_block(node, block_name)
-  return if node.nil?
-
-  node.each_child_node(:block) do |block_node|
-    next if block_node.method_name != block_name
-
-    @offensive_node = block_node
-    return block_node
-  end
-  # If not found then, parent node becomes the offensive node
-  @offensive_node = node.parent
-  nil
-end
-
-
- -
-

- - #find_blocks(node, block_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns an array of block nodes named block_name inside node.

- - -
-
-
- - -
- - - - -
-
-
-
-262
-263
-264
-265
-266
-
-
# File 'rubocops/shared/helper_functions.rb', line 262
-
-def find_blocks(node, block_name)
-  return if node.nil?
-
-  node.each_child_node(:block).select { |block_node| block_name == block_node.method_name }
-end
-
-
- -
-

- - #find_const(node, const_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Find CONSTANTs in the source. -If block given, yield matching nodes.

- - -
-
-
- - -
- - - - -
-
-
-
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-
-
# File 'rubocops/shared/helper_functions.rb', line 228
-
-def find_const(node, const_name)
-  return if node.nil?
-
-  node.each_descendant(:const) do |const_node|
-    next if const_node.const_name != const_name
-
-    @offensive_node = const_node
-    yield const_node if block_given?
-    return true
-  end
-  nil
-end
-
-
- -
-

- - #find_every_func_call_by_name(node, func_name = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns array of function call nodes matching func_name in every descendant of node.

- -
    -
  • matches function call: foo(*args, **kwargs)
  • -
  • does not match method calls: foo.bar(*args, **kwargs)
  • -
  • returns every function call if no func_name is passed
  • -
- - -
-
-
- - -
- - - - -
-
-
-
-155
-156
-157
-158
-159
-160
-161
-
-
# File 'rubocops/shared/helper_functions.rb', line 155
-
-def find_every_func_call_by_name(node, func_name = nil)
-  return if node.nil?
-
-  node.each_descendant(:send).select do |func_node|
-    func_node.receiver.nil? && (func_name.nil? || func_name == func_node.method_name)
-  end
-end
-
-
- -
-

- - #find_every_method_call_by_name(node, method_name = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns an array of method call nodes matching method_name in every descendant of node. -Returns every method call if no method_name is passed.

- - -
-
-
- - -
- - - - -
-
-
-
-141
-142
-143
-144
-145
-146
-147
-148
-
-
# File 'rubocops/shared/helper_functions.rb', line 141
-
-def find_every_method_call_by_name(node, method_name = nil)
-  return if node.nil?
-
-  node.each_descendant(:send).select do |method_node|
-    method_name.nil? ||
-      method_name == method_node.method_name
-  end
-end
-
-
- -
-

- - #find_instance_call(node, name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Matches receiver part of method. Yields to a block with parent node of receiver.

- -

Example

- -

Match ARGV.<whatever>().

- -
find_instance_call(node, "ARGV")
-
- - -
-
-
- - -
- - - - -
-
-
-
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-
-
# File 'rubocops/shared/helper_functions.rb', line 213
-
-def find_instance_call(node, name)
-  node.each_descendant(:send) do |method_node|
-    next if method_node.receiver.nil?
-    next if method_node.receiver.const_name != name &&
-            !(method_node.receiver.send_type? && method_node.receiver.method_name == name)
-
-    @offensive_node = method_node.receiver
-    return true unless block_given?
-
-    yield method_node
-  end
-end
-
-
- -
-

- - #find_instance_method_call(node, instance, method_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Matches a method with a receiver. Yields to a block with matching method node.

- -

Examples

- -

Match Formula.factory(name).

- -
find_instance_method_call(node, "Formula", :factory)
-
- -

Match build.head?.

- -
find_instance_method_call(node, :build, :head?)
-
- - -
-
-
- - -
- - - - -
-
-
-
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-
-
# File 'rubocops/shared/helper_functions.rb', line 190
-
-def find_instance_method_call(node, instance, method_name)
-  methods = find_every_method_call_by_name(node, method_name)
-  methods.each do |method|
-    next if method.receiver.nil?
-    next if method.receiver.const_name != instance &&
-            !(method.receiver.send_type? && method.receiver.method_name == instance)
-
-    @offensive_node = method
-    return true unless block_given?
-
-    yield method
-  end
-end
-
-
- -
-

- - #find_method_calls_by_name(node, method_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns an array of method call nodes matching method_name inside node with depth first order (child nodes).

- - -
-
-
- - -
- - - - -
-
-
-
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-
-
# File 'rubocops/shared/helper_functions.rb', line 128
-
-def find_method_calls_by_name(node, method_name)
-  return if node.nil?
-
-  nodes = node.each_child_node(:send).select { |method_node| method_name == method_node.method_name }
-
-  # The top level node can be a method
-  nodes << node if node.send_type? && node.method_name == method_name
-
-  nodes
-end
-
-
- -
-

- - #find_method_def(node, method_name = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a method definition node with method_name. -Returns first method def if method_name is nil.

- - -
-
-
- - -
- - - - -
-
-
-
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-
-
# File 'rubocops/shared/helper_functions.rb', line 284
-
-def find_method_def(node, method_name = nil)
-  return if node.nil?
-
-  node.each_child_node(:def) do |def_node|
-    def_method_name = method_name(def_node)
-    next if method_name != def_method_name && method_name.present?
-
-    @offensive_node = def_node
-    return def_node
-  end
-  return if node.parent.nil?
-
-  # If not found then, parent node becomes the offensive node
-  @offensive_node = node.parent
-  nil
-end
-
-
- -
-

- - #find_method_with_args(node, method_name, *args) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Given a method_name and arguments, yields to a block with -matching method passed as a parameter to the block.

- - -
-
-
- - -
- - - - -
-
-
-
-165
-166
-167
-168
-169
-170
-171
-172
-173
-
-
# File 'rubocops/shared/helper_functions.rb', line 165
-
-def find_method_with_args(node, method_name, *args)
-  methods = find_every_method_call_by_name(node, method_name)
-  methods.each do |method|
-    next unless parameters_passed?(method, args)
-    return true unless block_given?
-
-    yield method
-  end
-end
-
-
- -
-

- - #find_node_method_by_name(node, method_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns method_node matching method_name.

- - -
-
-
- - -
- - - - -
-
-
-
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-
-
# File 'rubocops/shared/helper_functions.rb', line 106
-
-def find_node_method_by_name(node, method_name)
-  return if node.nil?
-
-  node.each_child_node(:send) do |method_node|
-    next if method_node.method_name != method_name
-
-    @offensive_node = method_node
-    return method_node
-  end
-  # If not found then, parent node becomes the offensive node
-  @offensive_node = node.parent
-  nil
-end
-
-
- -
-

- - #find_strings(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns all string nodes among the descendants of given node.

- - -
-
-
- - -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-103
-
-
# File 'rubocops/shared/helper_functions.rb', line 98
-
-def find_strings(node)
-  return [] if node.nil?
-  return [node] if node.str_type?
-
-  node.each_descendant(:str)
-end
-
-
- -
-

- - #format_component(component_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns printable component name.

- - -
-
-
- - -
- - - - -
-
-
-
-415
-416
-417
-418
-419
-
-
# File 'rubocops/shared/helper_functions.rb', line 415
-
-def format_component(component_node)
-  return component_node.method_name if component_node.send_type? || component_node.block_type?
-
-  method_name(component_node) if component_node.def_type?
-end
-
-
- -
-

- - #line_number(node) ⇒ Integer - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the line number of the node.

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'rubocops/shared/helper_functions.rb', line 51
-
-def line_number(node)
-  node.loc.line
-end
-
-
- -
-

- - #line_start_column(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the begin position of the node's line in source code.

- - -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-
-
# File 'rubocops/shared/helper_functions.rb', line 40
-
-def line_start_column(node)
-  node.source_range.source_buffer.line_range(node.loc.line).begin_pos
-end
-
-
- -
-

- - #method_called?(node, method_name) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if method_name is called among the direct children nodes in the given node. -Check if the node itself is the method.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-
-
# File 'rubocops/shared/helper_functions.rb', line 315
-
-def method_called?(node, method_name)
-  if node.send_type? && node.method_name == method_name
-    offending_node(node)
-    return true
-  end
-  node.each_child_node(:send) do |call_node|
-    next if call_node.method_name != method_name
-
-    offending_node(call_node)
-    return true
-  end
-  false
-end
-
-
- -
-

- - #method_called_ever?(node, method_name) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if method_name is called among every descendant node of given node.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-330
-331
-332
-333
-334
-335
-336
-337
-338
-
-
# File 'rubocops/shared/helper_functions.rb', line 330
-
-def method_called_ever?(node, method_name)
-  node.each_descendant(:send) do |call_node|
-    next if call_node.method_name != method_name
-
-    @offensive_node = call_node
-    return true
-  end
-  false
-end
-
-
- -
-

- - #method_name(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the method name for a def node.

- - -
-
-
- - -
- - - - -
-
-
-
-400
-401
-402
-
-
# File 'rubocops/shared/helper_functions.rb', line 400
-
-def method_name(node)
-  node.children[0] if node.def_type?
-end
-
-
- -
-

- - #node_equals?(node, var) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

To compare node with appropriate Ruby variable.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-242
-243
-244
-
-
# File 'rubocops/shared/helper_functions.rb', line 242
-
-def node_equals?(node, var)
-  node == Parser::CurrentRuby.parse(var.inspect)
-end
-
-
- -
-

- - #offending_node(node = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets/sets the given node as the offending node when required in custom cops.

- - -
-
-
- - -
- - - - -
-
-
-
-121
-122
-123
-124
-125
-
-
# File 'rubocops/shared/helper_functions.rb', line 121
-
-def offending_node(node = nil)
-  return @offensive_node if node.nil?
-
-  @offensive_node = node
-end
-
-
- -
-

- - #parameters(method_node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the array of arguments of the method_node.

- - -
-
-
- - -
- - - - -
-
-
-
-367
-368
-369
-
-
# File 'rubocops/shared/helper_functions.rb', line 367
-
-def parameters(method_node)
-  method_node.arguments if method_node.send_type? || method_node.block_type?
-end
-
-
- -
-

- - #parameters_passed?(method_node, params) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns true if the given parameters are present in method call -and sets the method call as the offending node. -Params can be string, symbol, array, hash, matching regex.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-
-
# File 'rubocops/shared/helper_functions.rb', line 374
-
-def parameters_passed?(method_node, params)
-  method_params = parameters(method_node)
-  @offensive_node = method_node
-  params.all? do |given_param|
-    method_params.any? do |method_param|
-      if given_param.instance_of?(Regexp)
-        regex_match_group(method_param, given_param)
-      else
-        node_equals?(method_param, given_param)
-      end
-    end
-  end
-end
-
-
- -
-

- - #problem(msg, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-93
-94
-95
-
-
# File 'rubocops/shared/helper_functions.rb', line 93
-
-def problem(msg, &block)
-  add_offense(@offensive_node, message: msg, &block)
-end
-
-
- -
-

- - #regex_match_group(node, pattern) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Checks for regex match of pattern in the node and -sets the appropriate instance variables to report the match.

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'rubocops/shared/helper_functions.rb', line 19
-
-def regex_match_group(node, pattern)
-  string_repr = string_content(node).encode("UTF-8", invalid: :replace)
-  match_object = string_repr.match(pattern)
-  return unless match_object
-
-  node_begin_pos = start_column(node)
-  line_begin_pos = line_start_column(node)
-  @column = if node_begin_pos == line_begin_pos
-    node_begin_pos + match_object.begin(0) - line_begin_pos
-  else
-    node_begin_pos + match_object.begin(0) - line_begin_pos + 1
-  end
-  @length = match_object.to_s.length
-  @line_no = line_number(node)
-  @source_buf = source_buffer(node)
-  @offensive_node = node
-  @offensive_source_range = source_range(@source_buf, @line_no, @column, @length)
-  match_object
-end
-
-
- -
-

- - #size(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the node size in the source code.

- - -
-
-
- - -
- - - - -
-
-
-
-405
-406
-407
-
-
# File 'rubocops/shared/helper_functions.rb', line 405
-
-def size(node)
-  node.source_range.size
-end
-
-
- -
-

- - #source_buffer(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Source buffer is required as an argument to report style violations.

- - -
-
-
- - -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'rubocops/shared/helper_functions.rb', line 56
-
-def source_buffer(node)
-  node.source_range.source_buffer
-end
-
-
- -
-

- - #start_column(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the begin position of the node in source code.

- - -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-
-
# File 'rubocops/shared/helper_functions.rb', line 45
-
-def start_column(node)
-  node.source_range.begin_pos
-end
-
-
- -
-

- - #string_content(node, strip_dynamic: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the string representation if node is of type str(plain) or dstr(interpolated) or const.

- - -
-
-
- - -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-
-
# File 'rubocops/shared/helper_functions.rb', line 61
-
-def string_content(node, strip_dynamic: false)
-  case node.type
-  when :str
-    node.str_content
-  when :dstr
-    content = ""
-    node.each_child_node(:str, :begin) do |child|
-      content += if child.begin_type?
-        strip_dynamic ? "" : child.source
-      else
-        child.str_content
-      end
-    end
-    content
-  when :send
-    if node.method?(:+) && (node.receiver.str_type? || node.receiver.dstr_type?)
-      content = string_content(node.receiver)
-      arg = node.arguments.first
-      content += string_content(arg) if arg
-      content
-    else
-      ""
-    end
-  when :const
-    node.const_name
-  when :sym
-    node.children.first.to_s
-  else
-    ""
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew.html b/docs/RuboCop/Cop/Homebrew.html deleted file mode 100644 index 0ef494605..000000000 --- a/docs/RuboCop/Cop/Homebrew.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: RuboCop::Cop::Homebrew - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::Homebrew - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/blank.rb,
- rubocops/io_read.rb,
rubocops/present.rb,
rubocops/presence.rb,
rubocops/compact_blank.rb,
rubocops/negate_include.rb,
rubocops/shell_commands.rb,
rubocops/move_to_extend_os.rb,
rubocops/install_bundler_gems.rb,
rubocops/safe_navigation_with_blank.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Blank, CompactBlank, ExecShellMetacharacters, IORead, InstallBundlerGems, MoveToExtendOS, NegateInclude, Presence, Present, SafeNavigationWithBlank, ShellCommands - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/Blank.html b/docs/RuboCop/Cop/Homebrew/Blank.html deleted file mode 100644 index aad0aace2..000000000 --- a/docs/RuboCop/Cop/Homebrew/Blank.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::Blank - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::Blank - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/blank.rb,
- sorbet/rbi/dsl/rubo_cop/cop/homebrew/blank.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- -
- Note: -

Auto-correction for this cop is unsafe because ' '.empty? returns false, -but ' '.blank? returns true. Therefore, auto-correction is not compatible -if the receiver is a non-empty blank string.

-
-
- -

Checks for code that can be simplified using Object#blank?.

- -

Example

- -
# bad
-foo.nil? || foo.empty?
-foo == nil || foo.empty?
-
-# good
-foo.blank?
-
- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Use `%<prefer>s` instead of `%<current>s`."
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #nil_or_empty?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/blank.rbi', line 10
-
-def nil_or_empty?(node, **kwargs, &block); end
-
-
- -
-

- - #on_or(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# File 'rubocops/blank.rb', line 47
-
-def on_or(node)
-  nil_or_empty?(node) do |var1, var2|
-    return if var1 != var2
-
-    message = format(MSG, prefer: replacement(var1), current: node.source)
-    add_offense(node, message:) do |corrector|
-      autocorrect(corrector, node)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/CompactBlank.html b/docs/RuboCop/Cop/Homebrew/CompactBlank.html deleted file mode 100644 index 34a7608cd..000000000 --- a/docs/RuboCop/Cop/Homebrew/CompactBlank.html +++ /dev/null @@ -1,554 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::CompactBlank - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::CompactBlank - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
RangeHelp
-
- - - - - - -
-
Defined in:
-
rubocops/compact_blank.rb,
- sorbet/rbi/dsl/rubo_cop/cop/homebrew/compact_blank.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- -
- Note: -

It is unsafe by default because false positives may occur in the -blank check of block arguments to the receiver object.

- -

For example, [[1, 2], [3, nil]].reject { |first, second| second.blank? } and -[[1, 2], [3, nil]].compact_blank are not compatible. The same is true for blank?. -This will work fine when the receiver is a hash object.

- -

And compact_blank! has different implementations for Array, Hash and -ActionController::Parameters. -Array#compact_blank!, Hash#compact_blank! are equivalent to delete_if(&:blank?). -ActionController::Parameters#compact_blank! is equivalent to reject!(&:blank?). -If the cop makes a mistake, autocorrected code may get unexpected behavior.

-
-
- -

Checks if collection can be blank-compacted with compact_blank.

- -

Examples

- -
# bad
-collection.reject(&:blank?)
-collection.reject { |_k, v| v.blank? }
-
-# good
-collection.compact_blank
-
- -
# bad
-collection.delete_if(&:blank?)           # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!`
-collection.delete_if { |_, v| v.blank? } # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!`
-collection.reject!(&:blank?)             # Same behavior as `ActionController::Parameters#compact_blank!`
-collection.reject! { |_k, v| v.blank? }  # Same behavior as `ActionController::Parameters#compact_blank!`
-
-# good
-collection.compact_blank!
-
- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Use `%<preferred_method>s` instead."
- -
RESTRICT_ON_SEND = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:reject, :delete_if, :reject!].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - -
-

Instance Method Details

- - -
-

- - #on_send(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# File 'rubocops/compact_blank.rb', line 65
-
-def on_send(node)
-  return unless bad_method?(node)
-
-  range = offense_range(node)
-  preferred_method = preferred_method(node)
-  add_offense(range, message: format(MSG, preferred_method:)) do |corrector|
-    corrector.replace(range, preferred_method)
-  end
-end
-
-
- -
-

- - #reject_with_block?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/compact_blank.rbi', line 10
-
-def reject_with_block?(node, **kwargs, &block); end
-
-
- -
-

- - #reject_with_block_pass?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/compact_blank.rbi', line 13
-
-def reject_with_block_pass?(node, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/ExecShellMetacharacters.html b/docs/RuboCop/Cop/Homebrew/ExecShellMetacharacters.html deleted file mode 100644 index 9003e2dd8..000000000 --- a/docs/RuboCop/Cop/Homebrew/ExecShellMetacharacters.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::ExecShellMetacharacters - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::ExecShellMetacharacters - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
RuboCop::Cop::HelperFunctions
-
- - - - - - -
-
Defined in:
-
rubocops/shell_commands.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop disallows shell metacharacters in exec calls.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Don't use shell metacharacters in `exec`. " \
-"Implement the logic in Ruby instead, using methods like `$stdout.reopen`."
- -
RESTRICT_ON_SEND = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:exec].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from RuboCop::Cop::HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - -
-

Instance Method Details

- - -
-

- - #on_send(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-
-
# File 'rubocops/shell_commands.rb', line 122
-
-def on_send(node)
-  return if node.receiver.present? && node.receiver != s(:const, nil, :Kernel)
-  return if node.arguments.count != 1
-
-  stripped_arg_str = string_content(node.arguments.first, strip_dynamic: true)
-  command = string_content(node.arguments.first).shellsplit.first
-
-  return if SHELL_BUILTINS.none?(command) &&
-            !command&.include?("=") &&
-            SHELL_METACHARACTERS.none? { |meta| stripped_arg_str.include?(meta) }
-
-  add_offense(node.arguments.first, message: MSG)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/IORead.html b/docs/RuboCop/Cop/Homebrew/IORead.html deleted file mode 100644 index a3ea90a1c..000000000 --- a/docs/RuboCop/Cop/Homebrew/IORead.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::IORead - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::IORead - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/io_read.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop restricts usage of IO.read functions for security reasons.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"The use of `IO.%<method>s` is a security risk."
- -
RESTRICT_ON_SEND = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:read, :readlines].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Instance Method Details

- - -
-

- - #on_send(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-
-
# File 'rubocops/io_read.rb', line 13
-
-def on_send(node)
-  return if node.receiver != s(:const, nil, :IO)
-  return if safe?(node.arguments.first)
-
-  add_offense(node, message: format(MSG, method: node.method_name))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/InstallBundlerGems.html b/docs/RuboCop/Cop/Homebrew/InstallBundlerGems.html deleted file mode 100644 index 6ca289e7c..000000000 --- a/docs/RuboCop/Cop/Homebrew/InstallBundlerGems.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::InstallBundlerGems - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::InstallBundlerGems - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/install_bundler_gems.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Enforces the use of Homebrew.install_bundler_gems! in dev-cmd.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Only use `Homebrew.install_bundler_gems!` in dev-cmd."
- -
RESTRICT_ON_SEND = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:install_bundler_gems!].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Instance Method Details

- - -
-

- - #on_send(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-
-
# File 'rubocops/install_bundler_gems.rb', line 12
-
-def on_send(node)
-  file_path = processed_source.file_path
-  return if file_path.match?(%r{/(dev-cmd/.+|standalone/init|startup/bootsnap)\.rb\z})
-
-  add_offense(node)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/MoveToExtendOS.html b/docs/RuboCop/Cop/Homebrew/MoveToExtendOS.html deleted file mode 100644 index 1d445e197..000000000 --- a/docs/RuboCop/Cop/Homebrew/MoveToExtendOS.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::MoveToExtendOS - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::MoveToExtendOS - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
rubocops/move_to_extend_os.rb,
- sorbet/rbi/dsl/rubo_cop/cop/homebrew/move_to_extend_os.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop ensures that platform specific code ends up in extend/os.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Move `OS.linux?` and `OS.mac?` calls to `extend/os`."
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Instance Method Details

- - -
-

- - #on_send(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-
-
# File 'rubocops/move_to_extend_os.rb', line 15
-
-def on_send(node)
-  return unless os_check?(node)
-
-  add_offense(node)
-end
-
-
- -
-

- - #os_check?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/move_to_extend_os.rbi', line 10
-
-def os_check?(node, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/NegateInclude.html b/docs/RuboCop/Cop/Homebrew/NegateInclude.html deleted file mode 100644 index 02d3e55f1..000000000 --- a/docs/RuboCop/Cop/Homebrew/NegateInclude.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::NegateInclude - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::NegateInclude - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/negate_include.rb,
- sorbet/rbi/dsl/rubo_cop/cop/homebrew/negate_include.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- -
- Note: -

This cop is unsafe because false positives will occur for -receiver objects that do not have an #exclude? method (e.g. IPAddr).

-
-
- -

Enforces the use of collection.exclude?(obj) -over !collection.include?(obj).

- -

Example

- -
# bad
-!array.include?(2)
-!hash.include?(:key)
-
-# good
-array.exclude?(2)
-hash.exclude?(:key)
-
- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Use `.exclude?` and remove the negation part."
- -
RESTRICT_ON_SEND = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:!].freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #negate_include_call?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/negate_include.rbi', line 10
-
-def negate_include_call?(node, **kwargs, &block); end
-
-
- -
-

- - #on_send(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'rubocops/negate_include.rb', line 35
-
-def on_send(node)
-  return unless (receiver, obj = negate_include_call?(node))
-
-  add_offense(node) do |corrector|
-    corrector.replace(node, "#{receiver.source}.exclude?(#{obj.source})")
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/Presence.html b/docs/RuboCop/Cop/Homebrew/Presence.html deleted file mode 100644 index f9b75e375..000000000 --- a/docs/RuboCop/Cop/Homebrew/Presence.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::Presence - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::Presence - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
RangeHelp
-
- - - - - - -
-
Defined in:
-
rubocops/presence.rb,
- sorbet/rbi/dsl/rubo_cop/cop/homebrew/presence.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Checks code that can be written more easily using -Object#presence defined by Active Support.

- -

Examples

- -
# bad
-a.present? ? a : nil
-
-# bad
-!a.present? ? nil : a
-
-# bad
-a.blank? ? nil : a
-
-# bad
-!a.blank? ? a : nil
-
-# good
-a.presence
-
- -
# bad
-a.present? ? a : b
-
-# bad
-!a.present? ? b : a
-
-# bad
-a.blank? ? b : a
-
-# bad
-!a.blank? ? a : b
-
-# good
-a.presence || b
-
- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Use `%<prefer>s` instead of `%<current>s`."
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - -
-

Instance Method Details

- - -
-

- - #on_if(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'rubocops/presence.rb', line 81
-
-def on_if(node)
-  return if ignore_if_node?(node)
-
-  redundant_receiver_and_other(node) do |receiver, other|
-    return if ignore_other_node?(other) || receiver.nil?
-
-    register_offense(node, receiver, other)
-  end
-
-  redundant_negative_receiver_and_other(node) do |receiver, other|
-    return if ignore_other_node?(other) || receiver.nil?
-
-    register_offense(node, receiver, other)
-  end
-end
-
-
- -
-

- - #redundant_negative_receiver_and_other(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/presence.rbi', line 10
-
-def redundant_negative_receiver_and_other(node, **kwargs, &block); end
-
-
- -
-

- - #redundant_receiver_and_other(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/presence.rbi', line 13
-
-def redundant_receiver_and_other(node, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/Present.html b/docs/RuboCop/Cop/Homebrew/Present.html deleted file mode 100644 index d81dfaf12..000000000 --- a/docs/RuboCop/Cop/Homebrew/Present.html +++ /dev/null @@ -1,542 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::Present - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::Present - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/present.rb,
- sorbet/rbi/dsl/rubo_cop/cop/homebrew/present.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Checks for code that can be simplified using Object#present?.

- -

Example

- -
# bad
-!foo.nil? && !foo.empty?
-
-# bad
-foo != nil && !foo.empty?
-
-# good
-foo.present?
-
- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Use `%<prefer>s` instead of `%<current>s`."
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #autocorrect(corrector, node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-
-
# File 'rubocops/present.rb', line 62
-
-def autocorrect(corrector, node)
-  variable1, _variable2 = exists_and_not_empty?(node)
-  range = node.source_range
-  corrector.replace(range, replacement(variable1))
-end
-
-
- -
-

- - #exists_and_not_empty?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/present.rbi', line 10
-
-def exists_and_not_empty?(node, **kwargs, &block); end
-
-
- -
-

- - #on_and(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'rubocops/present.rb', line 40
-
-def on_and(node)
-  exists_and_not_empty?(node) do |var1, var2|
-    return if var1 != var2
-
-    message = format(MSG, prefer: replacement(var1), current: node.source)
-
-    add_offense(node, message:) do |corrector|
-      autocorrect(corrector, node)
-    end
-  end
-end
-
-
- -
-

- - #on_or(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'rubocops/present.rb', line 52
-
-def on_or(node)
-  exists_and_not_empty?(node) do |var1, var2|
-    return if var1 != var2
-
-    add_offense(node, message: MSG) do |corrector|
-      autocorrect(corrector, node)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/SafeNavigationWithBlank.html b/docs/RuboCop/Cop/Homebrew/SafeNavigationWithBlank.html deleted file mode 100644 index 8089a23f2..000000000 --- a/docs/RuboCop/Cop/Homebrew/SafeNavigationWithBlank.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::SafeNavigationWithBlank - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::SafeNavigationWithBlank - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - - - - - - -
-
Defined in:
-
rubocops/safe_navigation_with_blank.rb,
- sorbet/rbi/dsl/rubo_cop/cop/homebrew/safe_navigation_with_blank.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- -
- Note: -

While the safe navigation operator is generally a good idea, when -checking foo&.blank? in a conditional, foo being nil will actually -do the opposite of what the author intends:

- -
foo&.blank? #=> nil
-foo.blank? #=> true
-
-
-
- -

Checks to make sure safe navigation isn't used with blank? in -a conditional.

- -

Example

- -
# bad
-do_something if foo&.blank?
-do_something unless foo&.blank?
-
-# good
-do_something if foo.blank?
-do_something unless foo.blank?
-
- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Avoid calling `blank?` with the safe navigation operator in conditionals."
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #on_if(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'rubocops/safe_navigation_with_blank.rb', line 39
-
-def on_if(node)
-  return unless safe_navigation_blank_in_conditional?(node)
-
-  add_offense(node) do |corrector|
-    corrector.replace(safe_navigation_blank_in_conditional?(node).location.dot, ".")
-  end
-end
-
-
- -
-

- - #safe_navigation_blank_in_conditional?(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/safe_navigation_with_blank.rbi', line 10
-
-def safe_navigation_blank_in_conditional?(node, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/Homebrew/ShellCommands.html b/docs/RuboCop/Cop/Homebrew/ShellCommands.html deleted file mode 100644 index 570efe29a..000000000 --- a/docs/RuboCop/Cop/Homebrew/ShellCommands.html +++ /dev/null @@ -1,380 +0,0 @@ - - - - - - - Class: RuboCop::Cop::Homebrew::ShellCommands - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: RuboCop::Cop::Homebrew::ShellCommands - - - Private -

-
- -
-
Inherits:
-
- Base - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - -
-
Extended by:
-
AutoCorrector
-
- - - -
-
Includes:
-
RuboCop::Cop::HelperFunctions
-
- - - - - - -
-
Defined in:
-
rubocops/shell_commands.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

This cop makes sure that shell command arguments are separated.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
MSG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"Separate `%<method>s` commands into `%<good_args>s`"
- -
RESTRICT_ON_SEND = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
TARGET_METHODS.map(&:second).uniq.freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from RuboCop::Cop::HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - -
-

Instance Method Details

- - -
-

- - #on_send(node) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-
-
# File 'rubocops/shell_commands.rb', line 69
-
-def on_send(node)
-  TARGET_METHODS.each do |target_class, target_method|
-    next if node.method_name != target_method
-
-    target_receivers = if target_class.nil?
-      [nil, s(:const, nil, :Kernel), s(:const, nil, :Homebrew)]
-    else
-      [s(:const, nil, target_class)]
-    end
-    next unless target_receivers.include?(node.receiver)
-
-    first_arg = node.arguments.first
-    arg_count = node.arguments.count
-    if first_arg&.hash_type? # popen methods allow env hash
-      first_arg = node.arguments.second
-      arg_count -= 1
-    end
-    next if first_arg.nil? || arg_count >= 2
-
-    first_arg_str = string_content(first_arg)
-    stripped_first_arg_str = string_content(first_arg, strip_dynamic: true)
-
-    split_args = first_arg_str.shellsplit
-    next if split_args.count <= 1
-
-    # Only separate when no shell metacharacters are present
-    command = split_args.first
-    next if SHELL_BUILTINS.any?(command)
-    next if command&.include?("=")
-    next if SHELL_METACHARACTERS.any? { |meta| stripped_first_arg_str.include?(meta) }
-
-    good_args = split_args.map { |arg| "\"#{arg}\"" }.join(", ")
-    method_string = if target_class
-      "#{target_class}.#{target_method}"
-    else
-      target_method.to_s
-    end
-    add_offense(first_arg, message: format(MSG, method: method_string, good_args:)) do |corrector|
-      corrector.replace(first_arg.source_range, good_args)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/RuboCop/Cop/OnSystemConditionalsHelper.html b/docs/RuboCop/Cop/OnSystemConditionalsHelper.html deleted file mode 100644 index 7d7df9bc0..000000000 --- a/docs/RuboCop/Cop/OnSystemConditionalsHelper.html +++ /dev/null @@ -1,1694 +0,0 @@ - - - - - - - Module: RuboCop::Cop::OnSystemConditionalsHelper - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: RuboCop::Cop::OnSystemConditionalsHelper - - - Private -

-
- - - - -
-
Extended by:
-
NodePattern::Macros
-
- - - -
-
Includes:
-
HelperFunctions
-
- - - - -
-
Included in:
-
Cask::OnSystemConditionals, FormulaAudit::MacOSOnLinux, FormulaAudit::OnSystemConditionals
-
- - - -
-
Defined in:
-
rubocops/shared/on_system_conditionals_helper.rb,
- sorbet/rbi/dsl/rubo_cop/cop/on_system_conditionals_helper.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

This module performs common checks on on_{system} blocks in both formulae and casks.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
ARCH_OPTIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:arm, :intel].freeze
- -
BASE_OS_OPTIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:macos, :linux].freeze
- -
MACOS_VERSION_OPTIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
MacOSVersion::SYMBOLS.keys.freeze
- -
ON_SYSTEM_OPTIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[*ARCH_OPTIONS, *BASE_OS_OPTIONS, *MACOS_VERSION_OPTIONS, :system].freeze
- -
MACOS_MODULE_NAMES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
["MacOS", "OS::Mac"].freeze
- -
MACOS_VERSION_CONDITIONALS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  "==" => nil,
-  "<=" => :or_older,
-  ">=" => :or_newer,
-}.freeze
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from HelperFunctions

-

#block_method_called_in_block?, #block_size, #check_precedence, #class_name, #component_precedes?, #end_column, #expression_negated?, #find_all_blocks, #find_block, #find_blocks, #find_const, #find_every_func_call_by_name, #find_every_method_call_by_name, #find_instance_call, #find_instance_method_call, #find_method_calls_by_name, #find_method_def, #find_method_with_args, #find_node_method_by_name, #find_strings, #format_component, #line_number, #line_start_column, #method_called?, #method_called_ever?, #method_name, #node_equals?, #offending_node, #parameters, #parameters_passed?, #problem, #regex_match_group, #size, #source_buffer, #start_column, #string_content

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - -
-

Instance Method Details

- - -
-

- - #audit_arch_conditionals(body_node, allowed_methods: [], allowed_blocks: []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
-
# File 'rubocops/shared/on_system_conditionals_helper.rb', line 80
-
-def audit_arch_conditionals(body_node, allowed_methods: [], allowed_blocks: [])
-  ARCH_OPTIONS.each do |arch_option|
-    else_method = (arch_option == :arm) ? :on_intel : :on_arm
-    if_arch_node_search(body_node, arch: :"#{arch_option}?") do |if_node, else_node|
-      next if node_is_allowed?(if_node, allowed_methods:, allowed_blocks:)
-
-      if_statement_problem(if_node, "if Hardware::CPU.#{arch_option}?", "on_#{arch_option}",
-                           else_method:, else_node:)
-    end
-  end
-
-  [:arch, :arm?, :intel?].each do |method|
-    hardware_cpu_search(body_node, method:) do |method_node|
-      # These should already be caught by `if_arch_node_search`
-      next if method_node.parent.source.start_with? "if #{method_node.source}"
-      next if node_is_allowed?(method_node, allowed_methods:, allowed_blocks:)
-
-      offending_node(method_node)
-      problem "Don't use `#{method_node.source}`, use `on_arm` and `on_intel` blocks instead."
-    end
-  end
-end
-
-
- -
-

- - #audit_base_os_conditionals(body_node, allowed_methods: [], allowed_blocks: []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
-
# File 'rubocops/shared/on_system_conditionals_helper.rb', line 103
-
-def audit_base_os_conditionals(body_node, allowed_methods: [], allowed_blocks: [])
-  BASE_OS_OPTIONS.each do |base_os_option|
-    os_method, else_method = if base_os_option == :macos
-      [:mac?, :on_linux]
-    else
-      [:linux?, :on_macos]
-    end
-    if_base_os_node_search(body_node, base_os: os_method) do |if_node, else_node|
-      next if node_is_allowed?(if_node, allowed_methods:, allowed_blocks:)
-
-      if_statement_problem(if_node, "if OS.#{os_method}", "on_#{base_os_option}",
-                           else_method:, else_node:)
-    end
-  end
-end
-
-
- -
-

- - #audit_macos_references(body_node, allowed_methods: [], allowed_blocks: []) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-
-
# File 'rubocops/shared/on_system_conditionals_helper.rb', line 151
-
-def audit_macos_references(body_node, allowed_methods: [], allowed_blocks: [])
-  MACOS_MODULE_NAMES.each do |macos_module_name|
-    find_const(body_node, macos_module_name) do |node|
-      next if node_is_allowed?(node, allowed_methods:, allowed_blocks:)
-
-      offending_node(node)
-      problem "Don't use `#{macos_module_name}` where it could be called on Linux."
-    end
-  end
-end
-
-
- -
-

- - #audit_macos_version_conditionals(body_node, allowed_methods: [], allowed_blocks: [], recommend_on_system: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-
-
# File 'rubocops/shared/on_system_conditionals_helper.rb', line 119
-
-def audit_macos_version_conditionals(body_node, allowed_methods: [], allowed_blocks: [],
-                                     recommend_on_system: true)
-  MACOS_VERSION_OPTIONS.each do |macos_version_option|
-    if_macos_version_node_search(body_node, os_version: macos_version_option) do |if_node, operator, else_node|
-      next if node_is_allowed?(if_node, allowed_methods:, allowed_blocks:)
-
-      autocorrect = else_node.blank? && MACOS_VERSION_CONDITIONALS.key?(operator.to_s)
-      on_system_method_string = if recommend_on_system && operator == :<
-        "on_system"
-      elsif recommend_on_system && operator == :<=
-        "on_system :linux, macos: :#{macos_version_option}_or_older"
-      elsif operator != :== && MACOS_VERSION_CONDITIONALS.key?(operator.to_s)
-        "on_#{macos_version_option} :#{MACOS_VERSION_CONDITIONALS[operator.to_s]}"
-      else
-        "on_#{macos_version_option}"
-      end
-
-      if_statement_problem(if_node, "if MacOS.version #{operator} :#{macos_version_option}",
-                           on_system_method_string, autocorrect:)
-    end
-
-    macos_version_comparison_search(body_node, os_version: macos_version_option) do |method_node|
-      # These should already be caught by `if_macos_version_node_search`
-      next if method_node.parent.source.start_with? "if #{method_node.source}"
-      next if node_is_allowed?(method_node, allowed_methods:, allowed_blocks:)
-
-      offending_node(method_node)
-      problem "Don't use `#{method_node.source}`, use `on_{macos_version}` blocks instead."
-    end
-  end
-end
-
-
- -
-

- - #audit_on_system_blocks(body_node, parent_name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'rubocops/shared/on_system_conditionals_helper.rb', line 26
-
-def audit_on_system_blocks(body_node, parent_name)
-  parent_string = if body_node.def_type?
-    "def #{parent_name}"
-  else
-    "#{parent_name} do"
-  end
-
-  ON_SYSTEM_OPTIONS.each do |on_system_option|
-    on_system_method = :"on_#{on_system_option}"
-    if_statement_string = if ARCH_OPTIONS.include?(on_system_option)
-      "if Hardware::CPU.#{on_system_option}?"
-    elsif BASE_OS_OPTIONS.include?(on_system_option)
-      "if OS.#{(on_system_option == :macos) ? "mac" : "linux"}?"
-    elsif on_system_option == :system
-      "if OS.linux? || MacOS.version"
-    else
-      "if MacOS.version"
-    end
-
-    find_every_method_call_by_name(body_node, on_system_method).each do |on_system_node|
-      if_conditional = ""
-      if MACOS_VERSION_OPTIONS.include? on_system_option
-        on_macos_version_method_call(on_system_node, on_method: on_system_method) do |on_method_parameters|
-          if on_method_parameters.empty?
-            if_conditional = " == :#{on_system_option}"
-          else
-            if_condition_operator = MACOS_VERSION_CONDITIONALS.key(on_method_parameters.first)
-            if_conditional = " #{if_condition_operator} :#{on_system_option}"
-          end
-        end
-      elsif on_system_option == :system
-        on_system_method_call(on_system_node) do |macos_symbol|
-          base_os, condition = macos_symbol.to_s.split(/_(?=or_)/).map(&:to_sym)
-          if_condition_operator = MACOS_VERSION_CONDITIONALS.key(condition)
-          if_conditional = " #{if_condition_operator} :#{base_os}"
-        end
-      end
-
-      offending_node(on_system_node)
-      problem "Don't use `#{on_system_node.source}` in `#{parent_string}`, " \
-              "use `#{if_statement_string}#{if_conditional}` instead." do |corrector|
-        block_node = offending_node.parent
-        next if block_node.type != :block
-
-        # TODO: could fix corrector to handle this but punting for now.
-        next if block_node.single_line?
-
-        source_range = offending_node.source_range.join(offending_node.parent.loc.begin)
-        corrector.replace(source_range, "#{if_statement_string}#{if_conditional}")
-      end
-    end
-  end
-end
-
-
- -
-

- - #hardware_cpu_search(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/on_system_conditionals_helper.rbi', line 17
-
-def hardware_cpu_search(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #if_arch_node_search(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/on_system_conditionals_helper.rbi', line 27
-
-def if_arch_node_search(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #if_base_os_node_search(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/on_system_conditionals_helper.rbi', line 37
-
-def if_base_os_node_search(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #if_macos_version_node_search(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/on_system_conditionals_helper.rbi', line 47
-
-def if_macos_version_node_search(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #macos_version_comparison_search(node, *pattern, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - pattern - - - (String, Symbol) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/on_system_conditionals_helper.rbi', line 57
-
-def macos_version_comparison_search(node, *pattern, **kwargs, &block); end
-
-
- -
-

- - #on_macos_version_method_call(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/on_system_conditionals_helper.rbi', line 60
-
-def on_macos_version_method_call(node, **kwargs, &block); end
-
-
- -
-

- - #on_system_method_call(node, **kwargs, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (RuboCop::AST::Node) - - - -
  • - -
  • - - kwargs - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-
-
# File 'sorbet/rbi/dsl/rubo_cop/cop/on_system_conditionals_helper.rbi', line 63
-
-def on_system_method_call(node, **kwargs, &block); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SBOM.html b/docs/SBOM.html deleted file mode 100644 index 6df50b0f3..000000000 --- a/docs/SBOM.html +++ /dev/null @@ -1,1134 +0,0 @@ - - - - - - - Class: SBOM - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: SBOM - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sbom.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Rather than calling new directly, use one of the class methods like SBOM.create.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
FILENAME = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"sbom.spdx.json"
- -
SCHEMA_URL = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"https://spdx.github.io/spdx-3-model/model.jsonld"
- -
SCHEMA_FILENAME = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"sbom.spdx.schema.3.json"
- -
SCHEMA_CACHE_TARGET = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_CACHE/"sbom/#{SCHEMA_FILENAME}").freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .create(formula, tab) ⇒ T.attached_class - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Instantiates a SBOM for a new installation of a formula.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - tab - - - (Tab) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'sbom.rb', line 19
-
-def self.create(formula, tab)
-  active_spec = if formula.stable?
-    T.must(formula.stable)
-  else
-    T.must(formula.head)
-  end
-  active_spec_sym = formula.active_spec_sym
-
-  attributes = {
-    name:                 formula.name,
-    homebrew_version:     HOMEBREW_VERSION,
-    spdxfile:             SBOM.spdxfile(formula),
-    time:                 tab.time,
-    source_modified_time: tab.source_modified_time.to_i,
-    compiler:             tab.compiler,
-    stdlib:               tab.stdlib,
-    runtime_dependencies: SBOM.runtime_deps_hash(Array(tab.runtime_dependencies)),
-    license:              SPDX.license_expression_to_string(formula.license),
-    built_on:             DevelopmentTools.build_system_info,
-    source:               {
-      path:         formula.specified_path.to_s,
-      tap:          formula.tap&.name,
-      tap_git_head: nil, # Filled in later if possible
-      spec:         active_spec_sym.to_s,
-      patches:      active_spec.patches,
-      bottle:       formula.bottle_hash,
-      active_spec_sym =>       {
-        version:  active_spec.version,
-        url:      active_spec.url,
-        checksum: active_spec.checksum,
-      },
-    },
-  }
-
-  # We can only get `tap_git_head` if the tap is installed locally
-  attributes[:source][:tap_git_head] = T.must(formula.tap).git_head if formula.tap&.installed?
-
-  new(attributes)
-end
-
-
- -
-

- - .exist?(formula) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-82
-83
-
-
# File 'sbom.rb', line 81
-
-def self.exist?(formula)
-  spdxfile(formula).exist?
-end
-
-
- -
-

- - .fetch_schema!Hash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-
-
# File 'sbom.rb', line 86
-
-def self.fetch_schema!
-  return @schema if @schema.present?
-
-  url = SCHEMA_URL
-  target = SCHEMA_CACHE_TARGET
-  quieter = target.exist? && !target.empty?
-
-  curl_args = Utils::Curl.curl_args(retries: 0)
-  curl_args += ["--silent", "--time-cond", target.to_s] if quieter
-
-  begin
-    unless quieter
-      oh1 "Fetching SBOM schema"
-      ohai "Downloading #{url}"
-    end
-    Utils::Curl.curl_download(*curl_args, url, to: target, retries: 0)
-    FileUtils.touch(target, mtime: Time.now)
-  rescue ErrorDuringExecution
-    target.unlink if target.exist? && target.empty?
-
-    if target.exist?
-      opoo "SBOM schema update failed, falling back to cached version."
-    else
-      opoo "Failed to fetch SBOM schema, cannot perform SBOM validation!"
-
-      return {}
-    end
-  end
-
-  @schema = begin
-    JSON.parse(target.read, freeze: true)
-  rescue JSON::ParserError
-    target.unlink
-    opoo "Failed to fetch SBOM schema, cached version corrupted, cannot perform SBOM validation!"
-    {}
-  end
-end
-
-
- -
-

- - .runtime_deps_hash(deps) ⇒ Array<Hash{String => String}> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'sbom.rb', line 65
-
-def self.runtime_deps_hash(deps)
-  deps.map do |dep|
-    full_name = dep.fetch("full_name")
-    dep_formula = Formula[full_name]
-    {
-      "full_name"           => full_name,
-      "pkg_version"         => dep.fetch("pkg_version"),
-      "name"                => dep_formula.name,
-      "license"             => SPDX.license_expression_to_string(dep_formula.license),
-      "bottle"              => dep_formula.bottle_hash,
-      "formula_pkg_version" => dep_formula.pkg_version.to_s,
-    }
-  end
-end
-
-
- -
-

- - .spdxfile(formula) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-60
-61
-62
-
-
# File 'sbom.rb', line 60
-
-def self.spdxfile(formula)
-  formula.prefix/FILENAME
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #valid?(bottling: false) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - bottling - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-
-
# File 'sbom.rb', line 125
-
-def valid?(bottling: false)
-  unless require? "json_schemer"
-    error_message = "Need json_schemer to validate SBOM, run `brew install-bundler-gems --add-groups=bottle`!"
-    odie error_message if ENV["HOMEBREW_ENFORCE_SBOM"]
-    return true
-  end
-
-  schema = SBOM.fetch_schema!
-  if schema.blank?
-    error_message = "Could not fetch JSON schema to validate SBOM!"
-    ENV["HOMEBREW_ENFORCE_SBOM"] ? odie(error_message) : opoo(error_message)
-    return false
-  end
-
-  schemer = JSONSchemer.schema(schema)
-  data = to_spdx_sbom(bottling:)
-  return true if schemer.valid?(data)
-
-  opoo "SBOM validation errors:"
-  schemer.validate(data).to_a.each do |error|
-    puts error["error"]
-  end
-
-  odie "Failed to validate SBOM against JSON schema!" if ENV["HOMEBREW_ENFORCE_SBOM"]
-
-  false
-end
-
-
- -
-

- - #write(validate: true, bottling: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - validate - - - (Boolean) - - - (defaults to: true) - - -
  • - -
  • - - bottling - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-
-
# File 'sbom.rb', line 154
-
-def write(validate: true, bottling: false)
-  # If this is a new installation, the cache of installed formulae
-  # will no longer be valid.
-  Formula.clear_cache unless spdxfile.exist?
-
-  if validate && !valid?(bottling:)
-    opoo "SBOM is not valid, not writing to disk!"
-    return
-  end
-
-  spdxfile.atomic_write(JSON.pretty_generate(to_spdx_sbom(bottling:)))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SPDX.html b/docs/SPDX.html deleted file mode 100644 index eb329c3ad..000000000 --- a/docs/SPDX.html +++ /dev/null @@ -1,1392 +0,0 @@ - - - - - - - Module: SPDX - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: SPDX - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/spdx.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for updating SPDX license data.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
DATA_PATH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_DATA_PATH/"spdx").freeze
- -
API_URL = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"https://api.github.com/repos/spdx/license-list-data/releases/latest"
- -
ALLOWED_LICENSE_SYMBOLS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[
-  :public_domain,
-  :cannot_represent,
-].freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .deprecated_license?(license) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'utils/spdx.rb', line 72
-
-def deprecated_license?(license)
-  return false if ALLOWED_LICENSE_SYMBOLS.include? license
-  return false unless valid_license?(license)
-
-  license = license.delete_suffix "+"
-  license_data["licenses"].none? do |spdx_license|
-    spdx_license["licenseId"] == license && !spdx_license["isDeprecatedLicenseId"]
-  end
-end
-
-
- -
-

- - .download_latest_license_data!(to: DATA_PATH) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-
-
# File 'utils/spdx.rb', line 30
-
-def download_latest_license_data!(to: DATA_PATH)
-  data_url = "https://raw.githubusercontent.com/spdx/license-list-data/#{latest_tag}/json/"
-  Utils::Curl.curl_download("#{data_url}licenses.json", to: to/"spdx_licenses.json")
-  Utils::Curl.curl_download("#{data_url}exceptions.json", to: to/"spdx_exceptions.json")
-end
-
-
- -
-

- - .exception_dataObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'utils/spdx.rb', line 22
-
-def exception_data
-  @exception_data ||= JSON.parse (DATA_PATH/"spdx_exceptions.json").read
-end
-
-
- -
-

- - .forbidden_licenses_include?(license, forbidden_licenses) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-
-
# File 'utils/spdx.rb', line 192
-
-def forbidden_licenses_include?(license, forbidden_licenses)
-  return true if forbidden_licenses.key? license
-
-  name, version, = license_version_info license
-
-  forbidden_licenses.each_value do |license_info|
-    forbidden_name, forbidden_version, forbidden_or_later = *license_info
-    next if forbidden_name != name
-
-    return true if forbidden_or_later && forbidden_version <= version
-
-    return true if forbidden_version == version
-  end
-  false
-end
-
-
- -
-

- - .latest_tagObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'utils/spdx.rb', line 26
-
-def latest_tag
-  @latest_tag ||= GitHub::API.open_rest(API_URL)["tag_name"]
-end
-
-
- -
-

- - .license_dataObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'utils/spdx.rb', line 18
-
-def license_data
-  @license_data ||= JSON.parse (DATA_PATH/"spdx_licenses.json").read
-end
-
-
- -
-

- - .license_expression_to_string(license_expression, bracket: false, hash_type: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-
-
# File 'utils/spdx.rb', line 88
-
-def license_expression_to_string(license_expression, bracket: false, hash_type: nil)
-  case license_expression
-  when String
-    license_expression
-  when Symbol
-    license_expression.to_s.tr("_", " ").gsub(/\b(?<!\w['’`()])[a-z]/, &:capitalize)
-  when Hash
-    expressions = []
-
-    if license_expression.keys.length == 1
-      hash_type = license_expression.keys.first
-      if hash_type.is_a? String
-        expressions.push "#{hash_type} with #{license_expression[hash_type][:with]}"
-      else
-        expressions += license_expression[hash_type].map do |license|
-          license_expression_to_string license, bracket: true, hash_type:
-        end
-      end
-    else
-      bracket = false
-      license_expression.each do |expression|
-        expressions.push license_expression_to_string([expression].to_h, bracket: true)
-      end
-    end
-
-    operator = if hash_type == :any_of
-      " or "
-    else
-      " and "
-    end
-
-    if bracket
-      "(#{expressions.join operator})"
-    else
-      expressions.join operator
-    end
-  end
-end
-
-
- -
-

- - .license_version_info(license) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-
-
# File 'utils/spdx.rb', line 161
-
-def license_version_info(license)
-  return [license] if ALLOWED_LICENSE_SYMBOLS.include? license
-
-  match = license.match(/-(?<version>[0-9.]+)(?:-.*?)??(?<or_later>\+|-only|-or-later)?$/)
-  return [license] if match.blank?
-
-  license_name = license.split(match[0]).first
-  or_later = match["or_later"].present? && %w[+ -or-later].include?(match["or_later"])
-
-  # [name, version, later versions allowed?]
-  # e.g. GPL-2.0-or-later --> ["GPL", "2.0", true]
-  [license_name, match["version"], or_later]
-end
-
-
- -
-

- - .licenses_forbid_installation?(license_expression, forbidden_licenses) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-
-
# File 'utils/spdx.rb', line 175
-
-def licenses_forbid_installation?(license_expression, forbidden_licenses)
-  case license_expression
-  when String, Symbol
-    forbidden_licenses_include? license_expression.to_s, forbidden_licenses
-  when Hash
-    key = license_expression.keys.first
-    case key
-    when :any_of
-      license_expression[key].all? { |license| licenses_forbid_installation? license, forbidden_licenses }
-    when :all_of
-      license_expression[key].any? { |license| licenses_forbid_installation? license, forbidden_licenses }
-    else
-      forbidden_licenses_include? key, forbidden_licenses
-    end
-  end
-end
-
-
- -
-

- - .parse_license_expression(license_expression) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-
-
# File 'utils/spdx.rb', line 36
-
-def parse_license_expression(license_expression)
-  licenses = T.let([], T::Array[T.any(String, Symbol)])
-  exceptions = T.let([], T::Array[String])
-
-  case license_expression
-  when String, Symbol
-    licenses.push license_expression
-  when Hash, Array
-    if license_expression.is_a? Hash
-      license_expression = license_expression.filter_map do |key, value|
-        if key.is_a? String
-          licenses.push key
-          exceptions.push value[:with]
-          next
-        end
-        value
-      end
-    end
-
-    license_expression.each do |license|
-      sub_license, sub_exception = parse_license_expression license
-      licenses += sub_license
-      exceptions += sub_exception
-    end
-  end
-
-  [licenses, exceptions]
-end
-
-
- -
-

- - .string_to_license_expression(string) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-
-
# File 'utils/spdx.rb', line 127
-
-def string_to_license_expression(string)
-  return if string.blank?
-
-  result = string
-  result_type = nil
-
-  and_parts = string.split(/ and (?![^(]*\))/)
-  if and_parts.length > 1
-    result = and_parts
-    result_type = :all_of
-  else
-    or_parts = string.split(/ or (?![^(]*\))/)
-    if or_parts.length > 1
-      result = or_parts
-      result_type = :any_of
-    end
-  end
-
-  if result_type
-    result.map! do |part|
-      part = part[1..-2] if part[0] == "(" && part[-1] == ")"
-      string_to_license_expression(part)
-    end
-    { result_type => result }
-  else
-    with_parts = string.split(" with ", 2)
-    if with_parts.length > 1
-      { with_parts.first => { with: with_parts.second } }
-    else
-      result
-    end
-  end
-end
-
-
- -
-

- - .valid_license?(license) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-
-
# File 'utils/spdx.rb', line 65
-
-def valid_license?(license)
-  return ALLOWED_LICENSE_SYMBOLS.include? license if license.is_a? Symbol
-
-  license = license.delete_suffix "+"
-  license_data["licenses"].any? { |spdx_license| spdx_license["licenseId"] == license }
-end
-
-
- -
-

- - .valid_license_exception?(exception) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-
-
# File 'utils/spdx.rb', line 82
-
-def valid_license_exception?(exception)
-  exception_data["exceptions"].any? do |spdx_exception|
-    spdx_exception["licenseExceptionId"] == exception && !spdx_exception["isDeprecatedLicenseId"]
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Sandbox.html b/docs/Sandbox.html deleted file mode 100644 index e1a7955a3..000000000 --- a/docs/Sandbox.html +++ /dev/null @@ -1,2051 +0,0 @@ - - - - - - - Class: Sandbox - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Sandbox - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/mac/sandbox.rb,
- sandbox.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for running a sub-process inside of a sandboxed environment.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-
-
# File 'sandbox.rb', line 20
-
-def initialize
-  @profile = T.let(SandboxProfile.new, SandboxProfile)
-  @failed = T.let(false, T::Boolean)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .available?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'extend/os/mac/sandbox.rb', line 6
-
-def self.available?
-  File.executable?(SANDBOX_EXEC)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #add_rule(allow:, operation:, filter: nil, modifier: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - allow - - - (Boolean) - - - -
  • - -
  • - - operation - - - (String) - - - -
  • - -
  • - - filter - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - modifier - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-
-
# File 'sandbox.rb', line 31
-
-def add_rule(allow:, operation:, filter: nil, modifier: nil)
-  rule = SandboxRule.new(allow:, operation:, filter:, modifier:)
-  @profile.add_rule(rule)
-end
-
-
- -
-

- - #allow_all_networkvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-118
-119
-120
-
-
# File 'sandbox.rb', line 118
-
-def allow_all_network
-  add_rule allow: true, operation: "network*"
-end
-
-
- -
-

- - #allow_cvsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'sandbox.rb', line 67
-
-def allow_cvs
-  allow_write_path "#{Dir.home(ENV.fetch("USER"))}/.cvspass"
-end
-
-
- -
-

- - #allow_fossilvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-72
-73
-74
-75
-
-
# File 'sandbox.rb', line 72
-
-def allow_fossil
-  allow_write_path "#{Dir.home(ENV.fetch("USER"))}/.fossil"
-  allow_write_path "#{Dir.home(ENV.fetch("USER"))}/.fossil-journal"
-end
-
-
- -
-

- - #allow_network(path:, type: :literal) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname) - - - -
  • - -
  • - - type - - - (Symbol) - - - (defaults to: :literal) - - -
  • - -
- - -
- - - - -
-
-
-
-108
-109
-110
-
-
# File 'sandbox.rb', line 108
-
-def allow_network(path:, type: :literal)
-  add_rule allow: true, operation: "network*", filter: path_filter(path, type)
-end
-
-
- -
-

- - #allow_write(path:, type: :literal) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname) - - - -
  • - -
  • - - type - - - (Symbol) - - - (defaults to: :literal) - - -
  • - -
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-
-
# File 'sandbox.rb', line 37
-
-def allow_write(path:, type: :literal)
-  add_rule allow: true, operation: "file-write*", filter: path_filter(path, type)
-  add_rule allow: true, operation: "file-write-setugid", filter: path_filter(path, type)
-end
-
-
- -
-

- - #allow_write_cellar(formula) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- - -
- - - - -
-
-
-
-78
-79
-80
-81
-82
-
-
# File 'sandbox.rb', line 78
-
-def allow_write_cellar(formula)
-  allow_write_path formula.rack
-  allow_write_path formula.etc
-  allow_write_path formula.var
-end
-
-
- -
-

- - #allow_write_log(formula) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- - -
- - - - -
-
-
-
-92
-93
-94
-
-
# File 'sandbox.rb', line 92
-
-def allow_write_log(formula)
-  allow_write_path formula.logs
-end
-
-
- -
-

- - #allow_write_path(path) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'sandbox.rb', line 48
-
-def allow_write_path(path)
-  allow_write path:, type: :subpath
-end
-
-
- -
-

- - #allow_write_temp_and_cachevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'sandbox.rb', line 58
-
-def allow_write_temp_and_cache
-  allow_write_path "/private/tmp"
-  allow_write_path "/private/var/tmp"
-  allow_write path: "^/private/var/folders/[^/]+/[^/]+/[C,T]/", type: :regex
-  allow_write_path HOMEBREW_TEMP
-  allow_write_path HOMEBREW_CACHE
-end
-
-
- -
-

- - #allow_write_xcodevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Xcode projects expect access to certain cache/archive dirs.

- - -
-
-
- - -
- - - - -
-
-
-
-86
-87
-88
-89
-
-
# File 'sandbox.rb', line 86
-
-def allow_write_xcode
-  allow_write_path "#{Dir.home(ENV.fetch("USER"))}/Library/Developer"
-  allow_write_path "#{Dir.home(ENV.fetch("USER"))}/Library/Caches/org.swift.swiftpm"
-end
-
-
- -
-

- - #deny_all_networkvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-123
-124
-125
-
-
# File 'sandbox.rb', line 123
-
-def deny_all_network
-  add_rule allow: false, operation: "network*"
-end
-
-
- -
-

- - #deny_all_network_except_pipe(path) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-128
-129
-130
-131
-
-
# File 'sandbox.rb', line 128
-
-def deny_all_network_except_pipe(path)
-  deny_all_network
-  allow_network path:, type: :literal
-end
-
-
- -
-

- - #deny_network(path:, type: :literal) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname) - - - -
  • - -
  • - - type - - - (Symbol) - - - (defaults to: :literal) - - -
  • - -
- - -
- - - - -
-
-
-
-113
-114
-115
-
-
# File 'sandbox.rb', line 113
-
-def deny_network(path:, type: :literal)
-  add_rule allow: false, operation: "network*", filter: path_filter(path, type)
-end
-
-
- -
-

- - #deny_write(path:, type: :literal) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname) - - - -
  • - -
  • - - type - - - (Symbol) - - - (defaults to: :literal) - - -
  • - -
- - -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'sandbox.rb', line 43
-
-def deny_write(path:, type: :literal)
-  add_rule allow: false, operation: "file-write*", filter: path_filter(path, type)
-end
-
-
- -
-

- - #deny_write_homebrew_repositoryvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'sandbox.rb', line 97
-
-def deny_write_homebrew_repository
-  deny_write path: HOMEBREW_BREW_FILE
-  if HOMEBREW_PREFIX.to_s == HOMEBREW_REPOSITORY.to_s
-    deny_write_path HOMEBREW_LIBRARY
-    deny_write_path HOMEBREW_REPOSITORY/".git"
-  else
-    deny_write_path HOMEBREW_REPOSITORY
-  end
-end
-
-
- -
-

- - #deny_write_path(path) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'sandbox.rb', line 53
-
-def deny_write_path(path)
-  deny_write path:, type: :subpath
-end
-
-
- -
-

- - #exec(*args) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-
-
# File 'sandbox.rb', line 134
-
-def exec(*args)
-  seatbelt = Tempfile.new(["homebrew", ".sb"], HOMEBREW_TEMP)
-  seatbelt.write(@profile.dump)
-  seatbelt.close
-  @start = T.let(Time.now, T.nilable(Time))
-
-  begin
-    command = [SANDBOX_EXEC, "-f", seatbelt.path, *args]
-    # Start sandbox in a pseudoterminal to prevent access of the parent terminal.
-    PTY.spawn(*command) do |r, w, pid|
-      # Set the PTY's window size to match the parent terminal.
-      # Some formula tests are sensitive to the terminal size and fail if this is not set.
-      winch = proc do |_sig|
-        w.winsize = if $stdout.tty?
-          # We can only use IO#winsize if the IO object is a TTY.
-          $stdout.winsize
-        else
-          # Otherwise, default to tput, if available.
-          # This relies on ncurses rather than the system's ioctl.
-          [Utils.popen_read("tput", "lines").to_i, Utils.popen_read("tput", "cols").to_i]
-        end
-      end
-
-      write_to_pty = proc do
-        # Don't hang if stdin is not able to be used - throw EIO instead.
-        old_ttin = trap(:TTIN, "IGNORE")
-
-        # Update the window size whenever the parent terminal's window size changes.
-        old_winch = trap(:WINCH, &winch)
-        winch.call(nil)
-
-        stdin_thread = Thread.new do
-          IO.copy_stream($stdin, w)
-        rescue Errno::EIO
-          # stdin is unavailable - move on.
-        end
-
-        r.each_char { |c| print(c) }
-
-        Process.wait(pid)
-      ensure
-        stdin_thread&.kill
-        trap(:TTIN, old_ttin)
-        trap(:WINCH, old_winch)
-      end
-
-      if $stdin.tty?
-        # If stdin is a TTY, use io.raw to set stdin to a raw, passthrough
-        # mode while we copy the input/output of the process spawned in the
-        # PTY. After we've finished copying to/from the PTY process, io.raw
-        # will restore the stdin TTY to its original state.
-        begin
-          # Ignore SIGTTOU as setting raw mode will hang if the process is in the background.
-          old_ttou = trap(:TTOU, "IGNORE")
-          $stdin.raw(&write_to_pty)
-        ensure
-          trap(:TTOU, old_ttou)
-        end
-      else
-        write_to_pty.call
-      end
-    end
-    raise ErrorDuringExecution.new(command, status: $CHILD_STATUS) unless $CHILD_STATUS.success?
-  rescue
-    @failed = true
-    raise
-  ensure
-    seatbelt.unlink
-    sleep 0.1 # wait for a bit to let syslog catch up the latest events.
-    syslog_args = [
-      "-F", "$((Time)(local)) $(Sender)[$(PID)]: $(Message)",
-      "-k", "Time", "ge", @start.to_i.to_s,
-      "-k", "Message", "S", "deny",
-      "-k", "Sender", "kernel",
-      "-o",
-      "-k", "Time", "ge", @start.to_i.to_s,
-      "-k", "Message", "S", "deny",
-      "-k", "Sender", "sandboxd"
-    ]
-    logs = Utils.popen_read("syslog", *syslog_args)
-
-    # These messages are confusing and non-fatal, so don't report them.
-    logs = logs.lines.grep_v(/^.*Python\(\d+\) deny file-write.*pyc$/).join
-
-    unless logs.empty?
-      if @logfile
-        File.open(@logfile, "w") do |log|
-          log.write logs
-          log.write "\nWe use time to filter sandbox log. Therefore, unrelated logs may be recorded.\n"
-        end
-      end
-
-      if @failed && Homebrew::EnvConfig.verbose?
-        ohai "Sandbox Log", logs
-        $stdout.flush # without it, brew test-bot would fail to catch the log
-      end
-    end
-  end
-end
-
-
- -
-

- - #record_log(file) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'sandbox.rb', line 26
-
-def record_log(file)
-  @logfile = T.let(file, T.nilable(T.any(String, Pathname)))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SharedAudits.html b/docs/SharedAudits.html deleted file mode 100644 index 77ce00fef..000000000 --- a/docs/SharedAudits.html +++ /dev/null @@ -1,1208 +0,0 @@ - - - - - - - Module: SharedAudits - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: SharedAudits - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
utils/shared_audits.rb,
- utils/shared_audits.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
URL_TYPE_HOMEPAGE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"homepage URL"
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .bitbucket(user, repo) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-
-
# File 'utils/shared_audits.rb', line 135
-
-def bitbucket(user, repo)
-  api_url = "https://api.bitbucket.org/2.0/repositories/#{user}/#{repo}"
-  out, _, status = Utils::Curl.curl_output("--request", "GET", api_url)
-  return unless status.success?
-
-   = JSON.parse(out)
-  return if .nil?
-
-  return "Uses deprecated Mercurial support in Bitbucket" if ["scm"] == "hg"
-
-  return "Bitbucket fork (not canonical repository)" unless ["parent"].nil?
-
-  return "Bitbucket repository too new (<30 days old)" if Date.parse(["created_on"]) >= (Date.today - 30)
-
-  forks_out, _, forks_status = Utils::Curl.curl_output("--request", "GET", "#{api_url}/forks")
-  return unless forks_status.success?
-
-  watcher_out, _, watcher_status = Utils::Curl.curl_output("--request", "GET", "#{api_url}/watchers")
-  return unless watcher_status.success?
-
-   = JSON.parse(forks_out)
-  return if .nil?
-
-   = JSON.parse(watcher_out)
-  return if .nil?
-
-  return if ["size"] >= 30 || ["size"] >= 75
-
-  "Bitbucket repository not notable enough (<30 forks and <75 watchers)"
-end
-
-
- -
-

- - .eol_data(product, cycle) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'utils/shared_audits.rb', line 13
-
-def eol_data(product, cycle)
-  @eol_data ||= {}
-  @eol_data["#{product}/#{cycle}"] ||= begin
-    out, _, status = Utils::Curl.curl_output("--location", "https://endoflife.date/api/#{product}/#{cycle}.json")
-    json = JSON.parse(out) if status.success?
-    json = nil if json&.dig("message")&.include?("Product not found")
-    json
-  end
-end
-
-
- -
-

- - .github(user, repo) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-
-
# File 'utils/shared_audits.rb', line 103
-
-def github(user, repo)
-   = github_repo_data(user, repo)
-
-  return if .nil?
-
-  return "GitHub fork (not canonical repository)" if ["fork"]
-
-  if (["forks_count"] < 30) && (["subscribers_count"] < 30) &&
-     (["stargazers_count"] < 75)
-    return "GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)"
-  end
-
-  return if Date.parse(["created_at"]) <= (Date.today - 30)
-
-  "GitHub repository too new (<30 days old)"
-end
-
-
- -
-

- - .github_release(user, repo, tag, formula: nil, cask: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'utils/shared_audits.rb', line 47
-
-def github_release(user, repo, tag, formula: nil, cask: nil)
-  release = github_release_data(user, repo, tag)
-  return unless release
-
-  exception, name, version = if formula
-    [formula.tap&.audit_exception(:github_prerelease_allowlist, formula.name), formula.name, formula.version]
-  elsif cask
-    [cask.tap&.audit_exception(:github_prerelease_allowlist, cask.token), cask.token, cask.version]
-  end
-
-  return "#{tag} is a GitHub pre-release." if release["prerelease"] && [version, "all"].exclude?(exception)
-
-  if !release["prerelease"] && exception
-    return "#{tag} is not a GitHub pre-release but '#{name}' is in the GitHub prerelease allowlist."
-  end
-
-  "#{tag} is a GitHub draft." if release["draft"]
-end
-
-
- -
-

- - .github_release_data(user, repo, tag) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'utils/shared_audits.rb', line 34
-
-def github_release_data(user, repo, tag)
-  id = "#{user}/#{repo}/#{tag}"
-  url = "#{GitHub::API_URL}/repos/#{user}/#{repo}/releases/tags/#{tag}"
-  @github_release_data ||= {}
-  @github_release_data[id] ||= GitHub::API.open_rest(url)
-
-  @github_release_data[id]
-rescue GitHub::API::HTTPNotFoundError
-  nil
-rescue GitHub::API::AuthenticationFailedError => e
-  raise unless e.message.match?(GitHub::API::GITHUB_IP_ALLOWLIST_ERROR)
-end
-
-
- -
-

- - .github_repo_data(user, repo) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# File 'utils/shared_audits.rb', line 23
-
-def github_repo_data(user, repo)
-  @github_repo_data ||= {}
-  @github_repo_data["#{user}/#{repo}"] ||= GitHub.repository(user, repo)
-
-  @github_repo_data["#{user}/#{repo}"]
-rescue GitHub::API::HTTPNotFoundError
-  nil
-rescue GitHub::API::AuthenticationFailedError => e
-  raise unless e.message.match?(GitHub::API::GITHUB_IP_ALLOWLIST_ERROR)
-end
-
-
- -
-

- - .github_tag_from_url(url) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-
-
# File 'utils/shared_audits.rb', line 166
-
-def github_tag_from_url(url)
-  url = url.to_s
-  tag = url.match(%r{^https://github\.com/[\w-]+/[\w-]+/archive/refs/tags/([^/]+)\.(tar\.gz|zip)$})
-           .to_a
-           .second
-  tag ||= url.match(%r{^https://github\.com/[\w-]+/[\w-]+/releases/download/([^/]+)/})
-             .to_a
-             .second
-  tag
-end
-
-
- -
-

- - .gitlab(user, repo) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
-
# File 'utils/shared_audits.rb', line 120
-
-def gitlab(user, repo)
-   = gitlab_repo_data(user, repo)
-
-  return if .nil?
-
-  return "GitLab fork (not canonical repository)" if ["fork"]
-  if (["forks_count"] < 30) && (["star_count"] < 75)
-    return "GitLab repository not notable enough (<30 forks and <75 stars)"
-  end
-
-  return if Date.parse(["created_at"]) <= (Date.today - 30)
-
-  "GitLab repository too new (<30 days old)"
-end
-
-
- -
-

- - .gitlab_release(user, repo, tag, formula: nil, cask: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
-
# File 'utils/shared_audits.rb', line 87
-
-def gitlab_release(user, repo, tag, formula: nil, cask: nil)
-  release = gitlab_release_data(user, repo, tag)
-  return unless release
-
-  return if DateTime.parse(release["released_at"]) <= DateTime.now
-
-  exception, version = if formula
-    [formula.tap&.audit_exception(:gitlab_prerelease_allowlist, formula.name), formula.version]
-  elsif cask
-    [cask.tap&.audit_exception(:gitlab_prerelease_allowlist, cask.token), cask.version]
-  end
-  return if [version, "all"].include?(exception)
-
-  "#{tag} is a GitLab pre-release."
-end
-
-
- -
-

- - .gitlab_release_data(user, repo, tag) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-
-
# File 'utils/shared_audits.rb', line 76
-
-def gitlab_release_data(user, repo, tag)
-  id = "#{user}/#{repo}/#{tag}"
-  @gitlab_release_data ||= {}
-  @gitlab_release_data[id] ||= begin
-    out, _, status = Utils::Curl.curl_output(
-      "https://gitlab.com/api/v4/projects/#{user}%2F#{repo}/releases/#{tag}", "--fail"
-    )
-    JSON.parse(out) if status.success?
-  end
-end
-
-
- -
-

- - .gitlab_repo_data(user, repo) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-
-
# File 'utils/shared_audits.rb', line 66
-
-def gitlab_repo_data(user, repo)
-  @gitlab_repo_data ||= {}
-  @gitlab_repo_data["#{user}/#{repo}"] ||= begin
-    out, _, status = Utils::Curl.curl_output("https://gitlab.com/api/v4/projects/#{user}%2F#{repo}")
-    json = JSON.parse(out) if status.success?
-    json = nil if json&.dig("message")&.include?("404 Project Not Found")
-    json
-  end
-end
-
-
- -
-

- - .gitlab_tag_from_url(url) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-177
-178
-179
-180
-181
-182
-
-
# File 'utils/shared_audits.rb', line 177
-
-def gitlab_tag_from_url(url)
-  url = url.to_s
-  url.match(%r{^https://gitlab\.com/[\w-]+/[\w-]+/-/archive/([^/]+)/})
-     .to_a
-     .second
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SharedEnvExtension.html b/docs/SharedEnvExtension.html deleted file mode 100644 index 5afd29bed..000000000 --- a/docs/SharedEnvExtension.html +++ /dev/null @@ -1,2408 +0,0 @@ - - - - - - - Module: SharedEnvExtension - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: SharedEnvExtension - - - Private -

-
- - - - - - -
-
Includes:
-
CompilerConstants
-
- - - - -
-
Included in:
-
Sorbet::Private::Static::ENVClass, Stdenv, Superenv
-
- - - -
-
Defined in:
-
extend/os/mac/extend/ENV/shared.rb,
- extend/os/linux/extend/ENV/shared.rb,
extend/ENV/shared.rb,
extend/ENV/shared.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from CompilerConstants

-

CompilerConstants::COMPILERS, CompilerConstants::COMPILER_SYMBOL_MAP, CompilerConstants::GNU_GCC_REGEXP, CompilerConstants::GNU_GCC_VERSIONS

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #append(keys, value, separator = " ") ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - keys - - - (String, Array<String>) - - - -
  • - -
  • - - value - - - (T.untyped) - - - -
  • - -
  • - - separator - - - (String) - - - (defaults to: " ") - - -
  • - -
- - -
- - - - -
-
-
-
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'extend/ENV/shared.rb', line 85
-
-def append(keys, value, separator = " ")
-  value = value.to_s
-  Array(keys).each do |key|
-    old_value = self[key]
-    self[key] = if old_value.blank?
-      value
-    else
-      old_value + separator + value
-    end
-  end
-end
-
-
- -
-

- - #append_path(key, path) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-111
-112
-113
-
-
# File 'extend/ENV/shared.rb', line 111
-
-def append_path(key, path)
-  self[key] = PATH.new(self[key]).append(path)
-end
-
-
- -
-

- - #append_to_cccfg(value) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - value - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-80
-81
-82
-
-
# File 'extend/ENV/shared.rb', line 80
-
-def append_to_cccfg(value)
-  append("HOMEBREW_CCCFG", value, "")
-end
-
-
- -
-

- - #append_to_cflags(newflags) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - newflags - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-70
-71
-72
-
-
# File 'extend/ENV/shared.rb', line 70
-
-def append_to_cflags(newflags)
-  append(CC_FLAG_VARS, newflags)
-end
-
-
- -
-

- - #ccString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-154
-155
-156
-
-
# File 'extend/ENV/shared.rb', line 154
-
-def cc
-  self["CC"]
-end
-
-
- -
-

- - #cflagsString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-164
-165
-166
-
-
# File 'extend/ENV/shared.rb', line 164
-
-def cflags
-  self["CFLAGS"]
-end
-
-
- -
-

- - #compilerSymbol, String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Outputs the current compiler.

- -
# Do something only for the system clang
-if ENV.compiler == :clang
-  # modify CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS in one go:
-  ENV.append_to_cflags "-I ./missing/includes"
-end
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-
-
# File 'extend/ENV/shared.rb', line 205
-
-def compiler
-  @compiler ||= if (cc = @cc)
-    warn_about_non_apple_gcc(cc) if cc.match?(GNU_GCC_REGEXP)
-
-    fetch_compiler(cc, "--cc")
-  elsif (cc = homebrew_cc)
-    warn_about_non_apple_gcc(cc) if cc.match?(GNU_GCC_REGEXP)
-
-    compiler = fetch_compiler(cc, "HOMEBREW_CC")
-
-    if @formula
-      compilers = [compiler] + CompilerSelector.compilers
-      compiler = CompilerSelector.select_for(@formula, compilers)
-    end
-
-    compiler
-  elsif @formula
-    CompilerSelector.select_for(@formula)
-  else
-    DevelopmentTools.default_compiler
-  end
-end
-
-
- -
-

- - #cppflagsString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-174
-175
-176
-
-
# File 'extend/ENV/shared.rb', line 174
-
-def cppflags
-  self["CPPFLAGS"]
-end
-
-
- -
-

- - #cxxString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-159
-160
-161
-
-
# File 'extend/ENV/shared.rb', line 159
-
-def cxx
-  self["CXX"]
-end
-
-
- -
-

- - #cxxflagsString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-169
-170
-171
-
-
# File 'extend/ENV/shared.rb', line 169
-
-def cxxflags
-  self["CXXFLAGS"]
-end
-
-
- -
-

- - #effective_archSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-5
-6
-7
-8
-9
-10
-11
-12
-13
-
-
# File 'extend/os/linux/extend/ENV/shared.rb', line 5
-
-def effective_arch
-  if @build_bottle && @bottle_arch
-    @bottle_arch.to_sym
-  elsif @build_bottle
-    Hardware.oldest_cpu
-  else
-    :native
-  end
-end
-
-
- -
-

- - #fcString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-184
-185
-186
-
-
# File 'extend/ENV/shared.rb', line 184
-
-def fc
-  self["FC"]
-end
-
-
- -
-

- - #fcflagsString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-194
-195
-196
-
-
# File 'extend/ENV/shared.rb', line 194
-
-def fcflags
-  self["FCFLAGS"]
-end
-
-
- -
-

- - #fflagsString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-189
-190
-191
-
-
# File 'extend/ENV/shared.rb', line 189
-
-def fflags
-  self["FFLAGS"]
-end
-
-
- -
-

- - #fortranvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-
-
# File 'extend/ENV/shared.rb', line 244
-
-def fortran
-  # Ignore repeated calls to this function as it will misleadingly warn about
-  # building with an alternative Fortran compiler without optimization flags,
-  # despite it often being the Homebrew-provided one set up in the first call.
-  return if @fortran_setup_done
-
-  @fortran_setup_done = true
-
-  flags = []
-
-  if fc
-    ohai "Building with an alternative Fortran compiler", "This is unsupported."
-    self["F77"] ||= fc
-  else
-    if (gfortran = which("gfortran", (HOMEBREW_PREFIX/"bin").to_s))
-      ohai "Using Homebrew-provided Fortran compiler"
-    elsif (gfortran = which("gfortran", PATH.new(ORIGINAL_PATHS)))
-      ohai "Using a Fortran compiler found at #{gfortran}"
-    end
-    if gfortran
-      puts "This may be changed by setting the FC environment variable."
-      self["FC"] = self["F77"] = gfortran
-      flags = FC_FLAG_VARS
-    end
-  end
-
-  flags.each { |key| self[key] = cflags }
-  set_cpu_flags(flags)
-end
-
-
- -
-

- - #ldflagsString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-179
-180
-181
-
-
# File 'extend/ENV/shared.rb', line 179
-
-def ldflags
-  self["LDFLAGS"]
-end
-
-
- -
-

- - #no_fixup_chains_support?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-
-
# File 'extend/os/mac/extend/ENV/shared.rb', line 37
-
-def no_fixup_chains_support?
-  # This is supported starting Xcode 13, which ships ld64-711.
-  # https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes
-  # https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2
-  DevelopmentTools.ld64_version >= 711
-end
-
-
- -
-

- - #no_weak_imports_support?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'extend/os/mac/extend/ENV/shared.rb', line 27
-
-def no_weak_imports_support?
-  return false if compiler != :clang
-
-  return false if !MacOS::Xcode.version.null? && MacOS::Xcode.version < "8.0"
-  return false if !MacOS::CLT.version.null? && MacOS::CLT.version < "8.0"
-
-  true
-end
-
-
- -
-

- - #permit_arch_flagsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-317
-
-
# File 'extend/ENV/shared.rb', line 317
-
-def permit_arch_flags; end
-
-
- -
-

- - #prepend(keys, value, separator = " ") ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - keys - - - (String, Array<String>) - - - -
  • - -
  • - - value - - - (T.untyped) - - - -
  • - -
  • - - separator - - - (String) - - - (defaults to: " ") - - -
  • - -
- - -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-
-
# File 'extend/ENV/shared.rb', line 98
-
-def prepend(keys, value, separator = " ")
-  value = value.to_s
-  Array(keys).each do |key|
-    old_value = self[key]
-    self[key] = if old_value.blank?
-      value
-    else
-      value + separator + old_value
-    end
-  end
-end
-
-
- -
-

- - #prepend_create_path(key, path) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-130
-131
-132
-133
-134
-
-
# File 'extend/ENV/shared.rb', line 130
-
-def prepend_create_path(key, path)
-  path = Pathname(path)
-  path.mkpath
-  prepend_path key, path
-end
-
-
- -
-

- - #prepend_path(key, path) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Prepends a directory to PATH. -Is the formula struggling to find the pkgconfig file? Point it to it. -This is done automatically for keg-only formulae.

- -
ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["glib"].opt_lib}/pkgconfig"
- -

Prepending a system path such as /usr/bin is a no-op so that requirements -don't accidentally override superenv shims or formulae's bin directories.

- -
ENV.prepend_path "PATH", which("emacs").dirname
- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-123
-124
-125
-126
-127
-
-
# File 'extend/ENV/shared.rb', line 123
-
-def prepend_path(key, path)
-  return if %w[/usr/bin /bin /usr/sbin /sbin].include? path.to_s
-
-  self[key] = PATH.new(self[key]).prepend(path)
-end
-
-
- -
-

- - #remove(keys, value) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - keys - - - (String, Array<String>) - - - -
  • - -
  • - - value - - - (T.untyped) - - - -
  • - -
- - -
- - - - -
-
-
-
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-
-
# File 'extend/ENV/shared.rb', line 137
-
-def remove(keys, value)
-  return if value.nil?
-
-  Array(keys).each do |key|
-    old_value = self[key]
-    next if old_value.nil?
-
-    new_value = old_value.sub(value, "")
-    if new_value.empty?
-      delete(key)
-    else
-      self[key] = new_value
-    end
-  end
-end
-
-
- -
-

- - #remove_cc_etcHash{String => String, nil} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-64
-65
-66
-67
-
-
# File 'extend/ENV/shared.rb', line 64
-
-def remove_cc_etc
-  keys = %w[CC CXX OBJC OBJCXX LD CPP CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS LDFLAGS CPPFLAGS]
-  keys.to_h { |key| [key, delete(key)] }
-end
-
-
- -
-

- - #remove_from_cflags(val) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - val - - - (Regexp, String) - - - -
  • - -
- - -
- - - - -
-
-
-
-75
-76
-77
-
-
# File 'extend/ENV/shared.rb', line 75
-
-def remove_from_cflags(val)
-  remove CC_FLAG_VARS, val
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/ShebangDetectionError.html b/docs/ShebangDetectionError.html deleted file mode 100644 index d191fd758..000000000 --- a/docs/ShebangDetectionError.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Exception: ShebangDetectionError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: ShebangDetectionError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when detected_perl_shebang etc cannot detect the shebang.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(type, reason) ⇒ ShebangDetectionError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of ShebangDetectionError.

- - -
-
-
- - -
- - - - -
-
-
-
-775
-776
-777
-
-
# File 'exceptions.rb', line 775
-
-def initialize(type, reason)
-  super "Cannot detect #{type} shebang: #{reason}."
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Singleton.html b/docs/Singleton.html deleted file mode 100644 index a1e9fdc15..000000000 --- a/docs/Singleton.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - Module: Singleton - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Singleton - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
extend/object/duplicable.rb
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- -
    - - -
  • - - - #duplicable? ⇒ false - - - - - - - - - - private - -

    Singleton instances are not duplicable:.

    -
    - -
  • - - -
- - - - -
-

Instance Method Details

- - -
-

- - #duplicable?false - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Singleton instances are not duplicable:

- -
Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (false) - - - -
  • - -
- -
- - - - -
-
-
-
-68
-
-
# File 'extend/object/duplicable.rb', line 68
-
-def duplicable? = false
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SoftwareSpec.html b/docs/SoftwareSpec.html deleted file mode 100644 index bbe49209d..000000000 --- a/docs/SoftwareSpec.html +++ /dev/null @@ -1,2835 +0,0 @@ - - - - - - - Class: SoftwareSpec - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: SoftwareSpec - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
OnSystem::MacOSAndLinux
-
- - - - - - -
-
Defined in:
-
software_spec.rb
-
- -
- -
-

Direct Known Subclasses

-

HeadSoftwareSpec

-
- - -

- Constant Summary - collapse -

- -
- -
PREDEFINED_OPTIONS = - -
-
{
-  universal: Option.new("universal", "Build a universal binary"),
-  cxx11:     Option.new("c++11",     "Build using C++11 mode"),
-}.freeze
- -
- - - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #bottle_specification ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute bottle_specification.

    -
    - -
  • - - - -
  • - - - #build ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute build.

    -
    - -
  • - - - -
  • - - - #compiler_failures ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute compiler_failures.

    -
    - -
  • - - - -
  • - - - #dependency_collector ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute dependency_collector.

    -
    - -
  • - - - -
  • - - - #deprecated_flags ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute deprecated_flags.

    -
    - -
  • - - - -
  • - - - #deprecated_options ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute deprecated_options.

    -
    - -
  • - - - -
  • - - - #full_name ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute full_name.

    -
    - -
  • - - - -
  • - - - #name ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute name.

    -
    - -
  • - - - -
  • - - - #options ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute options.

    -
    - -
  • - - - -
  • - - - #owner ⇒ Object - - - - - - - - - - - - - private - -

    Returns the value of attribute owner.

    -
    - -
  • - - - -
  • - - - #patches ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute patches.

    -
    - -
  • - - - -
  • - - - #resources ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute resources.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from OnSystem::MacOSAndLinux

-

included

-
-

Constructor Details

- -
-

- - #initialize(flags: []) ⇒ SoftwareSpec - - - - - -

-
-

Returns a new instance of SoftwareSpec.

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-
-
# File 'software_spec.rb', line 36
-
-def initialize(flags: [])
-  # Ensure this is synced with `initialize_dup` and `freeze` (excluding simple objects like integers and booleans)
-  @resource = Resource.new
-  @resources = {}
-  @dependency_collector = DependencyCollector.new
-  @bottle_specification = BottleSpecification.new
-  @patches = []
-  @options = Options.new
-  @flags = flags
-  @deprecated_flags = []
-  @deprecated_options = []
-  @build = BuildOptions.new(Options.create(@flags), options)
-  @compiler_failures = []
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #bottle_specificationObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute bottle_specification.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def bottle_specification
-  @bottle_specification
-end
-
-
- - - -
-

- - #buildObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute build.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def build
-  @build
-end
-
-
- - - -
-

- - #compiler_failuresObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute compiler_failures.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def compiler_failures
-  @compiler_failures
-end
-
-
- - - -
-

- - #dependency_collectorObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute dependency_collector.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def dependency_collector
-  @dependency_collector
-end
-
-
- - - -
-

- - #deprecated_flagsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute deprecated_flags.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def deprecated_flags
-  @deprecated_flags
-end
-
-
- - - -
-

- - #deprecated_optionsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute deprecated_options.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def deprecated_options
-  @deprecated_options
-end
-
-
- - - -
-

- - #full_nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute full_name.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def full_name
-  @full_name
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute name.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def name
-  @name
-end
-
-
- - - -
-

- - #optionsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute options.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def options
-  @options
-end
-
-
- - - -
-

- - #ownerObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute owner.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def owner
-  @owner
-end
-
-
- - - -
-

- - #patchesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute patches.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def patches
-  @patches
-end
-
-
- - - -
-

- - #resourcesObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute resources.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'software_spec.rb', line 27
-
-def resources
-  @resources
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #add_dep_option(dep) ⇒ Object - - - - - -

- - - - -
-
-
-
-266
-267
-268
-269
-270
-271
-272
-273
-274
-
-
# File 'software_spec.rb', line 266
-
-def add_dep_option(dep)
-  dep.option_names.each do |name|
-    if dep.optional? && !option_defined?("with-#{name}")
-      options << Option.new("with-#{name}", "Build with #{name} support")
-    elsif dep.recommended? && !option_defined?("without-#{name}")
-      options << Option.new("without-#{name}", "Build without #{name} support")
-    end
-  end
-end
-
-
- -
-

- - #bottle(&block) ⇒ Object - - - - - -

- - - - -
-
-
-
-118
-119
-120
-
-
# File 'software_spec.rb', line 118
-
-def bottle(&block)
-  bottle_specification.instance_eval(&block)
-end
-
-
- -
-

- - #bottle_defined?Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-105
-106
-107
-
-
# File 'software_spec.rb', line 105
-
-def bottle_defined?
-  !bottle_specification.collector.tags.empty?
-end
-
-
- -
-

- - #bottle_tag?(tag = nil) ⇒ Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-109
-110
-111
-
-
# File 'software_spec.rb', line 109
-
-def bottle_tag?(tag = nil)
-  bottle_specification.tag?(Utils::Bottles.tag(tag))
-end
-
-
- -
-

- - #bottled?(tag = nil) ⇒ Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-113
-114
-115
-116
-
-
# File 'software_spec.rb', line 113
-
-def bottled?(tag = nil)
-  bottle_tag?(tag) &&
-    (tag.present? || bottle_specification.compatible_locations? || owner.force_bottle)
-end
-
-
- -
-

- - #declared_depsObject - - - - - -

- - - - -
-
-
-
-219
-220
-221
-
-
# File 'software_spec.rb', line 219
-
-def declared_deps
-  dependency_collector.deps
-end
-
-
- -
-

- - #depends_on(spec) ⇒ Object - - - - - -

- - - - -
-
-
-
-190
-191
-192
-193
-
-
# File 'software_spec.rb', line 190
-
-def depends_on(spec)
-  dep = dependency_collector.add(spec)
-  add_dep_option(dep) if dep
-end
-
-
- -
-

- - #deprecated_option(hash) ⇒ Object - - - - - -

-
- - -
-
-
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-
-
# File 'software_spec.rb', line 168
-
-def deprecated_option(hash)
-  raise ArgumentError, "deprecated_option hash must not be empty" if hash.empty?
-
-  hash.each do |old_options, new_options|
-    Array(old_options).each do |old_option|
-      Array(new_options).each do |new_option|
-        deprecated_option = DeprecatedOption.new(old_option, new_option)
-        deprecated_options << deprecated_option
-
-        old_flag = deprecated_option.old_flag
-        new_flag = deprecated_option.current_flag
-        next unless @flags.include? old_flag
-
-        @flags -= [old_flag]
-        @flags |= [new_flag]
-        @deprecated_flags << deprecated_option
-      end
-    end
-  end
-  @build = BuildOptions.new(Options.create(@flags), options)
-end
-
-
- -
-

- - #depsObject - - - - - -

- - - - -
-
-
-
-215
-216
-217
-
-
# File 'software_spec.rb', line 215
-
-def deps
-  dependency_collector.deps.dup_without_system_deps
-end
-
-
- -
-

- - #fails_with(compiler, &block) ⇒ Object - - - - - -

- - - - -
-
-
-
-256
-257
-258
-
-
# File 'software_spec.rb', line 256
-
-def fails_with(compiler, &block)
-  compiler_failures << CompilerFailure.create(compiler, &block)
-end
-
-
- -
-

- - #freezeObject - - - - - -

- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-
-
# File 'software_spec.rb', line 66
-
-def freeze
-  @resource.freeze
-  @resources.freeze
-  @dependency_collector.freeze
-  @bottle_specification.freeze
-  @patches.freeze
-  @options.freeze
-  @flags.freeze
-  @deprecated_flags.freeze
-  @deprecated_options.freeze
-  @build.freeze
-  @compiler_failures.freeze
-  super
-end
-
-
- -
-

- - #go_resource(name, &block) ⇒ Object - - - - - -

- - - - -
-
-
-
-145
-146
-147
-148
-
-
# File 'software_spec.rb', line 145
-
-def go_resource(name, &block)
-  odeprecated "`SoftwareSpec#go_resource`", "Go modules"
-  resource name, Resource::Go, &block
-end
-
-
- -
-

- - #initialize_dup(other) ⇒ Object - - - - - -

- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'software_spec.rb', line 51
-
-def initialize_dup(other)
-  super
-  @resource = @resource.dup
-  @resources = @resources.dup
-  @dependency_collector = @dependency_collector.dup
-  @bottle_specification = @bottle_specification.dup
-  @patches = @patches.dup
-  @options = @options.dup
-  @flags = @flags.dup
-  @deprecated_flags = @deprecated_flags.dup
-  @deprecated_options = @deprecated_options.dup
-  @build = @build.dup
-  @compiler_failures = @compiler_failures.dup
-end
-
-
- -
-

- - #needs(*standards) ⇒ Object - - - - - -

- - - - -
-
-
-
-260
-261
-262
-263
-264
-
-
# File 'software_spec.rb', line 260
-
-def needs(*standards)
-  standards.each do |standard|
-    compiler_failures.concat CompilerFailure.for_standard(standard)
-  end
-end
-
-
- -
-

- - #option(name, description = "") ⇒ Object - - - - - -

- - - - -
-
-
-
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-
-
# File 'software_spec.rb', line 154
-
-def option(name, description = "")
-  opt = PREDEFINED_OPTIONS.fetch(name) do
-    unless name.is_a?(String)
-      raise ArgumentError, "option name must be string or symbol; got a #{name.class}: #{name}"
-    end
-    raise ArgumentError, "option name is required" if name.empty?
-    raise ArgumentError, "option name must be longer than one character: #{name}" if name.length <= 1
-    raise ArgumentError, "option name must not start with dashes: #{name}" if name.start_with?("-")
-
-    Option.new(name, description)
-  end
-  options << opt
-end
-
-
- -
-

- - #option_defined?(name) ⇒ Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-150
-151
-152
-
-
# File 'software_spec.rb', line 150
-
-def option_defined?(name)
-  options.include?(name)
-end
-
-
- -
-

- - #patch(strip = :p1, src = nil, &block) ⇒ Object - - - - - -

- - - - -
-
-
-
-248
-249
-250
-251
-252
-253
-254
-
-
# File 'software_spec.rb', line 248
-
-def patch(strip = :p1, src = nil, &block)
-  p = Patch.create(strip, src, &block)
-  return if p.is_a?(ExternalPatch) && p.url.blank?
-
-  dependency_collector.add(p.resource) if p.is_a? ExternalPatch
-  patches << p
-end
-
-
- -
-

- - #recursive_dependenciesObject - - - - - -

- - - - -
-
-
-
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-
-
# File 'software_spec.rb', line 223
-
-def recursive_dependencies
-  deps_f = []
-  recursive_dependencies = deps.filter_map do |dep|
-    deps_f << dep.to_formula
-    dep
-  rescue TapFormulaUnavailableError
-    # Don't complain about missing cross-tap dependencies
-    next
-  end.uniq
-  deps_f.compact.each do |f|
-    f.recursive_dependencies.each do |dep|
-      recursive_dependencies << dep unless recursive_dependencies.include?(dep)
-    end
-  end
-  recursive_dependencies
-end
-
-
- -
-

- - #recursive_requirementsObject - - - - - -

- - - - -
-
-
-
-244
-245
-246
-
-
# File 'software_spec.rb', line 244
-
-def recursive_requirements
-  Requirement.expand(self)
-end
-
-
- -
-

- - #requirementsObject - - - - - -

- - - - -
-
-
-
-240
-241
-242
-
-
# File 'software_spec.rb', line 240
-
-def requirements
-  dependency_collector.requirements
-end
-
-
- -
-

- - #resource(name, klass = Resource, &block) ⇒ Resource? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - klass - - - (T.class_of(Resource)) - - - (defaults to: Resource) - - -
  • - -
  • - - block - - - (T.proc.bind(Resource).void, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-
-
# File 'software_spec.rb', line 130
-
-def resource(name, klass = Resource, &block)
-  if block
-    raise DuplicateResourceError, name if resource_defined?(name)
-
-    res = klass.new(name, &block)
-    return unless res.url
-
-    resources[name] = res
-    dependency_collector.add(res)
-    res
-  else
-    resources.fetch(name) { raise ResourceMissingError.new(owner, name) }
-  end
-end
-
-
- -
-

- - #resource_defined?(name) ⇒ Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-122
-123
-124
-
-
# File 'software_spec.rb', line 122
-
-def resource_defined?(name)
-  resources.key?(name)
-end
-
-
- -
-

- - #url(val = nil, specs = {}) ⇒ Object - - - - - -

- - - - -
-
-
-
-98
-99
-100
-101
-102
-103
-
-
# File 'software_spec.rb', line 98
-
-def url(val = nil, specs = {})
-  return @resource.url if val.nil?
-
-  @resource.url(val, **specs)
-  dependency_collector.add(@resource)
-end
-
-
- -
-

- - #uses_from_macos(dep, bounds = {}) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-
-
# File 'software_spec.rb', line 201
-
-def uses_from_macos(dep, bounds = {})
-  if dep.is_a?(Hash)
-    bounds = dep.dup
-    dep, tags = bounds.shift
-    dep = T.cast(dep, String)
-    tags = [*tags]
-    bounds = T.cast(bounds, T::Hash[Symbol, Symbol])
-  else
-    tags = []
-  end
-
-  depends_on UsesFromMacOSDependency.new(dep, tags, bounds:)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Sorbet/Private.html b/docs/Sorbet/Private.html deleted file mode 100644 index 06c34aebf..000000000 --- a/docs/Sorbet/Private.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: Sorbet::Private - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Sorbet::Private - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
extend/ENV.rbi,
- extend/ENV/shared.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Static - - - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Sorbet/Private/Static.html b/docs/Sorbet/Private/Static.html deleted file mode 100644 index cb3640101..000000000 --- a/docs/Sorbet/Private/Static.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Module: Sorbet::Private::Static - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Sorbet::Private::Static - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
extend/ENV.rbi,
- extend/ENV/shared.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: ENVClass - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Sorbet/Private/Static/ENVClass.html b/docs/Sorbet/Private/Static/ENVClass.html deleted file mode 100644 index 53ee1cd9b..000000000 --- a/docs/Sorbet/Private/Static/ENVClass.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - Class: Sorbet::Private::Static::ENVClass - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Sorbet::Private::Static::ENVClass - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
EnvActivation, SharedEnvExtension
-
- - - - - - -
-
Defined in:
-
extend/ENV.rbi,
- extend/ENV/shared.rbi
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from CompilerConstants

-

CompilerConstants::COMPILERS, CompilerConstants::COMPILER_SYMBOL_MAP, CompilerConstants::GNU_GCC_REGEXP, CompilerConstants::GNU_GCC_VERSIONS

- - - - -

Instance Attribute Summary

- -

Attributes included from Superenv

-

#deps, #keg_only_deps, #run_time_deps

- - - - - - - - - -

Method Summary

- -

Methods included from SharedEnvExtension

-

#append, #append_path, #append_to_cccfg, #append_to_cflags, #cc, #cflags, #compiler, #cppflags, #cxx, #cxxflags, #effective_arch, #fc, #fcflags, #fflags, #fortran, #ldflags, #no_fixup_chains_support?, #no_weak_imports_support?, #permit_arch_flags, #prepend, #prepend_create_path, #prepend_path, #remove, #remove_cc_etc, #remove_from_cflags

- - - - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - - - - - - - -

Methods included from EnvActivation

-

#activate_extensions!, #clear_sensitive_environment!, #sensitive?, #sensitive_environment, #with_build_environment

- - - - - - - - - -

Methods included from Superenv

-

#O0, #O1, #O3, bin, #cxx11, #deparallelize, #determine_cccfg, #determine_dynamic_linker_path, #determine_rpath_paths, extended, #homebrew_extra_cmake_frameworks_paths, #homebrew_extra_cmake_include_paths, #homebrew_extra_cmake_library_paths, #homebrew_extra_isystem_paths, #homebrew_extra_library_paths, #homebrew_extra_paths, #libcxx, #make_jobs, #no_fixup_chains, #no_weak_imports, #permit_arch_flags, #refurbish_args, #reset, #runtime_cpu_detection, #set_debug_symbols, shims_path

- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Stdenv.html b/docs/Stdenv.html deleted file mode 100644 index e868d59cf..000000000 --- a/docs/Stdenv.html +++ /dev/null @@ -1,1357 +0,0 @@ - - - - - - - Module: Stdenv - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Stdenv - - - Private -

-
- - - - - - -
-
Includes:
-
SharedEnvExtension
-
- - - - - - -
-
Defined in:
-
extend/os/mac/extend/ENV/std.rb,
- extend/os/linux/extend/ENV/std.rb,
extend/ENV/std.rb
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from CompilerConstants

-

CompilerConstants::COMPILERS, CompilerConstants::COMPILER_SYMBOL_MAP, CompilerConstants::GNU_GCC_REGEXP, CompilerConstants::GNU_GCC_VERSIONS

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SharedEnvExtension

-

#append, #append_path, #append_to_cccfg, #append_to_cflags, #cc, #cflags, #compiler, #cppflags, #cxx, #cxxflags, #effective_arch, #fc, #fcflags, #fflags, #fortran, #ldflags, #no_fixup_chains_support?, #no_weak_imports_support?, #permit_arch_flags, #prepend, #prepend_create_path, #prepend_path, #remove, #remove_cc_etc, #remove_from_cflags

- - - - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - -
-

Instance Method Details

- - -
-

- - #clangvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-
-
# File 'extend/ENV/std.rb', line 130
-
-def clang
-  super
-  replace_in_cflags(/-Xarch_#{Hardware::CPU.arch_32_bit} (-march=\S*)/, '\1')
-  map = Hardware::CPU.optimization_flags.dup
-  if DevelopmentTools.clang_build_version < 700
-    # Clang mistakenly enables AES-NI on plain Nehalem
-    map[:nehalem] = "-march=nehalem -Xclang -target-feature -Xclang -aes"
-  end
-  set_cpu_cflags(map)
-end
-
-
- -
-

- - #cxx11void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-142
-143
-144
-145
-
-
# File 'extend/ENV/std.rb', line 142
-
-def cxx11
-  append "CXX", "-std=c++11"
-  libcxx
-end
-
-
- -
-

- - #deparallelize(&block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Removes the MAKEFLAGS environment variable, causing make to use a single job. -This is useful for makefiles with race conditions. -When passed a block, MAKEFLAGS is removed only for the duration of the block and is restored after its completion.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.returns(T.untyped)) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-
-
# File 'extend/ENV/std.rb', line 87
-
-def deparallelize(&block)
-  old = self["MAKEFLAGS"]
-  remove "MAKEFLAGS", /-j\d+/
-  if block
-    begin
-      yield
-    ensure
-      self["MAKEFLAGS"] = old
-    end
-  end
-
-  old
-end
-
-
- -
-

- - #determine_pkg_config_libdirPATH? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (PATH, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-74
-75
-76
-77
-78
-79
-80
-81
-
-
# File 'extend/ENV/std.rb', line 74
-
-def determine_pkg_config_libdir
-  PATH.new(
-    HOMEBREW_PREFIX/"lib/pkgconfig",
-    HOMEBREW_PREFIX/"share/pkgconfig",
-    homebrew_extra_pkg_config_paths,
-    "/usr/lib/pkgconfig",
-  ).existing
-end
-
-
- -
-

- - #libcxxvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-148
-149
-150
-
-
# File 'extend/ENV/std.rb', line 148
-
-def libcxx
-  append "CXX", "-stdlib=libc++" if compiler == :clang
-end
-
-
- -
-

- - #libxml2Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Some configure scripts won't find libxml2 without help. -This is a no-op with macOS SDK 10.15.4 and later.

- - -
-
-
- - -
- - - - -
-
-
-
-100
-101
-102
-103
-104
-105
-106
-107
-108
-
-
# File 'extend/os/mac/extend/ENV/std.rb', line 100
-
-def libxml2
-  sdk = self["SDKROOT"] || MacOS.sdk_path_if_needed
-  if !sdk
-    append "CPPFLAGS", "-I/usr/include/libxml2"
-  elsif !Pathname("#{sdk}/usr/include/libxml").directory?
-    # Use the includes form the sdk
-    append "CPPFLAGS", "-I#{sdk}/usr/include/libxml2"
-  end
-end
-
-
- -
-

- - #macosxsdk(version = nil, formula: nil, testing_formula: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-
-
# File 'extend/os/mac/extend/ENV/std.rb', line 66
-
-def macosxsdk(version = nil, formula: nil, testing_formula: false)
-  # Sets all needed `lib` and `include` dirs to `CFLAGS`, `CPPFLAGS`, `LDFLAGS`.
-  remove_macosxsdk
-  min_version = version || MacOS.version
-  append_to_cflags("-mmacosx-version-min=#{min_version}")
-  self["CPATH"] = "#{HOMEBREW_PREFIX}/include"
-  prepend "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib"
-
-  sdk = if formula
-    MacOS.sdk_for_formula(formula, version, check_only_runtime_requirements: testing_formula)
-  else
-    MacOS.sdk(version)
-  end
-  return if !MacOS.sdk_root_needed? && sdk&.source != :xcode
-
-  Homebrew::Diagnostic.checks(:fatal_setup_build_environment_checks)
-  sdk = sdk.path
-
-  # Extra setup to support Xcode 4.3+ without CLT.
-  self["SDKROOT"] = sdk
-  # Tell clang/gcc where system include's are:
-  append_path "CPATH", "#{sdk}/usr/include"
-  # The -isysroot is needed, too, because of the Frameworks
-  append_to_cflags "-isysroot#{sdk}"
-  append "CPPFLAGS", "-isysroot#{sdk}"
-  # And the linker needs to find sdk/usr/lib
-  append "LDFLAGS", "-isysroot#{sdk}"
-  # Needed to build cmake itself and perhaps some cmake projects:
-  append_path "CMAKE_PREFIX_PATH", "#{sdk}/usr"
-  append_path "CMAKE_FRAMEWORK_PATH", "#{sdk}/System/Library/Frameworks"
-end
-
-
- -
-

- - #make_jobsInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-153
-154
-155
-
-
# File 'extend/ENV/std.rb', line 153
-
-def make_jobs
-  Homebrew::EnvConfig.make_jobs.to_i
-end
-
-
- -
-

- - #no_fixup_chainsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-114
-115
-116
-
-
# File 'extend/os/mac/extend/ENV/std.rb', line 114
-
-def no_fixup_chains
-  append "LDFLAGS", "-Wl,-no_fixup_chains" if no_fixup_chains_support?
-end
-
-
- -
-

- - #no_weak_importsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-110
-111
-112
-
-
# File 'extend/os/mac/extend/ENV/std.rb', line 110
-
-def no_weak_imports
-  append "LDFLAGS", "-Wl,-no_weak_imports" if no_weak_imports_support?
-end
-
-
- -
-

- - #refurbish_argsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

This method does nothing in Stdenv since there is no argument refurbishment.

- - -
-
-
- - -
- - - - -
-
-
-
-159
-
-
# File 'extend/ENV/std.rb', line 159
-
-def refurbish_args; end
-
-
- -
-

- - #remove_macosxsdk(version = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'extend/os/mac/extend/ENV/std.rb', line 43
-
-def remove_macosxsdk(version = nil)
-  # Clear all `lib` and `include` dirs from `CFLAGS`, `CPPFLAGS`, `LDFLAGS` that were
-  # previously added by `macosxsdk`.
-  remove_from_cflags(/ ?-mmacosx-version-min=\d+\.\d+/)
-  delete("CPATH")
-  remove "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib"
-
-  sdk = self["SDKROOT"] || MacOS.sdk_path_if_needed(version)
-  return unless sdk
-
-  delete("SDKROOT")
-  remove_from_cflags "-isysroot#{sdk}"
-  remove "CPPFLAGS", "-isysroot#{sdk}"
-  remove "LDFLAGS", "-isysroot#{sdk}"
-  if HOMEBREW_PREFIX.to_s == "/usr/local"
-    delete("CMAKE_PREFIX_PATH")
-  else
-    # It was set in `setup_build_environment`, so we have to restore it here.
-    self["CMAKE_PREFIX_PATH"] = HOMEBREW_PREFIX.to_s
-  end
-  remove "CMAKE_FRAMEWORK_PATH", "#{sdk}/System/Library/Frameworks"
-end
-
-
- -
-

- - #setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false, debug_symbols: false) ⇒ void - - - - Also known as: - generic_setup_build_environment - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula, nil) - - - (defaults to: nil) - - -
  • - -
  • - - cc - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - build_bottle - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - bottle_arch - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
  • - - testing_formula - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - debug_symbols - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'extend/os/mac/extend/ENV/std.rb', line 23
-
-def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false,
-                            debug_symbols: false)
-  generic_setup_build_environment(formula:, cc:, build_bottle:, bottle_arch:,
-                                  testing_formula:, debug_symbols:)
-
-  append "LDFLAGS", "-Wl,-headerpad_max_install_names"
-
-  # `sed` is strict and errors out when it encounters files with mixed character sets.
-  delete("LC_ALL")
-  self["LC_CTYPE"] = "C"
-
-  # Add `lib` and `include` etc. from the current `macosxsdk` to compiler flags:
-  macosxsdk(formula: @formula, testing_formula:)
-
-  return unless MacOS::Xcode.without_clt?
-
-  append_path "PATH", "#{MacOS::Xcode.prefix}/usr/bin"
-  append_path "PATH", "#{MacOS::Xcode.toolchain_path}/usr/bin"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/String.html b/docs/String.html deleted file mode 100644 index 891053f5c..000000000 --- a/docs/String.html +++ /dev/null @@ -1,470 +0,0 @@ - - - - - - - Class: String - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: String - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/string.rb,
- dev-cmd/irb.rb,
extend/blank.rb
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-

Direct Known Subclasses

-

Cask::DSL::Version

-
- - -

- Constant Summary - collapse -

- -
- -
BLANK_RE = - -
-
/\A[[:space:]]*\z/
- -
ENCODED_BLANKS_ = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.let(Hash.new do |h, enc|
-  h[enc] = Regexp.new(BLANK_RE.source.encode(enc), BLANK_RE.options | Regexp::FIXEDENCODING)
-end, T::Hash[Encoding, Regexp])
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #blank?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A string is blank if it's empty or contains whitespaces only:

- -
''.blank?       # => true
-'   '.blank?    # => true
-"\t\n\r".blank? # => true
-' blah '.blank? # => false
-
- -

Unicode whitespace is supported:

- -
"\u00a0".blank? # => true
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-
-
# File 'extend/blank.rb', line 158
-
-def blank?
-  # The regexp that matches blank strings is expensive. For the case of empty
-  # strings we can speed up this method (~3.5x) with an empty? call. The
-  # penalty for the rest of strings is marginal.
-  empty? ||
-    begin
-      BLANK_RE.match?(self)
-    rescue Encoding::CompatibilityError
-      T.must(ENCODED_BLANKS_[encoding]).match?(self)
-    end
-end
-
-
- -
-

- - #exclude?(string) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The inverse of String#include?. Returns true if the string -does not include the other string.

- -

"hello".exclude? "lo" # => false - "hello".exclude? "ol" # => true - "hello".exclude? ?h # => false

- - -
-
-
-

Parameters:

-
    - -
  • - - string - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-
-
# File 'extend/string.rb', line 12
-
-def exclude?(string) = !include?(string)
-
-
- -
-

- - #present?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-171
-
-
# File 'extend/blank.rb', line 171
-
-def present? = !blank? # :nodoc:
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/StringInreplaceExtension.html b/docs/StringInreplaceExtension.html deleted file mode 100644 index f916ee5bb..000000000 --- a/docs/StringInreplaceExtension.html +++ /dev/null @@ -1,910 +0,0 @@ - - - - - - - Class: StringInreplaceExtension - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: StringInreplaceExtension - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/string_inreplace_extension.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Used by the inreplace function (in utils.rb).

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(string) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - string - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-
-
# File 'utils/string_inreplace_extension.rb', line 13
-
-def initialize(string)
-  @inreplace_string = string
-  @errors = T.let([], T::Array[String])
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #errorsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'utils/string_inreplace_extension.rb', line 7
-
-def errors
-  @errors
-end
-
-
- - - -
-

- - #inreplace_stringString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'utils/string_inreplace_extension.rb', line 10
-
-def inreplace_string
-  @inreplace_string
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #change_make_var!(flag, new_value) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Looks for Makefile style variable definitions and replaces the -value with "new_value", or removes the definition entirely.

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-
-
# File 'utils/string_inreplace_extension.rb', line 47
-
-def change_make_var!(flag, new_value)
-  return if gsub!(/^#{Regexp.escape(flag)}[ \t]*[\\?+:!]?=[ \t]*((?:.*\\\n)*.*)$/, "#{flag}=#{new_value}", false)
-
-  errors << "expected to change #{flag.inspect} to #{new_value.inspect}"
-end
-
-
- -
-

- - #get_make_var(flag) ⇒ String - - - - - -

-
-

Finds the specified variable.

- - -
-
-
-

Parameters:

-
    - -
  • - - flag - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-
-
# File 'utils/string_inreplace_extension.rb', line 70
-
-def get_make_var(flag)
-  T.must(inreplace_string[/^#{Regexp.escape(flag)}[ \t]*[\\?+:!]?=[ \t]*((?:.*\\\n)*.*)$/, 1])
-end
-
-
- -
-

- - #gsub!(before, after, audit_result = true) ⇒ String? - - - - - -

-
-

Same as String#gsub!, but warns if nothing was replaced.

- - -
-
-
-

Parameters:

-
    - -
  • - - before - - - (Pathname, Regexp, String) - - - -
  • - -
  • - - after - - - (Pathname, String) - - - -
  • - -
  • - - audit_result - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-
-
# File 'utils/string_inreplace_extension.rb', line 35
-
-def gsub!(before, after, audit_result = true) # rubocop:disable Style/OptionalBooleanParameter
-  before = before.to_s if before.is_a?(Pathname)
-  result = inreplace_string.gsub!(before, after.to_s)
-  errors << "expected replacement of #{before.inspect} with #{after.inspect}" if audit_result && result.nil?
-  result
-end
-
-
- -
-

- - #remove_make_var!(flags) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Removes variable assignments completely.

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'utils/string_inreplace_extension.rb', line 57
-
-def remove_make_var!(flags)
-  Array(flags).each do |flag|
-    # Also remove trailing \n, if present.
-    unless gsub!(/^#{Regexp.escape(flag)}[ \t]*[\\?+:!]?=(?:.*\\\n)*.*$\n?/, "", false)
-      errors << "expected to remove #{flag.inspect}"
-    end
-  end
-end
-
-
- -
-

- - #sub!(before, after) ⇒ String? - - - - - -

-
-

Same as String#sub!, but warns if nothing was replaced.

- - -
-
-
-

Parameters:

-
    - -
  • - - before - - - (Regexp, String) - - - -
  • - -
  • - - after - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-
-
# File 'utils/string_inreplace_extension.rb', line 22
-
-def sub!(before, after)
-  result = inreplace_string.sub!(before, after)
-  errors << "expected replacement of #{before.inspect} with #{after.inspect}" unless result
-  result
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/StringPatch.html b/docs/StringPatch.html deleted file mode 100644 index b4cc78a6e..000000000 --- a/docs/StringPatch.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - Class: StringPatch - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: StringPatch - - - Private -

-
- -
-
Inherits:
-
- EmbeddedPatch - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
patch.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A string containing a patch.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from EmbeddedPatch

-

#owner, #strip

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from EmbeddedPatch

-

#apply, #external?

-
-

Constructor Details

- -
-

- - #initialize(strip, str) ⇒ StringPatch - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of StringPatch.

- - -
-
-
- - -
- - - - -
-
-
-
-87
-88
-89
-90
-
-
# File 'patch.rb', line 87
-
-def initialize(strip, str)
-  super(strip)
-  @str = str
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #contentsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-92
-93
-94
-
-
# File 'patch.rb', line 92
-
-def contents
-  @str
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SubversionDownloadStrategy.html b/docs/SubversionDownloadStrategy.html deleted file mode 100644 index e0ce26301..000000000 --- a/docs/SubversionDownloadStrategy.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - Class: SubversionDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: SubversionDownloadStrategy - - - -

-
- -
-
Inherits:
-
- VCSDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

Strategy for downloading a Subversion repository.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants inherited - from VCSDownloadStrategy

-

VCSDownloadStrategy::REF_TYPES

- - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from VCSDownloadStrategy

-

#commit_outdated?, #fetch_last_commit, #head?

- - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #quiet!, #quiet?, #shutup!, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ SubversionDownloadStrategy - - - - - -

-
-

Returns a new instance of SubversionDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-717
-718
-719
-720
-
-
# File 'download_strategy.rb', line 717
-
-def initialize(url, name, version, **meta)
-  super
-  @url = @url.sub("svn+http://", "")
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #fetch(timeout: nil) ⇒ Object - - - - - -

-
-

Download and cache the repository at AbstractDownloadStrategy#cached_location.

- - -
-
-
- - -
- - - - -
-
-
-
-725
-726
-727
-728
-729
-730
-
-
# File 'download_strategy.rb', line 725
-
-def fetch(timeout: nil)
-  if @url.chomp("/") != repo_url || !silent_command("svn", args: ["switch", @url, cached_location]).success?
-    clear_cache
-  end
-  super
-end
-
-
- -
-

- - #last_commitString - - - - - -

-
-

Return last commit's unique identifier for the repository.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-751
-752
-753
-754
-
-
# File 'download_strategy.rb', line 751
-
-def last_commit
-  out, = silent_command("svn", args: ["info", "--show-item", "revision"], chdir: cached_location)
-  out.strip
-end
-
-
- -
-

- - #source_modified_timeTime - - - - - -

-
-

Returns the most recent modified time for all files in the current working directory after stage.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-736
-737
-738
-739
-740
-741
-742
-743
-744
-745
-
-
# File 'download_strategy.rb', line 736
-
-def source_modified_time
-  time = if Version.new(T.must(Utils::Svn.version)) >= Version.new("1.9")
-    out, = silent_command("svn", args: ["info", "--show-item", "last-changed-date"], chdir: cached_location)
-    out
-  else
-    out, = silent_command("svn", args: ["info"], chdir: cached_location)
-    out[/^Last Changed Date: (.+)$/, 1]
-  end
-  Time.parse time
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Superenv.html b/docs/Superenv.html deleted file mode 100644 index deacfc2b1..000000000 --- a/docs/Superenv.html +++ /dev/null @@ -1,2474 +0,0 @@ - - - - - - - Module: Superenv - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Superenv - - - Private -

-
- - - - - - -
-
Includes:
-
SharedEnvExtension
-
- - - - -
-
Included in:
-
EnvActivation
-
- - - -
-
Defined in:
-
extend/os/mac/extend/ENV/super.rb,
- extend/os/linux/extend/ENV/super.rb,
extend/ENV/super.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Why superenv?

- -
    -
  1. Only specify the environment we need (NO LDFLAGS for cmake)
  2. -
  3. Only apply compiler-specific options when we are calling that compiler
  4. -
  5. Force all incpaths and libpaths into the cc instantiation (fewer bugs)
  6. -
  7. Cater toolchain usage to specific Xcode versions
  8. -
  9. Remove flags that we don't want or that will break builds
  10. -
  11. Simpler code
  12. -
  13. Simpler formulae that just work
  14. -
  15. Build-system agnostic configuration of the toolchain
  16. -
- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from CompilerConstants

-

CompilerConstants::COMPILERS, CompilerConstants::COMPILER_SYMBOL_MAP, CompilerConstants::GNU_GCC_REGEXP, CompilerConstants::GNU_GCC_VERSIONS

- - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SharedEnvExtension

-

#append, #append_path, #append_to_cccfg, #append_to_cflags, #cc, #cflags, #compiler, #cppflags, #cxx, #cxxflags, #effective_arch, #fc, #fcflags, #fflags, #fortran, #ldflags, #no_fixup_chains_support?, #no_weak_imports_support?, #prepend, #prepend_create_path, #prepend_path, #remove, #remove_cc_etc, #remove_from_cflags

- - - - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - -
-

Instance Attribute Details

- - - -
-

- - #depsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'extend/ENV/super.rb', line 20
-
-def deps
-  @deps
-end
-
-
- - - -
-

- - #keg_only_depsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'extend/ENV/super.rb', line 20
-
-def keg_only_deps
-  @keg_only_deps
-end
-
-
- - - -
-

- - #run_time_depsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'extend/ENV/super.rb', line 20
-
-def run_time_deps
-  @run_time_deps
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .binPathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 13
-
-def bin
-  return unless DevelopmentTools.installed?
-
-  shims_path.realpath
-end
-
-
- -
-

- - .extended(base) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - base - - - (Superenv) - - - -
  • - -
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-
-
# File 'extend/ENV/super.rb', line 23
-
-def self.extended(base)
-  base.keg_only_deps = []
-  base.deps = []
-  base.run_time_deps = []
-end
-
-
- -
-

- - .shims_pathPathname - - - - - -

-
-

The location of Homebrew's shims.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 7
-
-def shims_path
-  HOMEBREW_SHIMS_PATH/"mac/super"
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #cxx11void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-340
-341
-342
-343
-
-
# File 'extend/ENV/super.rb', line 340
-
-def cxx11
-  append_to_cccfg "x"
-  append_to_cccfg "g" if homebrew_cc == "clang"
-end
-
-
- -
-

- - #deparallelize(&block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Removes the MAKEFLAGS environment variable, causing make to use a single job. -This is useful for makefiles with race conditions. -When passed a block, MAKEFLAGS is removed only for the duration of the block and is restored after its completion.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.returns(T.untyped), nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-
-
# File 'extend/ENV/super.rb', line 310
-
-def deparallelize(&block)
-  old = delete("MAKEFLAGS")
-  if block
-    begin
-      yield
-    ensure
-      self["MAKEFLAGS"] = old
-    end
-  end
-
-  old
-end
-
-
- -
-

- - #determine_cccfgString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-79
-80
-81
-82
-83
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 78
-
-def determine_cccfg
-  s = +""
-  # Fix issue with >= Mountain Lion apr-1-config having broken paths
-  s << "a"
-  s.freeze
-end
-
-
- -
-

- - #determine_dynamic_linker_pathString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-67
-68
-69
-70
-71
-72
-
-
# File 'extend/os/linux/extend/ENV/super.rb', line 67
-
-def determine_dynamic_linker_path
-  path = "#{HOMEBREW_PREFIX}/lib/ld.so"
-  return unless File.readable? path
-
-  path
-end
-
-
- -
-

- - #determine_rpath_paths(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'extend/os/linux/extend/ENV/super.rb', line 57
-
-def determine_rpath_paths(formula)
-  PATH.new(
-    *formula&.lib,
-    "#{HOMEBREW_PREFIX}/opt/gcc/lib/gcc/current",
-    PATH.new(run_time_deps.map { |dep| dep.opt_lib.to_s }).existing,
-    "#{HOMEBREW_PREFIX}/lib",
-  )
-end
-
-
- -
-

- - #homebrew_extra_cmake_frameworks_pathsArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 72
-
-def homebrew_extra_cmake_frameworks_paths
-  paths = []
-  paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks" if MacOS::Xcode.without_clt?
-  paths
-end
-
-
- -
-

- - #homebrew_extra_cmake_include_pathsArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-65
-66
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 60
-
-def homebrew_extra_cmake_include_paths
-  paths = []
-  paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml2" if libxml2_include_needed?
-  paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/apache2" if MacOS::Xcode.without_clt?
-  paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
-  paths
-end
-
-
- -
-

- - #homebrew_extra_cmake_library_pathsArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-68
-69
-70
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 68
-
-def homebrew_extra_cmake_library_paths
-  [Pathname("#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries")]
-end
-
-
- -
-

- - #homebrew_extra_isystem_pathsArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-47
-48
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 42
-
-def homebrew_extra_isystem_paths
-  paths = []
-  paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml2" if libxml2_include_needed?
-  paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/apache2" if MacOS::Xcode.without_clt?
-  paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
-  paths
-end
-
-
- -
-

- - #homebrew_extra_library_pathsArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 50
-
-def homebrew_extra_library_paths
-  paths = []
-  if compiler == :llvm_clang
-    paths << "#{self["HOMEBREW_SDKROOT"]}/usr/lib"
-    paths << Formula["llvm"].opt_lib.to_s
-  end
-  paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
-  paths
-end
-
-
- -
-

- - #homebrew_extra_pathsArray<Pathname> - - - - Also known as: - generic_homebrew_extra_paths - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'extend/os/linux/extend/ENV/super.rb', line 35
-
-def homebrew_extra_paths
-  paths = generic_homebrew_extra_paths
-  paths += %w[binutils make].filter_map do |f|
-    bin = Formulary.factory(f).opt_bin
-    bin if bin.directory?
-  rescue FormulaUnavailableError
-    nil
-  end
-  paths
-end
-
-
- -
-

- - #libcxxvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-346
-347
-348
-
-
# File 'extend/ENV/super.rb', line 346
-
-def libcxx
-  append_to_cccfg "g" if compiler == :clang
-end
-
-
- -
-

- - #make_jobsInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-324
-325
-326
-327
-
-
# File 'extend/ENV/super.rb', line 324
-
-def make_jobs
-  self["MAKEFLAGS"] =~ /-\w*j(\d+)/
-  [Regexp.last_match(1).to_i, 1].max
-end
-
-
- -
-

- - #no_fixup_chainsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-152
-153
-154
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 152
-
-def no_fixup_chains
-  append_to_cccfg "f" if no_fixup_chains_support?
-end
-
-
- -
-

- - #no_weak_importsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-148
-149
-150
-
-
# File 'extend/os/mac/extend/ENV/super.rb', line 148
-
-def no_weak_imports
-  append_to_cccfg "w" if no_weak_imports_support?
-end
-
-
- -
-

- - #O0(&block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-363
-364
-365
-366
-367
-368
-369
-
-
# File 'extend/ENV/super.rb', line 363
-
-def O0(&block)
-  if block
-    with_env(HOMEBREW_OPTIMIZATION_LEVEL: "O0", &block)
-  else
-    self["HOMEBREW_OPTIMIZATION_LEVEL"] = "O0"
-  end
-end
-
-
- -
-

- - #O1(&block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.void, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-372
-373
-374
-375
-376
-377
-378
-
-
# File 'extend/ENV/super.rb', line 372
-
-def O1(&block)
-  if block
-    with_env(HOMEBREW_OPTIMIZATION_LEVEL: "O1", &block)
-  else
-    self["HOMEBREW_OPTIMIZATION_LEVEL"] = "O1"
-  end
-end
-
-
- -
-

- - #O3(&block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - block - - - (T.proc.void, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-381
-382
-383
-384
-385
-386
-387
-
-
# File 'extend/ENV/super.rb', line 381
-
-def O3(&block)
-  if block
-    with_env(HOMEBREW_OPTIMIZATION_LEVEL: "O3", &block)
-  else
-    self["HOMEBREW_OPTIMIZATION_LEVEL"] = "O3"
-  end
-end
-
-
- -
-

- - #permit_arch_flagsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-330
-331
-332
-
-
# File 'extend/ENV/super.rb', line 330
-
-def permit_arch_flags
-  append_to_cccfg "K"
-end
-
-
- -
-

- - #refurbish_argsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-356
-357
-358
-
-
# File 'extend/ENV/super.rb', line 356
-
-def refurbish_args
-  append_to_cccfg "O"
-end
-
-
- -
-

- - #resetvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-
-
# File 'extend/ENV/super.rb', line 41
-
-def reset
-  super
-  # Configure scripts generated by autoconf 2.61 or later export as_nl, which
-  # we use as a heuristic for running under configure
-  delete("as_nl")
-end
-
-
- -
-

- - #runtime_cpu_detectionvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-335
-336
-337
-
-
# File 'extend/ENV/super.rb', line 335
-
-def runtime_cpu_detection
-  append_to_cccfg "d"
-end
-
-
- -
-

- - #set_debug_symbolsvoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-351
-352
-353
-
-
# File 'extend/ENV/super.rb', line 351
-
-def set_debug_symbols
-  append_to_cccfg "D"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Symbol.html b/docs/Symbol.html deleted file mode 100644 index 2a40512d8..000000000 --- a/docs/Symbol.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - Class: Symbol - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Symbol - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dev-cmd/irb.rb,
- extend/blank.rb
-
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #blank?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A Symbol is blank if it's empty:

- -
:''.blank?     # => true
-:symbol.blank? # => false
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-128
-
-
# File 'extend/blank.rb', line 128
-
-def blank? = empty?
-
-
- -
-

- - #present?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-131
-
-
# File 'extend/blank.rb', line 131
-
-def present? = !empty? # :nodoc:
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SystemCommand.html b/docs/SystemCommand.html deleted file mode 100644 index 8d7842a1f..000000000 --- a/docs/SystemCommand.html +++ /dev/null @@ -1,1131 +0,0 @@ - - - - - - - Class: SystemCommand - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: SystemCommand - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Attrable
-
- - - -
-
Includes:
-
Context
-
- - - - - - -
-
Defined in:
-
system_command.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of an internal API. - This class may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Class for running sub-processes and capturing their output and exit status.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Mixin - - - - Classes: Result - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Attrable

-

attr_predicate, attr_rw

- - - - - - - - - -

Methods included from Context

-

current, current=, #quiet?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(executable, args: [], sudo: false, sudo_as_root: false, env: {}, input: [], must_succeed: false, print_stdout: false, print_stderr: true, debug: nil, verbose: false, secrets: [], chdir: T.unsafe(nil), timeout: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - executable - - - (String, Pathname) - - - -
  • - -
  • - - args - - - (Array<String, Integer, Float, URI::Generic>) - - - (defaults to: []) - - -
  • - -
  • - - sudo - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - sudo_as_root - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - env - - - (Hash{String => String}) - - - (defaults to: {}) - - -
  • - -
  • - - input - - - (String, Array<String>) - - - (defaults to: []) - - -
  • - -
  • - - must_succeed - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - print_stdout - - - (Boolean, Symbol) - - - (defaults to: false) - - -
  • - -
  • - - print_stderr - - - (Boolean, Symbol) - - - (defaults to: true) - - -
  • - -
  • - - debug - - - (Boolean, nil) - - - (defaults to: nil) - - -
  • - -
  • - - verbose - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - secrets - - - (String, Array<String>) - - - (defaults to: []) - - -
  • - -
  • - - chdir - - - (String, Pathname) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
  • - - timeout - - - (Integer, Float, nil) - - - (defaults to: nil) - - -
  • - -
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-
-
# File 'system_command.rb', line 97
-
-def initialize(
-  executable,
-  args: [],
-  sudo: false,
-  sudo_as_root: false,
-  env: {},
-  input: [],
-  must_succeed: false,
-  print_stdout: false,
-  print_stderr: true,
-  debug: nil,
-  verbose: false,
-  secrets: [],
-  chdir: T.unsafe(nil),
-  timeout: nil
-)
-  require "extend/ENV"
-  @executable = executable
-  @args = args
-
-  raise ArgumentError, "`sudo_as_root` cannot be set if sudo is false" if !sudo && sudo_as_root
-
-  if print_stdout.is_a?(Symbol) && print_stdout != :debug
-    raise ArgumentError, "`print_stdout` is not a valid symbol"
-  end
-  if print_stderr.is_a?(Symbol) && print_stderr != :debug
-    raise ArgumentError, "`print_stderr` is not a valid symbol"
-  end
-
-  @sudo = sudo
-  @sudo_as_root = sudo_as_root
-  env.each_key do |name|
-    next if /^[\w&&\D]\w*$/.match?(name)
-
-    raise ArgumentError, "Invalid variable name: #{name}"
-  end
-  @env = env
-  @input = Array(input)
-  @must_succeed = must_succeed
-  @print_stdout = print_stdout
-  @print_stderr = print_stderr
-  @debug = debug
-  @verbose = verbose
-  @secrets = (Array(secrets) + ENV.sensitive_environment.values).uniq
-  @chdir = chdir
-  @timeout = timeout
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .run(executable, **options) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'system_command.rb', line 39
-
-def self.run(executable, **options)
-  new(executable, **options).run!
-end
-
-
- -
-

- - .run!(command, **options) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'system_command.rb', line 43
-
-def self.run!(command, **options)
-  run(command, **options, must_succeed: true)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #commandArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-146
-147
-148
-
-
# File 'system_command.rb', line 146
-
-def command
-  [*command_prefix, executable.to_s, *expanded_args]
-end
-
-
- -
-

- - #must_succeed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-281
-
-
# File 'sorbet/rbi/parlour.rbi', line 281
-
-def must_succeed?; end
-
-
- -
-

- - #run!SystemCommand::Result - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-
-
# File 'system_command.rb', line 48
-
-def run!
-  $stderr.puts redact_secrets(command.shelljoin.gsub('\=', "="), @secrets) if verbose? || debug?
-
-  @output = []
-
-  each_output_line do |type, line|
-    case type
-    when :stdout
-      case @print_stdout
-      when true
-        $stdout << redact_secrets(line, @secrets)
-      when :debug
-        $stderr << redact_secrets(line, @secrets) if debug?
-      end
-      @output << [:stdout, line]
-    when :stderr
-      case @print_stderr
-      when true
-        $stderr << redact_secrets(line, @secrets)
-      when :debug
-        $stderr << redact_secrets(line, @secrets) if debug?
-      end
-      @output << [:stderr, line]
-    end
-  end
-
-  result = Result.new(command, @output, @status, secrets: @secrets)
-  result.assert_success! if must_succeed?
-  result
-end
-
-
- -
-

- - #sudo?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-275
-
-
# File 'sorbet/rbi/parlour.rbi', line 275
-
-def sudo?; end
-
-
- -
-

- - #sudo_as_root?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-278
-
-
# File 'sorbet/rbi/parlour.rbi', line 278
-
-def sudo_as_root?; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SystemCommand/Mixin.html b/docs/SystemCommand/Mixin.html deleted file mode 100644 index 48441a6ae..000000000 --- a/docs/SystemCommand/Mixin.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - Module: SystemCommand::Mixin - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: SystemCommand::Mixin - - - -

- - -

Overview

-
-

- This module is part of an internal API. - This module may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for calling run.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #system_command(executable, **options) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Run a fallible system command.

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'system_command.rb', line 24
-
-def system_command(executable, **options)
-  SystemCommand.run(executable, **options)
-end
-
-
- -
-

- - #system_command!(command, **options) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Run an infallible system command.

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'system_command.rb', line 31
-
-def system_command!(command, **options)
-  SystemCommand.run!(command, **options)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SystemCommand/Result.html b/docs/SystemCommand/Result.html deleted file mode 100644 index 3b263898e..000000000 --- a/docs/SystemCommand/Result.html +++ /dev/null @@ -1,1107 +0,0 @@ - - - - - - - Class: SystemCommand::Result - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: SystemCommand::Result - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Context
-
- - - - - - -
-
Defined in:
-
system_command.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Result containing the output and exit status of a finished sub-process.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- -
-

Constructor Details

- -
-

- - #initialize(command, output, status, secrets:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-340
-341
-342
-343
-344
-345
-346
-
-
# File 'system_command.rb', line 340
-
-def initialize(command, output, status, secrets:)
-  @command       = command
-  @output        = output
-  @status        = status
-  @exit_status   = status.exitstatus
-  @secrets       = secrets
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #commandObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-330
-331
-332
-
-
# File 'system_command.rb', line 330
-
-def command
-  @command
-end
-
-
- - - -
-

- - #exit_statusObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-330
-331
-332
-
-
# File 'system_command.rb', line 330
-
-def exit_status
-  @exit_status
-end
-
-
- - - -
-

- - #statusObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-330
-331
-332
-
-
# File 'system_command.rb', line 330
-
-def status
-  @status
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #assert_success!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-349
-350
-351
-352
-353
-
-
# File 'system_command.rb', line 349
-
-def assert_success!
-  return if @status.success?
-
-  raise ErrorDuringExecution.new(command, status: @status, output: @output, secrets: @secrets)
-end
-
-
- -
-

- - #merged_outputString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-370
-371
-372
-373
-
-
# File 'system_command.rb', line 370
-
-def merged_output
-  @merged_output ||= @output.map { |_, line| line }
-                            .join
-end
-
-
- -
-

- - #plistArray, ... - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-
-
# File 'system_command.rb', line 388
-
-def plist
-  @plist ||= begin
-    output = stdout
-
-    output = output.sub(/\A(.*?)(\s*<\?\s*xml)/m) do
-      warn_plist_garbage(T.must(Regexp.last_match(1)))
-      Regexp.last_match(2)
-    end
-
-    output = output.sub(%r{(<\s*/\s*plist\s*>\s*)(.*?)\Z}m) do
-      warn_plist_garbage(T.must(Regexp.last_match(2)))
-      Regexp.last_match(1)
-    end
-
-    Plist.parse_xml(output, marshal: false)
-  end
-end
-
-
- -
-

- - #stderrString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-363
-364
-365
-366
-367
-
-
# File 'system_command.rb', line 363
-
-def stderr
-  @stderr ||= @output.select { |type,| type == :stderr }
-                     .map { |_, line| line }
-                     .join
-end
-
-
- -
-

- - #stdoutString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-356
-357
-358
-359
-360
-
-
# File 'system_command.rb', line 356
-
-def stdout
-  @stdout ||= @output.select { |type,| type == :stdout }
-                     .map { |_, line| line }
-                     .join
-end
-
-
- -
-

- - #success?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-376
-377
-378
-379
-380
-
-
# File 'system_command.rb', line 376
-
-def success?
-  return false if @exit_status.nil?
-
-  @exit_status.zero?
-end
-
-
- -
-

- - #to_aryArray(String, String, Process::Status) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-383
-384
-385
-
-
# File 'system_command.rb', line 383
-
-def to_ary
-  [stdout, stderr, status]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/SystemConfig.html b/docs/SystemConfig.html deleted file mode 100644 index 0921d42b8..000000000 --- a/docs/SystemConfig.html +++ /dev/null @@ -1,2061 +0,0 @@ - - - - - - - Module: SystemConfig - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: SystemConfig - - - Private -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
system_config.rb,
- extend/os/mac/system_config.rb,
extend/os/linux/system_config.rb
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for querying information about the system configuration.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
HOST_RUBY_PATH = - -
-
"/usr/bin/ruby"
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .clangObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'system_config.rb', line 15
-
-def clang
-  @clang ||= if DevelopmentTools.installed?
-    DevelopmentTools.clang_version
-  else
-    Version::NULL
-  end
-end
-
-
- -
-

- - .clang_buildObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'system_config.rb', line 23
-
-def clang_build
-  @clang_build ||= if DevelopmentTools.installed?
-    DevelopmentTools.clang_build_version
-  else
-    Version::NULL
-  end
-end
-
-
- -
-

- - .cltObject - - - - - -

- - - - -
-
-
-
-28
-29
-30
-
-
# File 'extend/os/mac/system_config.rb', line 28
-
-def clt
-  @clt ||= MacOS::CLT.version if MacOS::CLT.installed?
-end
-
-
- -
-

- - .core_tap_config(out = $stdout) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-
-
# File 'extend/os/mac/system_config.rb', line 32
-
-def core_tap_config(out = $stdout)
-  dump_tap_config(CoreTap.instance, out)
-  dump_tap_config(CoreCaskTap.instance, out)
-end
-
-
- -
-

- - .describe_clangString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-
-
# File 'extend/os/mac/system_config.rb', line 13
-
-def describe_clang
-  return "N/A" if clang.null?
-
-  clang_build_info = clang_build.null? ? "(parse error)" : clang_build
-  "#{clang} build #{clang_build_info}"
-end
-
-
- -
-

- - .describe_curlString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-
-
# File 'system_config.rb', line 98
-
-def describe_curl
-  out, = system_command(Utils::Curl.curl_executable, args: ["--version"], verbose: false)
-
-  match_data = /^curl (?<curl_version>[\d.]+)/.match(out)
-  if match_data
-    "#{match_data[:curl_version]} => #{Utils::Curl.curl_path}"
-  else
-    "N/A"
-  end
-end
-
-
- -
-

- - .describe_gitString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-91
-92
-93
-94
-95
-
-
# File 'system_config.rb', line 91
-
-def describe_git
-  return "N/A" unless Utils::Git.available?
-
-  "#{Utils::Git.version} => #{Utils::Git.path}"
-end
-
-
- -
-

- - .describe_homebrew_rubyString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-74
-75
-76
-
-
# File 'system_config.rb', line 74
-
-def describe_homebrew_ruby
-  "#{RUBY_VERSION} => #{RUBY_PATH}"
-end
-
-
- -
-

- - .describe_path(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'system_config.rb', line 62
-
-def describe_path(path)
-  return "N/A" if path.nil?
-
-  realpath = path.realpath
-  if realpath == path
-    path
-  else
-    "#{path} => #{realpath}"
-  end
-end
-
-
- -
-

- - .dump_tap_config(tap, out = $stdout) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
-
# File 'system_config.rb', line 109
-
-def dump_tap_config(tap, out = $stdout)
-  case tap
-  when CoreTap
-    tap_name = "Core tap"
-    json_file_name = "formula.jws.json"
-  when CoreCaskTap
-    tap_name = "Core cask tap"
-    json_file_name = "cask.jws.json"
-  else
-    raise ArgumentError, "Unknown tap: #{tap}"
-  end
-
-  if tap.installed?
-    out.puts "#{tap_name} origin: #{tap.remote}" if tap.remote != tap.default_remote
-    out.puts "#{tap_name} HEAD: #{tap.git_head || "(none)"}"
-    out.puts "#{tap_name} last commit: #{tap.git_last_commit || "never"}"
-    out.puts "#{tap_name} branch: #{tap.git_branch || "(none)"}" if tap.git_branch != "master"
-  end
-
-  if (json_file = Homebrew::API::HOMEBREW_CACHE_API/json_file_name) && json_file.exist?
-    out.puts "#{tap_name} JSON: #{json_file.mtime.utc.strftime("%d %b %H:%M UTC")}"
-  elsif !tap.installed?
-    out.puts "#{tap_name}: N/A"
-  end
-end
-
-
- -
-

- - .dump_verbose_config(out = $stdout) ⇒ Object - - - - Also known as: - dump_generic_verbose_config - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-
-
# File 'extend/os/mac/system_config.rb', line 37
-
-def dump_verbose_config(out = $stdout)
-  dump_generic_verbose_config(out)
-  out.puts "macOS: #{MacOS.full_version}-#{kernel}"
-  out.puts "CLT: #{clt || "N/A"}"
-  out.puts "Xcode: #{xcode || "N/A"}"
-  out.puts "Rosetta 2: #{Hardware::CPU.in_rosetta2?}" if Hardware::CPU.physical_cpu_arm64?
-end
-
-
- -
-

- - .formula_linked_version(formula) ⇒ Object - - - - - -

- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'extend/os/linux/system_config.rb', line 28
-
-def formula_linked_version(formula)
-  return "N/A" if Homebrew::EnvConfig.no_install_from_api? && !CoreTap.instance.installed?
-
-  Formulary.factory(formula).any_installed_version || "N/A"
-rescue FormulaUnavailableError
-  "N/A"
-end
-
-
- -
-

- - .hardwareString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-79
-80
-81
-82
-83
-
-
# File 'system_config.rb', line 79
-
-def hardware
-  return if Hardware::CPU.type == :dunno
-
-  "CPU: #{Hardware.cores_as_words}-core #{Hardware::CPU.bits}-bit #{Hardware::CPU.family}"
-end
-
-
- -
-

- - .headString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'system_config.rb', line 37
-
-def head
-  homebrew_repo.head_ref || "(none)"
-end
-
-
- -
-

- - .homebrew_config(out = $stdout) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-139
-140
-141
-142
-143
-144
-
-
# File 'system_config.rb', line 139
-
-def homebrew_config(out = $stdout)
-  out.puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}"
-  out.puts "ORIGIN: #{origin}"
-  out.puts "HEAD: #{head}"
-  out.puts "Last commit: #{last_commit}"
-end
-
-
- -
-

- - .homebrew_env_config(out = $stdout) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-
-
# File 'system_config.rb', line 146
-
-def homebrew_env_config(out = $stdout)
-  out.puts "HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}"
-  {
-    HOMEBREW_REPOSITORY: Homebrew::DEFAULT_REPOSITORY,
-    HOMEBREW_CELLAR:     Homebrew::DEFAULT_CELLAR,
-  }.freeze.each do |key, default|
-    value = Object.const_get(key)
-    out.puts "#{key}: #{value}" if value.to_s != default.to_s
-  end
-
-  Homebrew::EnvConfig::ENVS.each do |env, hash|
-    method_name = Homebrew::EnvConfig.env_method_name(env, hash)
-
-    if hash[:boolean]
-      out.puts "#{env}: set" if Homebrew::EnvConfig.send(method_name)
-      next
-    end
-
-    value = Homebrew::EnvConfig.send(method_name)
-    next unless value
-    next if (default = hash[:default].presence) && value.to_s == default.to_s
-
-    if ENV.sensitive?(env)
-      out.puts "#{env}: set"
-    else
-      out.puts "#{env}: #{value}"
-    end
-  end
-  out.puts "Homebrew Ruby: #{describe_homebrew_ruby}"
-end
-
-
- -
-

- - .homebrew_repoGitRepository - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'system_config.rb', line 32
-
-def homebrew_repo
-  GitRepository.new(HOMEBREW_REPOSITORY)
-end
-
-
- -
-

- - .host_gcc_versionObject - - - - - -

- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-
-
# File 'extend/os/linux/system_config.rb', line 21
-
-def host_gcc_version
-  gcc = Pathname.new "/usr/bin/gcc"
-  return "N/A" unless gcc.executable?
-
-  `#{gcc} --version 2>/dev/null`[/ (\d+\.\d+\.\d+)/, 1]
-end
-
-
- -
-

- - .host_glibc_versionObject - - - - - -

- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-
-
# File 'extend/os/linux/system_config.rb', line 14
-
-def host_glibc_version
-  version = OS::Linux::Glibc.system_version
-  return "N/A" if version.null?
-
-  version
-end
-
-
- -
-

- - .host_ruby_versionObject - - - - - -

- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-
-
# File 'extend/os/linux/system_config.rb', line 36
-
-def host_ruby_version
-  out, _, status = system_command(HOST_RUBY_PATH, args: ["-e", "puts RUBY_VERSION"], print_stderr: false)
-  return "N/A" unless status.success?
-
-  out
-end
-
-
- -
-

- - .host_software_config(out = $stdout) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-177
-178
-179
-180
-181
-
-
# File 'system_config.rb', line 177
-
-def host_software_config(out = $stdout)
-  out.puts "Clang: #{describe_clang}"
-  out.puts "Git: #{describe_git}"
-  out.puts "Curl: #{describe_curl}"
-end
-
-
- -
-

- - .kernelString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-86
-87
-88
-
-
# File 'system_config.rb', line 86
-
-def kernel
-  `uname -m`.chomp
-end
-
-
- -
-

- - .last_commitString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'system_config.rb', line 42
-
-def last_commit
-  homebrew_repo.last_committed || "never"
-end
-
-
- -
-

- - .originString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'system_config.rb', line 47
-
-def origin
-  homebrew_repo.origin_url || "(none)"
-end
-
-
- -
-

- - .xcodeObject - - - - - -

- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-
-
# File 'extend/os/mac/system_config.rb', line 20
-
-def xcode
-  @xcode ||= if MacOS::Xcode.installed?
-    xcode = MacOS::Xcode.version.to_s
-    xcode += " => #{MacOS::Xcode.prefix}" unless MacOS::Xcode.default_prefix?
-    xcode
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Tab.html b/docs/Tab.html deleted file mode 100644 index 12417aaef..000000000 --- a/docs/Tab.html +++ /dev/null @@ -1,4155 +0,0 @@ - - - - - - - Class: Tab - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Tab - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Cachable
-
- - - - - - - - -
-
Defined in:
-
tab.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Rather than calling new directly, use one of the class methods like Tab.create.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
FILENAME = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"INSTALL_RECEIPT.json"
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

-
-

Constructor Details

- -
-

- - #initialize(attributes = {}) ⇒ Tab - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Tab.

- - -
-
-
- - -
- - - - -
-
-
-
-262
-263
-264
-
-
# File 'tab.rb', line 262
-
-def initialize(attributes = {})
-  attributes.each { |key, value| instance_variable_set(:"@#{key}", value) }
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #aliasesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def aliases
-  @aliases
-end
-
-
- - - -
-

- - #archObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def arch
-  @arch
-end
-
-
- - - -
-

- - #built_as_bottleObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def built_as_bottle
-  @built_as_bottle
-end
-
-
- - - -
-

- - #built_onObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def built_on
-  @built_on
-end
-
-
- - - -
-

- - #changed_filesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def changed_files
-  @changed_files
-end
-
-
- - - -
-

- - #compilerObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-306
-307
-308
-
-
# File 'tab.rb', line 306
-
-def compiler
-  @compiler || DevelopmentTools.default_compiler
-end
-
-
- - - -
-

- - #homebrew_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def homebrew_version
-  @homebrew_version
-end
-
-
- - - -
-

- - #installed_as_dependencyObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether the formula was installed as a dependency.

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'tab.rb', line 19
-
-def installed_as_dependency
-  @installed_as_dependency
-end
-
-
- - - -
-

- - #installed_on_requestObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether the formula was installed on request.

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'tab.rb', line 24
-
-def installed_on_request
-  @installed_on_request
-end
-
-
- - - -
-

- - #loaded_from_apiObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def loaded_from_api
-  @loaded_from_api
-end
-
-
- - - -
-

- - #poured_from_bottleObject - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether the formula was poured from a bottle.

- - -
-
-
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'tab.rb', line 29
-
-def poured_from_bottle
-  @poured_from_bottle
-end
-
-
- - - -
-

- - #runtime_dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-316
-317
-318
-319
-320
-
-
# File 'tab.rb', line 316
-
-def runtime_dependencies
-  # Homebrew versions prior to 1.1.6 generated incorrect runtime dependency
-  # lists.
-  @runtime_dependencies if parsed_homebrew_version >= "1.1.6"
-end
-
-
- - - -
-

- - #sourceObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def source
-  @source
-end
-
-
- - - -
-

- - #source_modified_timeTime - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-368
-369
-370
-
-
# File 'tab.rb', line 368
-
-def source_modified_time
-  Time.at(@source_modified_time || 0)
-end
-
-
- - - -
-

- - #stdlibObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def stdlib
-  @stdlib
-end
-
-
- - - -
-

- - #tabfileObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def tabfile
-  @tabfile
-end
-
-
- - - -
-

- - #timeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'tab.rb', line 31
-
-def time
-  @time
-end
-
-
- - - -
-

- - #unused_optionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-302
-303
-304
-
-
# File 'tab.rb', line 302
-
-def unused_options
-  Options.create(@unused_options)
-end
-
-
- - - -
-

- - #used_optionsOptions - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The options used to install the formula.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-298
-299
-300
-
-
# File 'tab.rb', line 298
-
-def used_options
-  Options.create(@used_options)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .create(formula, compiler, stdlib) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Instantiates a Tab for a new installation of a formula.

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'tab.rb', line 42
-
-def self.create(formula, compiler, stdlib)
-  build = formula.build
-  runtime_deps = formula.runtime_dependencies(undeclared: false)
-  attributes = {
-    "homebrew_version"        => HOMEBREW_VERSION,
-    "used_options"            => build.used_options.as_flags,
-    "unused_options"          => build.unused_options.as_flags,
-    "tabfile"                 => formula.prefix/FILENAME,
-    "built_as_bottle"         => build.bottle?,
-    "installed_as_dependency" => false,
-    "installed_on_request"    => false,
-    "poured_from_bottle"      => false,
-    "loaded_from_api"         => false,
-    "time"                    => Time.now.to_i,
-    "source_modified_time"    => formula.source_modified_time.to_i,
-    "compiler"                => compiler,
-    "stdlib"                  => stdlib,
-    "aliases"                 => formula.aliases,
-    "runtime_dependencies"    => Tab.runtime_deps_hash(formula, runtime_deps),
-    "arch"                    => Hardware::CPU.arch,
-    "source"                  => {
-      "path"         => formula.specified_path.to_s,
-      "tap"          => formula.tap&.name,
-      "tap_git_head" => nil, # Filled in later if possible
-      "spec"         => formula.active_spec_sym.to_s,
-      "versions"     => {
-        "stable"         => formula.stable&.version&.to_s,
-        "head"           => formula.head&.version&.to_s,
-        "version_scheme" => formula.version_scheme,
-      },
-    },
-    "built_on"                => DevelopmentTools.build_system_info,
-  }
-
-  # We can only get `tap_git_head` if the tap is installed locally
-  attributes["source"]["tap_git_head"] = formula.tap.git_head if formula.tap&.installed?
-
-  new(attributes)
-end
-
-
- -
-

- - .emptyObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-
-
# File 'tab.rb', line 215
-
-def self.empty
-  attributes = {
-    "homebrew_version"        => HOMEBREW_VERSION,
-    "used_options"            => [],
-    "unused_options"          => [],
-    "built_as_bottle"         => false,
-    "installed_as_dependency" => false,
-    "installed_on_request"    => false,
-    "poured_from_bottle"      => false,
-    "loaded_from_api"         => false,
-    "time"                    => nil,
-    "source_modified_time"    => 0,
-    "stdlib"                  => nil,
-    "compiler"                => DevelopmentTools.default_compiler,
-    "aliases"                 => [],
-    "runtime_dependencies"    => nil,
-    "arch"                    => nil,
-    "source"                  => {
-      "path"         => nil,
-      "tap"          => nil,
-      "tap_git_head" => nil,
-      "spec"         => "stable",
-      "versions"     => {
-        "stable"         => nil,
-        "head"           => nil,
-        "version_scheme" => 0,
-      },
-    },
-    "built_on"                => DevelopmentTools.generic_build_system_info,
-  }
-
-  new(attributes)
-end
-
-
- -
-

- - .for_formula(formula) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a Tab for an already installed formula, -or a fake one if the formula is not installed.

- - -
-
-
- - -
- - - - -
-
-
-
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-
-
# File 'tab.rb', line 177
-
-def self.for_formula(formula)
-  paths = []
-
-  paths << formula.opt_prefix.resolved_path if formula.opt_prefix.symlink? && formula.opt_prefix.directory?
-
-  paths << formula.linked_keg.resolved_path if formula.linked_keg.symlink? && formula.linked_keg.directory?
-
-  if (dirs = formula.installed_prefixes).length == 1
-    paths << dirs.first
-  end
-
-  paths << formula.latest_installed_prefix
-
-  path = paths.map { |pathname| pathname/FILENAME }.find(&:file?)
-
-  if path
-    tab = from_file(path)
-    used_options = remap_deprecated_options(formula.deprecated_options, tab.used_options)
-    tab.used_options = used_options.as_flags
-  else
-    # Formula is not installed. Return a fake tab.
-    tab = empty
-    tab.unused_options = formula.options.as_flags
-    tab.source = {
-      "path"     => formula.specified_path.to_s,
-      "tap"      => formula.tap&.name,
-      "spec"     => formula.active_spec_sym.to_s,
-      "versions" => {
-        "stable"         => formula.stable&.version&.to_s,
-        "head"           => formula.head&.version&.to_s,
-        "version_scheme" => formula.version_scheme,
-      },
-    }
-  end
-
-  tab
-end
-
-
- -
-

- - .for_keg(keg) ⇒ T.attached_class - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Get the Tab for the given Keg, -or a fake one if the formula is not installed.

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (T.attached_class) - - - -
  • - -
- -
- - - - -
-
-
-
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-
-
# File 'tab.rb', line 145
-
-def self.for_keg(keg)
-  path = keg/FILENAME
-
-  tab = if path.exist?
-    from_file(path)
-  else
-    empty
-  end
-
-  tab.tabfile = path
-  tab
-end
-
-
- -
-

- - .for_name(name) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a Tab for the named formula's installation, -or a fake one if the formula is not installed.

- - -
-
-
- - -
- - - - -
-
-
-
-160
-161
-162
-
-
# File 'tab.rb', line 160
-
-def self.for_name(name)
-  for_formula(Formulary.factory(name))
-end
-
-
- -
-

- - .from_file(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- -
- Note: -

Results are cached.

-
-
- -

Returns the Tab for an install receipt at path.

- - -
-
-
- - -
- - - - -
-
-
-
-85
-86
-87
-88
-89
-90
-91
-92
-
-
# File 'tab.rb', line 85
-
-def self.from_file(path)
-  cache.fetch(path) do |p|
-    content = File.read(p)
-    return empty if content.blank?
-
-    cache[p] = from_file_content(content, p)
-  end
-end
-
-
- -
-

- - .from_file_content(content, path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Like from_file, but bypass the cache.

- - -
-
-
- - -
- - - - -
-
-
-
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-
-
# File 'tab.rb', line 95
-
-def self.from_file_content(content, path)
-  attributes = begin
-    JSON.parse(content)
-  rescue JSON::ParserError => e
-    raise e, "Cannot parse #{path}: #{e}", e.backtrace
-  end
-  attributes["tabfile"] = path
-  attributes["source_modified_time"] ||= 0
-  attributes["source"] ||= {}
-
-  tapped_from = attributes["tapped_from"]
-  if !tapped_from.nil? && tapped_from != "path or URL"
-    attributes["source"]["tap"] = attributes.delete("tapped_from")
-  end
-
-  if attributes["source"]["tap"] == "mxcl/master" ||
-     attributes["source"]["tap"] == "Homebrew/homebrew"
-    attributes["source"]["tap"] = "homebrew/core"
-  end
-
-  if attributes["source"]["spec"].nil?
-    version = PkgVersion.parse(File.basename(File.dirname(path)))
-    attributes["source"]["spec"] = if version.head?
-      "head"
-    else
-      "stable"
-    end
-  end
-
-  if attributes["source"]["versions"].nil?
-    attributes["source"]["versions"] = {
-      "stable"         => nil,
-      "head"           => nil,
-      "version_scheme" => 0,
-    }
-  end
-
-  # Tabs created with Homebrew 1.5.13 through 4.0.17 inclusive created empty string versions in some cases.
-  ["stable", "head"].each do |spec|
-    attributes["source"]["versions"][spec] = attributes["source"]["versions"][spec].presence
-  end
-
-  new(attributes)
-end
-
-
- -
-

- - .remap_deprecated_options(deprecated_options, options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-
-
# File 'tab.rb', line 164
-
-def self.remap_deprecated_options(deprecated_options, options)
-  deprecated_options.each do |deprecated_option|
-    option = options.find { |o| o.name == deprecated_option.old }
-    next unless option
-
-    options -= [option]
-    options << Option.new(deprecated_option.current, option.description)
-  end
-  options
-end
-
-
- -
-

- - .runtime_deps_hash(formula, deps) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-
-
# File 'tab.rb', line 249
-
-def self.runtime_deps_hash(formula, deps)
-  deps.map do |dep|
-    f = dep.to_formula
-    {
-      "full_name"         => f.full_name,
-      "version"           => f.version.to_s,
-      "revision"          => f.revision,
-      "pkg_version"       => f.pkg_version.to_s,
-      "declared_directly" => formula.deps.include?(dep),
-    }
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #any_args_or_options?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-266
-267
-268
-
-
# File 'tab.rb', line 266
-
-def any_args_or_options?
-  !used_options.empty? || !unused_options.empty?
-end
-
-
- -
-

- - #bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-332
-333
-334
-
-
# File 'tab.rb', line 332
-
-def bottle?
-  built_as_bottle
-end
-
-
- -
-

- - #built_bottle?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-328
-329
-330
-
-
# File 'tab.rb', line 328
-
-def built_bottle?
-  built_as_bottle && !poured_from_bottle
-end
-
-
- -
-

- - #cxxstdlibObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-322
-323
-324
-325
-326
-
-
# File 'tab.rb', line 322
-
-def cxxstdlib
-  # Older tabs won't have these values, so provide sensible defaults
-  lib = stdlib.to_sym if stdlib
-  CxxStdlib.create(lib, compiler.to_sym)
-end
-
-
- -
-

- - #head?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-286
-287
-288
-
-
# File 'tab.rb', line 286
-
-def head?
-  spec == :head
-end
-
-
- -
-

- - #head_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-359
-360
-361
-
-
# File 'tab.rb', line 359
-
-def head_version
-  versions["head"]&.then { Version.new(_1) }
-end
-
-
- -
-

- - #include?(opt) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-282
-283
-284
-
-
# File 'tab.rb', line 282
-
-def include?(opt)
-  used_options.include? opt
-end
-
-
- -
-

- - #parsed_homebrew_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-310
-311
-312
-313
-314
-
-
# File 'tab.rb', line 310
-
-def parsed_homebrew_version
-  return Version::NULL if homebrew_version.nil?
-
-  Version.new(homebrew_version)
-end
-
-
- -
-

- - #specObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-347
-348
-349
-
-
# File 'tab.rb', line 347
-
-def spec
-  source["spec"].to_sym
-end
-
-
- -
-

- - #stable?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-290
-291
-292
-
-
# File 'tab.rb', line 290
-
-def stable?
-  spec == :stable
-end
-
-
- -
-

- - #stable_versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-355
-356
-357
-
-
# File 'tab.rb', line 355
-
-def stable_version
-  versions["stable"]&.then { Version.new(_1) }
-end
-
-
- -
-

- - #tapTap? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Tap, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-337
-338
-339
-340
-
-
# File 'tab.rb', line 337
-
-def tap
-  tap_name = source["tap"]
-  Tap.fetch(tap_name) if tap_name
-end
-
-
- -
-

- - #tap=(tap) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-342
-343
-344
-345
-
-
# File 'tab.rb', line 342
-
-def tap=(tap)
-  tap_name = tap.respond_to?(:name) ? tap.name : tap
-  source["tap"] = tap_name
-end
-
-
- -
-

- - #to_bottle_hashObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A subset of to_json that we care about for bottles.

- - -
-
-
- - -
- - - - -
-
-
-
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-
-
# File 'tab.rb', line 399
-
-def to_bottle_hash
-  attributes = {
-    "homebrew_version"     => homebrew_version,
-    "changed_files"        => changed_files&.map(&:to_s),
-    "source_modified_time" => source_modified_time.to_i,
-    "stdlib"               => stdlib&.to_s,
-    "compiler"             => compiler&.to_s,
-    "runtime_dependencies" => runtime_dependencies,
-    "arch"                 => arch,
-    "built_on"             => built_on,
-  }
-  attributes.delete("stdlib") if attributes["stdlib"].blank?
-  attributes
-end
-
-
- -
-

- - #to_json(options = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-
-
# File 'tab.rb', line 372
-
-def to_json(options = nil)
-  attributes = {
-    "homebrew_version"        => homebrew_version,
-    "used_options"            => used_options.as_flags,
-    "unused_options"          => unused_options.as_flags,
-    "built_as_bottle"         => built_as_bottle,
-    "poured_from_bottle"      => poured_from_bottle,
-    "loaded_from_api"         => loaded_from_api,
-    "installed_as_dependency" => installed_as_dependency,
-    "installed_on_request"    => installed_on_request,
-    "changed_files"           => changed_files&.map(&:to_s),
-    "time"                    => time,
-    "source_modified_time"    => source_modified_time.to_i,
-    "stdlib"                  => stdlib&.to_s,
-    "compiler"                => compiler&.to_s,
-    "aliases"                 => aliases,
-    "runtime_dependencies"    => runtime_dependencies,
-    "source"                  => source,
-    "arch"                    => arch,
-    "built_on"                => built_on,
-  }
-  attributes.delete("stdlib") if attributes["stdlib"].blank?
-
-  JSON.pretty_generate(attributes, options)
-end
-
-
- -
-

- - #version_schemeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-363
-364
-365
-
-
# File 'tab.rb', line 363
-
-def version_scheme
-  versions["version_scheme"] || 0
-end
-
-
- -
-

- - #versionsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-351
-352
-353
-
-
# File 'tab.rb', line 351
-
-def versions
-  source["versions"]
-end
-
-
- -
-

- - #with?(val) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-270
-271
-272
-273
-274
-275
-276
-
-
# File 'tab.rb', line 270
-
-def with?(val)
-  option_names = val.respond_to?(:option_names) ? val.option_names : [val]
-
-  option_names.any? do |name|
-    include?("with-#{name}") || unused_options.include?("without-#{name}")
-  end
-end
-
-
- -
-

- - #without?(val) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-278
-279
-280
-
-
# File 'tab.rb', line 278
-
-def without?(val)
-  !with?(val)
-end
-
-
- -
-

- - #writeObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-414
-415
-416
-417
-418
-419
-420
-421
-
-
# File 'tab.rb', line 414
-
-def write
-  # If this is a new installation, the cache of installed formulae
-  # will no longer be valid.
-  Formula.clear_cache unless tabfile.exist?
-
-  self.class.cache[tabfile] = self
-  tabfile.atomic_write(to_json)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Tap.html b/docs/Tap.html deleted file mode 100644 index edae62574..000000000 --- a/docs/Tap.html +++ /dev/null @@ -1,8103 +0,0 @@ - - - - - - - Class: Tap - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Tap - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - -
-
Extended by:
-
Cachable, Enumerable
-
- - - - - - - - -
-
Defined in:
-
tap.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A Tap is used to extend the formulae provided by Homebrew core. -Usually, it's synced with a remote Git repository. And it's likely -a GitHub repository with the name of user/homebrew-repository. In such -cases, user/repository will be used as the #name of this Tap, where -#user represents the GitHub username and #repository represents the -repository name without the leading homebrew-.

- - -
-
-
- - -
-

Direct Known Subclasses

-

AbstractCoreTap

-
-

Defined Under Namespace

-

- - - - - Classes: InvalidNameError - - -

- - -

- Constant Summary - collapse -

- -
- -
TAP_DIRECTORY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
(HOMEBREW_LIBRARY/"Taps").freeze
- -
HOMEBREW_TAP_JSON_FILES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%W[
-  #{HOMEBREW_TAP_FORMULA_RENAMES_FILE}
-  #{HOMEBREW_TAP_CASK_RENAMES_FILE}
-  #{HOMEBREW_TAP_MIGRATIONS_FILE}
-  #{HOMEBREW_TAP_PYPI_FORMULA_MAPPINGS_FILE}
-  #{HOMEBREW_TAP_SYNCED_VERSIONS_FORMULAE_FILE}
-  #{HOMEBREW_TAP_AUDIT_EXCEPTIONS_DIR}/*.json
-  #{HOMEBREW_TAP_STYLE_EXCEPTIONS_DIR}/*.json
-].freeze
- -
- - - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #full_name ⇒ Object - - - - - - - - readonly - - - - - - - - -

    The full name of this Tap, including the homebrew- prefix.

    -
    - -
  • - - - -
  • - - - #git_repository ⇒ GitRepository - - - - - - - - readonly - - - - - - - private - -

    The git repository of this Tap.

    -
    - -
  • - - - -
  • - - - #name ⇒ Object - - - - - - - - readonly - - - - - - - - -

    The name of this Tap.

    -
    - -
  • - - - -
  • - - - #path ⇒ Pathname - - - - - - - - readonly - - - - - - - - -

    The local path to this Tap.

    -
    - -
  • - - - -
  • - - - #repository ⇒ Object - - - (also: #repo) - - - - - - - readonly - - - - - - - - -

    The repository name of this Tap without the leading homebrew-.

    -
    - -
  • - - - -
  • - - - #user ⇒ Object - - - - - - - - readonly - - - - - - - - -

    The user name of this Tap.

    -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Cachable

-

cache

- - - - - - - - - -

Methods included from Enumerable

-

compact_blank, exclude?

-
-

Constructor Details

- -
-

- - #initialize(user, repository) ⇒ Tap - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Tap.

- - -
-
-
- - -
- - - - -
-
-
-
-199
-200
-201
-202
-203
-204
-205
-206
-
-
# File 'tap.rb', line 199
-
-def initialize(user, repository)
-  @user = user
-  @repository = repository
-  @name = "#{@user}/#{@repository}".downcase
-  @full_name = "#{@user}/homebrew-#{@repository}"
-  @path = TAP_DIRECTORY/@full_name.downcase
-  @git_repository = GitRepository.new(@path)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #full_nameObject (readonly) - - - - - -

-
-

The full name of this Tap, including the homebrew- prefix. -It combines #user and 'homebrew-'-prefixed #repository with a slash. -e.g. user/homebrew-repository

- - -
-
-
- - -
- - - - -
-
-
-
-183
-184
-185
-
-
# File 'tap.rb', line 183
-
-def full_name
-  @full_name
-end
-
-
- - - -
-

- - #git_repositoryGitRepository (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The git repository of this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-194
-195
-196
-
-
# File 'tap.rb', line 194
-
-def git_repository
-  @git_repository
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

The name of this Tap. It combines #user and #repository with a slash. -#name is always in lowercase. -e.g. user/repository

- - -
-
-
- - -
- - - - -
-
-
-
-172
-173
-174
-
-
# File 'tap.rb', line 172
-
-def name
-  @name
-end
-
-
- - - -
-

- - #pathPathname (readonly) - - - - - -

-
-

The local path to this Tap. -e.g. /usr/local/Library/Taps/user/homebrew-repository

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-190
-191
-192
-
-
# File 'tap.rb', line 190
-
-def path
-  @path
-end
-
-
- - - -
-

- - #repositoryObject (readonly) - - - - Also known as: - repo - - - - -

-
-

The repository name of this Tap without the leading homebrew-.

- - -
-
-
- - -
- - - - -
-
-
-
-163
-164
-165
-
-
# File 'tap.rb', line 163
-
-def repository
-  @repository
-end
-
-
- - - -
-

- - #userObject (readonly) - - - - - -

-
-

The user name of this Tap. Usually, it's the GitHub username of -this Tap's remote repository.

- - -
-
-
- - -
- - - - -
-
-
-
-158
-159
-160
-
-
# File 'tap.rb', line 158
-
-def user
-  @user
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .allArray<Tap> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

All locally installed and core taps. Core taps might not be installed locally when using the API.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1025
-1026
-1027
-1028
-1029
-1030
-1031
-1032
-1033
-1034
-
-
# File 'tap.rb', line 1025
-
-def self.all
-  cache[:all] ||= begin
-    core_taps = [
-      CoreTap.instance,
-      (CoreCaskTap.instance if OS.mac?), # rubocop:disable Homebrew/MoveToExtendOS
-    ].compact
-
-    installed | core_taps
-  end
-end
-
-
- -
-

- - .allowed_tapsSet<Tap> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Set<Tap>) - - - -
  • - -
- -
- - - - -
-
-
-
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-
-
# File 'tap.rb', line 122
-
-def self.allowed_taps
-  cache_key = :"allowed_taps_#{Homebrew::EnvConfig.allowed_taps.to_s.tr(" ", "_")}"
-  cache[cache_key] ||= begin
-    allowed_tap_list = Homebrew::EnvConfig.allowed_taps.to_s.split
-
-    Set.new(allowed_tap_list.filter_map do |tap|
-      Tap.fetch(tap)
-    rescue Tap::InvalidNameError
-      opoo "Invalid tap name in `HOMEBREW_ALLOWED_TAPS`: #{tap}"
-      nil
-    end).freeze
-  end
-end
-
-
- -
-

- - .cmd_directoriesArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all tap cmd directory Pathnames.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1057
-1058
-1059
-
-
# File 'tap.rb', line 1057
-
-def self.cmd_directories
-  Pathname.glob TAP_DIRECTORY/"*/*/cmd"
-end
-
-
- -
-

- - .each(&block) ⇒ Object - - - - - -

-
-

Enumerate all available Taps.

- - -
-
-
- - -
- - - - -
-
-
-
-1039
-1040
-1041
-1042
-1043
-1044
-1045
-
-
# File 'tap.rb', line 1039
-
-def self.each(&block)
-  if Homebrew::EnvConfig.no_install_from_api?
-    installed.each(&block)
-  else
-    all.each(&block)
-  end
-end
-
-
- -
-

- - .fetch(user, repo = T.unsafe(nil)) ⇒ Tap - - - - - -

-
-

Fetch a Tap by name.

- - -
-
-
-

Parameters:

-
    - -
  • - - user - - - (String) - - - -
  • - -
  • - - repo - - - (String) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Tap) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-
-
# File 'tap.rb', line 57
-
-def self.fetch(user, repo = T.unsafe(nil))
-  user, repo = user.split("/", 2) if repo.nil?
-
-  if [user, repo].any? { |part| part.nil? || part.include?("/") }
-    raise InvalidNameError, "Invalid tap name: '#{[*user, *repo].join("/")}'"
-  end
-
-  user = T.must(user)
-  repo = T.must(repo)
-
-  # We special case homebrew and linuxbrew so that users don't have to shift in a terminal.
-  user = user.capitalize if ["homebrew", "linuxbrew"].include?(user)
-  repo = repo.sub(HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX, "")
-
-  return CoreTap.instance if ["Homebrew", "Linuxbrew"].include?(user) && ["core", "homebrew"].include?(repo)
-  return CoreCaskTap.instance if user == "Homebrew" && repo == "cask"
-
-  cache_key = "#{user}/#{repo}".downcase
-  cache.fetch(cache_key) { |key| cache[key] = new(user, repo) }
-end
-
-
- -
-

- - .forbidden_tapsSet<Tap> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Set<Tap>) - - - -
  • - -
- -
- - - - -
-
-
-
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-
-
# File 'tap.rb', line 137
-
-def self.forbidden_taps
-  cache_key = :"forbidden_taps_#{Homebrew::EnvConfig.forbidden_taps.to_s.tr(" ", "_")}"
-  cache[cache_key] ||= begin
-    forbidden_tap_list = Homebrew::EnvConfig.forbidden_taps.to_s.split
-
-    Set.new(forbidden_tap_list.filter_map do |tap|
-      Tap.fetch(tap)
-    rescue Tap::InvalidNameError
-      opoo "Invalid tap name in `HOMEBREW_FORBIDDEN_TAPS`: #{tap}"
-      nil
-    end).freeze
-  end
-end
-
-
- -
-

- - .from_path(path) ⇒ Object - - - - - -

-
-

Get a Tap from its path or a path inside of it.

- - -
-
-
- - -
- - - - -
-
-
-
-81
-82
-83
-84
-85
-86
-87
-88
-89
-
-
# File 'tap.rb', line 81
-
-def self.from_path(path)
-  match = File.expand_path(path).match(HOMEBREW_TAP_PATH_REGEX)
-
-  return unless match
-  return unless (user = match[:user])
-  return unless (repo = match[:repo])
-
-  fetch(user, repo)
-end
-
-
- -
-

- - .installedArray<Tap> - - - - - -

-
-

All locally installed taps.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1015
-1016
-1017
-1018
-1019
-1020
-1021
-
-
# File 'tap.rb', line 1015
-
-def self.installed
-  cache[:installed] ||= if TAP_DIRECTORY.directory?
-    TAP_DIRECTORY.subdirs.flat_map(&:subdirs).map { from_path(_1) }
-  else
-    []
-  end
-end
-
-
- -
-

- - .namesArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all installed Tap names.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1049
-1050
-1051
-1052
-1053
-
-
# File 'tap.rb', line 1049
-
-def self.names
-  odeprecated "`#{self}.names`"
-
-  map(&:name).sort
-end
-
-
- -
-

- - .tap_migration_oldnames(current_tap, name_or_token) ⇒ Array<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The old names a formula or cask had before getting migrated to the current tap.

- - -
-
-
-

Parameters:

-
    - -
  • - - current_tap - - - (Tap) - - - -
  • - -
  • - - name_or_token - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-940
-941
-942
-943
-944
-945
-946
-947
-948
-
-
# File 'tap.rb', line 940
-
-def self.tap_migration_oldnames(current_tap, name_or_token)
-  key = "#{current_tap}/#{name_or_token}"
-
-  Tap.each_with_object([]) do |tap, array|
-    next unless (renames = tap.reverse_tap_migrations_renames[key])
-
-    array.concat(renames)
-  end
-end
-
-
- -
-

- - .untapped_official_tapsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of official taps that have been manually untapped

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-1063
-1064
-1065
-
-
# File 'tap.rb', line 1063
-
-def self.untapped_official_taps
-  Homebrew::Settings.read(:untapped)&.split(";") || []
-end
-
-
- -
-

- - .with_cask_token(token) ⇒ Array(Tap, String)? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - token - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-
-
# File 'tap.rb', line 107
-
-def self.with_cask_token(token)
-  return unless (match = token.match(HOMEBREW_TAP_CASK_REGEX))
-
-  user = T.must(match[:user])
-  repo = T.must(match[:repo])
-  token = T.must(match[:token])
-
-  # Relative paths are not taps.
-  return if [user, repo].intersect?([".", ".."])
-
-  tap = fetch(user, repo)
-  [tap, token.downcase]
-end
-
-
- -
-

- - .with_formula_name(name) ⇒ Array(Tap, String)? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
# File 'tap.rb', line 92
-
-def self.with_formula_name(name)
-  return unless (match = name.match(HOMEBREW_TAP_FORMULA_REGEX))
-
-  user = T.must(match[:user])
-  repo = T.must(match[:repo])
-  name = T.must(match[:name])
-
-  # Relative paths are not taps.
-  return if [user, repo].intersect?([".", ".."])
-
-  tap = fetch(user, repo)
-  [tap, name.downcase]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #alias_dirPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to the directory of all alias files for this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-804
-805
-806
-
-
# File 'tap.rb', line 804
-
-def alias_dir
-  @alias_dir ||= path/"Aliases"
-end
-
-
- -
-

- - #alias_file_to_name(file) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - file - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1073
-1074
-1075
-
-
# File 'tap.rb', line 1073
-
-def alias_file_to_name(file)
-  "#{name}/#{file.basename}"
-end
-
-
- -
-

- - #alias_filesArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all alias files of this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-810
-811
-812
-
-
# File 'tap.rb', line 810
-
-def alias_files
-  @alias_files ||= Pathname.glob("#{alias_dir}/*").select(&:file?)
-end
-
-
- -
-

- - #alias_reverse_tableHash{String => Array<String>} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Mapping from formula names to aliases.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-830
-831
-832
-833
-834
-835
-
-
# File 'tap.rb', line 830
-
-def alias_reverse_table
-  @alias_reverse_table ||= alias_table.each_with_object({}) do |(alias_name, formula_name), alias_reverse_table|
-    alias_reverse_table[formula_name] ||= []
-    alias_reverse_table[formula_name] << alias_name
-  end
-end
-
-
- -
-

- - #alias_tableHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Mapping from aliases to formula names.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-822
-823
-824
-825
-826
-
-
# File 'tap.rb', line 822
-
-def alias_table
-  @alias_table ||= alias_files.each_with_object({}) do |alias_file, alias_table|
-    alias_table[alias_file_to_name(alias_file)] = formula_file_to_name(alias_file.resolved_path)
-  end
-end
-
-
- -
-

- - #aliasesArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all aliases of this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-816
-817
-818
-
-
# File 'tap.rb', line 816
-
-def aliases
-  @aliases ||= alias_table.keys
-end
-
-
- -
-

- - #allow_bump?(formula_or_cask_name) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Whether this Tap allows running bump commands on the given Formula or Cask.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula_or_cask_name - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-962
-963
-964
-
-
# File 'tap.rb', line 962
-
-def allow_bump?(formula_or_cask_name)
-  ENV["HOMEBREW_TEST_BOT_AUTOBUMP"].present? || !official? || autobump.exclude?(formula_or_cask_name)
-end
-
-
- -
-

- - #allowed_by_env?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1095
-1096
-1097
-1098
-1099
-1100
-1101
-
-
# File 'tap.rb', line 1095
-
-def allowed_by_env?
-  @allowed_by_env ||= begin
-    allowed_taps = self.class.allowed_taps
-
-    official? || allowed_taps.blank? || allowed_taps.include?(self)
-  end
-end
-
-
- -
-

- - #audit_exception(list, formula_or_cask, value = nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-1077
-1078
-1079
-1080
-1081
-1082
-1083
-1084
-1085
-1086
-1087
-1088
-1089
-1090
-1091
-1092
-
-
# File 'tap.rb', line 1077
-
-def audit_exception(list, formula_or_cask, value = nil)
-  return false if audit_exceptions.blank?
-  return false unless audit_exceptions.key? list
-
-  list = audit_exceptions[list]
-
-  case list
-  when Array
-    list.include? formula_or_cask
-  when Hash
-    return false unless list.include? formula_or_cask
-    return list[formula_or_cask] if value.blank?
-
-    list[formula_or_cask] == value
-  end
-end
-
-
- -
-

- - #audit_exceptionsHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Hash with audit exceptions

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-968
-969
-970
-
-
# File 'tap.rb', line 968
-
-def audit_exceptions
-  @audit_exceptions ||= read_formula_list_directory("#{HOMEBREW_TAP_AUDIT_EXCEPTIONS_DIR}/*")
-end
-
-
- -
-

- - #autobumpArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Array with autobump names

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-952
-953
-954
-955
-956
-957
-958
-
-
# File 'tap.rb', line 952
-
-def autobump
-  @autobump ||= if (autobump_file = path/HOMEBREW_TAP_AUTOBUMP_FILE).file?
-    autobump_file.readlines(chomp: true)
-  else
-    []
-  end
-end
-
-
- -
-

- - #cask_dirPathname - - - - - -

-
-

Path to the directory of all Cask files for this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-669
-670
-671
-
-
# File 'tap.rb', line 669
-
-def cask_dir
-  @cask_dir ||= path/"Casks"
-end
-
-
- -
-

- - #cask_file?(file) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether the given path would present a Cask file in this Tap. -Accepts either an absolute path or a path relative to this Tap's path.

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-772
-773
-774
-775
-776
-777
-778
-
-
# File 'tap.rb', line 772
-
-def cask_file?(file)
-  file = Pathname.new(file) unless file.is_a? Pathname
-  file = file.expand_path(path)
-  return false unless ruby_file?(file)
-
-  file.to_s.start_with?("#{cask_dir}/")
-end
-
-
- -
-

- - #cask_filesArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all Cask files of this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-731
-732
-733
-734
-735
-736
-737
-
-
# File 'tap.rb', line 731
-
-def cask_files
-  @cask_files ||= if cask_dir.directory?
-    cask_dir.find.select { ruby_file?(_1) }
-  else
-    []
-  end
-end
-
-
- -
-

- - #cask_files_by_nameHash{String => Pathname} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A mapping of Cask tokens to Cask file paths.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-741
-742
-743
-744
-745
-746
-747
-748
-
-
# File 'tap.rb', line 741
-
-def cask_files_by_name
-  @cask_files_by_name ||= cask_files.each_with_object({}) do |file, hash|
-    # If there's more than one file with the same basename: use the longer one to prioritise more specific results.
-    basename = file.basename(".rb").to_s
-    existing_file = hash[basename]
-    hash[basename] = file if existing_file.nil? || existing_file.to_s.length < file.to_s.length
-  end
-end
-
-
- -
-

- - #cask_renamesHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Hash with tap cask renames.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-879
-880
-881
-882
-883
-884
-885
-
-
# File 'tap.rb', line 879
-
-def cask_renames
-  @cask_renames ||= if (rename_file = path/HOMEBREW_TAP_CASK_RENAMES_FILE).file?
-    JSON.parse(rename_file.read)
-  else
-    {}
-  end
-end
-
-
- -
-

- - #cask_reverse_renamesHash{String => Array<String>} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Mapping from new to old cask tokens. Reverse of #cask_renames.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-889
-890
-891
-892
-893
-894
-
-
# File 'tap.rb', line 889
-
-def cask_reverse_renames
-  @cask_reverse_renames ||= cask_renames.each_with_object({}) do |(old_name, new_name), hash|
-    hash[new_name] ||= []
-    hash[new_name] << old_name
-  end
-end
-
-
- -
-

- - #cask_tokensArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all Cask tokens of this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-798
-799
-800
-
-
# File 'tap.rb', line 798
-
-def cask_tokens
-  @cask_tokens ||= cask_files.map { formula_file_to_name(_1) }
-end
-
-
- -
-

- - #clear_cacheObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Clear internal cache.

- - -
-
-
- - -
- - - - -
-
-
-
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-
-
# File 'tap.rb', line 209
-
-def clear_cache
-  @remote = nil
-  @repository_var_suffix = nil
-  remove_instance_variable(:@private) if instance_variable_defined?(:@private)
-
-  @formula_dir = nil
-  @formula_files = nil
-  @formula_files_by_name = nil
-  @formula_names = nil
-  @prefix_to_versioned_formulae_names = nil
-  @formula_renames = nil
-  @formula_reverse_renames = nil
-
-  @cask_dir = nil
-  @cask_files = nil
-  @cask_files_by_name = nil
-  @cask_tokens = nil
-  @cask_renames = nil
-  @cask_reverse_renames = nil
-
-  @alias_dir = nil
-  @alias_files = nil
-  @aliases = nil
-  @alias_table = nil
-  @alias_reverse_table = nil
-
-  @command_dir = nil
-  @command_files = nil
-
-  @tap_migrations = nil
-  @reverse_tap_migrations_renames = nil
-
-  @audit_exceptions = nil
-  @style_exceptions = nil
-  @pypi_formula_mappings = nil
-  @synced_versions_formulae = nil
-
-  @config = nil
-  @spell_checker = nil
-end
-
-
- -
-

- - #command_dirPathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-838
-839
-840
-
-
# File 'tap.rb', line 838
-
-def command_dir
-  @command_dir ||= path/"cmd"
-end
-
-
- -
-

- - #command_filesArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all commands files of this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-844
-845
-846
-847
-848
-849
-850
-
-
# File 'tap.rb', line 844
-
-def command_files
-  @command_files ||= if command_dir.directory?
-    Commands.find_commands(command_dir)
-  else
-    []
-  end
-end
-
-
- -
-

- - #configTapConfig - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

TapConfig of this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-377
-378
-379
-380
-381
-382
-383
-
-
# File 'tap.rb', line 377
-
-def config
-  @config ||= begin
-    raise TapUnavailableError, name unless installed?
-
-    TapConfig.new(self)
-  end
-end
-
-
- -
-

- - #contentsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-700
-
-
# File 'tap.rb', line 684
-
-def contents
-  contents = []
-
-  if (command_count = command_files.count).positive?
-    contents << Utils.pluralize("command", command_count, include_count: true)
-  end
-
-  if (cask_count = cask_files.count).positive?
-    contents << Utils.pluralize("cask", cask_count, include_count: true)
-  end
-
-  if (formula_count = formula_files.count).positive?
-    contents << Utils.pluralize("formula", formula_count, plural: "e", include_count: true)
-  end
-
-  contents
-end
-
-
- -
-

- - #core_cask_tap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-404
-405
-406
-
-
# File 'tap.rb', line 404
-
-def core_cask_tap?
-  false
-end
-
-
- -
-

- - #core_tap?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-399
-400
-401
-
-
# File 'tap.rb', line 399
-
-def core_tap?
-  false
-end
-
-
- -
-

- - #custom_remote?Boolean - - - - - -

-
-

Check whether the #remote of Tap is customized.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-636
-637
-638
-639
-640
-
-
# File 'tap.rb', line 636
-
-def custom_remote?
-  return true unless (remote = self.remote)
-
-  !remote.casecmp(default_remote).zero?
-end
-
-
- -
-

- - #default_remoteString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

The default remote path to this Tap.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-282
-283
-284
-
-
# File 'tap.rb', line 282
-
-def default_remote
-  "https://github.com/#{full_name}"
-end
-
-
- -
-

- - #ensure_installed!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-251
-252
-253
-254
-255
-
-
# File 'tap.rb', line 251
-
-def ensure_installed!
-  return if installed?
-
-  install
-end
-
-
- -
-

- - #fix_remote_configuration(requested_remote: nil, quiet: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-561
-562
-563
-564
-565
-566
-567
-568
-569
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-
-
# File 'tap.rb', line 561
-
-def fix_remote_configuration(requested_remote: nil, quiet: false)
-  if requested_remote.present?
-    path.cd do
-      safe_system "git", "remote", "set-url", "origin", requested_remote
-      safe_system "git", "config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*"
-    end
-    $stderr.ohai "#{name}: changed remote from #{remote} to #{requested_remote}" unless quiet
-  end
-  return unless remote
-
-  current_upstream_head = T.must(git_repository.origin_branch_name)
-  return if requested_remote.blank? && git_repository.origin_has_branch?(current_upstream_head)
-
-  args = %w[fetch]
-  args << "--quiet" if quiet
-  args << "origin"
-  args << "+refs/heads/*:refs/remotes/origin/*"
-  safe_system "git", "-C", path, *args
-  git_repository.set_head_origin_auto
-
-  new_upstream_head = T.must(git_repository.origin_branch_name)
-  return if new_upstream_head == current_upstream_head
-
-  safe_system "git", "-C", path, "config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*"
-  git_repository.rename_branch old: current_upstream_head, new: new_upstream_head
-  git_repository.set_upstream_branch local: new_upstream_head, origin: new_upstream_head
-
-  return if quiet
-
-  $stderr.ohai "#{name}: changed default branch name from #{current_upstream_head} to #{new_upstream_head}!"
-end
-
-
- -
-

- - #forbidden_by_env?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-1104
-1105
-1106
-
-
# File 'tap.rb', line 1104
-
-def forbidden_by_env?
-  @forbidden_by_env ||= self.class.forbidden_taps.include?(self)
-end
-
-
- -
-

- - #formula_dirPathname - - - - - -

-
-

Path to the directory of all Formula files for this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-646
-647
-648
-649
-650
-651
-652
-653
-
-
# File 'tap.rb', line 646
-
-def formula_dir
-  # Official formulae taps always use this directory, saves time to hardcode.
-  @formula_dir ||= if official?
-    path/"Formula"
-  else
-    potential_formula_dirs.find(&:directory?) || (path/"Formula")
-  end
-end
-
-
- -
-

- - #formula_file?(file) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether the given path would present a Formula file in this Tap. -Accepts either an absolute path or a path relative to this Tap's path.

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-760
-761
-762
-763
-764
-765
-766
-767
-
-
# File 'tap.rb', line 760
-
-def formula_file?(file)
-  file = Pathname.new(file) unless file.is_a? Pathname
-  file = file.expand_path(path)
-  return false unless ruby_file?(file)
-  return false if cask_file?(file)
-
-  file.to_s.start_with?("#{formula_dir}/")
-end
-
-
- -
-

- - #formula_file_to_name(file) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - file - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-1068
-1069
-1070
-
-
# File 'tap.rb', line 1068
-
-def formula_file_to_name(file)
-  "#{name}/#{file.basename(".rb")}"
-end
-
-
- -
-

- - #formula_filesArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all Formula files of this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-704
-705
-706
-707
-708
-709
-710
-711
-712
-713
-714
-715
-716
-
-
# File 'tap.rb', line 704
-
-def formula_files
-  @formula_files ||= if formula_dir.directory?
-    if formula_dir == path
-      # We only want the top level here so we don't treat commands & casks as formulae.
-      # Sharding is only supported in Formula/ and HomebrewFormula/.
-      formula_dir.children
-    else
-      formula_dir.find
-    end.select { formula_file?(_1) }
-  else
-    []
-  end
-end
-
-
- -
-

- - #formula_files_by_nameHash{String => Pathname} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A mapping of Formula names to Formula file paths.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-720
-721
-722
-723
-724
-725
-726
-727
-
-
# File 'tap.rb', line 720
-
-def formula_files_by_name
-  @formula_files_by_name ||= formula_files.each_with_object({}) do |file, hash|
-    # If there's more than one file with the same basename: use the longer one to prioritise more specific results.
-    basename = file.basename(".rb").to_s
-    existing_file = hash[basename]
-    hash[basename] = file if existing_file.nil? || existing_file.to_s.length < file.to_s.length
-  end
-end
-
-
- -
-

- - #formula_namesArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

An array of all Formula names of this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-782
-783
-784
-
-
# File 'tap.rb', line 782
-
-def formula_names
-  @formula_names ||= formula_files.map { formula_file_to_name(_1) }
-end
-
-
- -
-

- - #formula_renamesHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Hash with tap formula renames.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-898
-899
-900
-901
-902
-903
-904
-
-
# File 'tap.rb', line 898
-
-def formula_renames
-  @formula_renames ||= if (rename_file = path/HOMEBREW_TAP_FORMULA_RENAMES_FILE).file?
-    JSON.parse(rename_file.read)
-  else
-    {}
-  end
-end
-
-
- -
-

- - #formula_reverse_renamesHash{String => Array<String>} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Mapping from new to old formula names. Reverse of #formula_renames.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-908
-909
-910
-911
-912
-913
-
-
# File 'tap.rb', line 908
-
-def formula_reverse_renames
-  @formula_reverse_renames ||= formula_renames.each_with_object({}) do |(old_name, new_name), hash|
-    hash[new_name] ||= []
-    hash[new_name] << old_name
-  end
-end
-
-
- -
-

- - #git?Boolean - - - - - -

-
-

Check whether this Tap is a Git repository.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-299
-300
-301
-
-
# File 'tap.rb', line 299
-
-def git?
-  git_repository.git_repository?
-end
-
-
- -
-

- - #git_branchObject - - - - - -

-
-

Git branch for this Tap.

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-306
-307
-308
-309
-310
-
-
# File 'tap.rb', line 306
-
-def git_branch
-  raise TapUnavailableError, name unless installed?
-
-  git_repository.branch_name
-end
-
-
- -
-

- - #git_headObject - - - - - -

-
-

Git HEAD for this Tap.

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-315
-316
-317
-318
-319
-
-
# File 'tap.rb', line 315
-
-def git_head
-  raise TapUnavailableError, name unless installed?
-
-  @git_head ||= git_repository.head_ref
-end
-
-
- -
-

- - #git_last_commitObject - - - - - -

-
-

Time since last git commit for this Tap.

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-324
-325
-326
-327
-328
-
-
# File 'tap.rb', line 324
-
-def git_last_commit
-  raise TapUnavailableError, name unless installed?
-
-  git_repository.last_committed
-end
-
-
- -
-

- - #install(quiet: false, clone_target: nil, custom_remote: false, verify: false, force: false) ⇒ Object - - - - - -

-
-

Install this Tap.

- - -
-
-
-

Parameters:

-
    - -
  • - - clone_target - - - (String) - - - (defaults to: nil) - - - — -

    If passed, it will be used as the clone remote.

    -
    - -
  • - -
  • - - quiet - - - (Boolean) - - - (defaults to: false) - - - — -

    If set, suppress all output.

    -
    - -
  • - -
  • - - custom_remote - - - (Boolean) - - - (defaults to: false) - - - — -

    If set, change the tap's remote if already installed.

    -
    - -
  • - -
  • - - verify - - - (Boolean) - - - (defaults to: false) - - - — -

    If set, verify all the formula, casks and aliases in the tap are valid.

    -
    - -
  • - -
  • - - force - - - (Boolean) - - - (defaults to: false) - - - — -

    If set, force core and cask taps to install even under API mode.

    -
    - -
  • - -
- -

Raises:

- - -
- - - - -
-
-
-
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-515
-516
-517
-518
-519
-520
-521
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-
-
# File 'tap.rb', line 417
-
-def install(quiet: false, clone_target: nil,
-            custom_remote: false, verify: false, force: false)
-  require "descriptions"
-  require "readall"
-
-  if official? && DEPRECATED_OFFICIAL_TAPS.include?(repo)
-    odie "#{name} was deprecated. This tap is now empty and all its contents were either deleted or migrated."
-  elsif user == "caskroom" || name == "phinze/cask"
-    new_repo = (repo == "cask") ? "cask" : "cask-#{repo}"
-    odie "#{name} was moved. Tap homebrew/#{new_repo} instead."
-  end
-
-  raise TapNoCustomRemoteError, name if custom_remote && clone_target.nil?
-
-  requested_remote = clone_target || default_remote
-
-  if installed? && !custom_remote
-    raise TapRemoteMismatchError.new(name, @remote, requested_remote) if clone_target && requested_remote != remote
-    raise TapAlreadyTappedError, name unless shallow?
-  end
-
-  if !allowed_by_env? || forbidden_by_env?
-    owner = Homebrew::EnvConfig.forbidden_owner
-    owner_contact = if (contact = Homebrew::EnvConfig.forbidden_owner_contact.presence)
-      "\n#{contact}"
-    end
-
-    error_message = +"The installation of the #{full_name} was requested but #{owner}\n"
-    error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless allowed_by_env?
-    error_message << " and\n" if !allowed_by_env? && forbidden_by_env?
-    error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if forbidden_by_env?
-    error_message << ".#{owner_contact}"
-
-    odie error_message
-  end
-
-  # ensure git is installed
-  Utils::Git.ensure_installed!
-
-  if installed?
-    if requested_remote != remote # we are sure that clone_target is not nil and custom_remote is true here
-      fix_remote_configuration(requested_remote:, quiet:)
-    end
-
-    config.delete(:forceautoupdate)
-
-    $stderr.ohai "Unshallowing #{name}" if shallow? && !quiet
-    args = %w[fetch]
-    # Git throws an error when attempting to unshallow a full clone
-    args << "--unshallow" if shallow?
-    args << "-q" if quiet
-    path.cd { safe_system "git", *args }
-    return
-  elsif (core_tap? || core_cask_tap?) && !Homebrew::EnvConfig.no_install_from_api? && !force
-    odie "Tapping #{name} is no longer typically necessary.\n" \
-         "Add #{Formatter.option("--force")} if you are sure you need it for contributing to Homebrew."
-  end
-
-  clear_cache
-  Tap.clear_cache
-
-  $stderr.ohai "Tapping #{name}" unless quiet
-  args =  %W[clone #{requested_remote} #{path}]
-
-  # Override possible user configs like:
-  #   git config --global clone.defaultRemoteName notorigin
-  args << "--origin=origin"
-  args << "-q" if quiet
-
-  # Override user-set default template.
-  args << "--template="
-  # Prevent `fsmonitor` from watching this repository.
-  args << "--config" << "core.fsmonitor=false"
-
-  begin
-    safe_system "git", *args
-
-    if verify && !Homebrew::EnvConfig.developer? && !Readall.valid_tap?(self, aliases: true)
-      raise "Cannot tap #{name}: invalid syntax in tap!"
-    end
-  rescue Interrupt, RuntimeError
-    ignore_interrupts do
-      # wait for git to possibly cleanup the top directory when interrupt happens.
-      sleep 0.1
-      FileUtils.rm_rf path
-      path.parent.rmdir_if_possible
-    end
-    raise
-  end
-
-  Commands.rebuild_commands_completion_list
-  link_completions_and_manpages
-
-  formatted_contents = contents.presence&.to_sentence&.dup&.prepend(" ")
-  $stderr.puts "Tapped#{formatted_contents} (#{path.abv})." unless quiet
-  CacheStoreDatabase.use(:descriptions) do |db|
-    DescriptionCacheStore.new(db)
-                         .update_from_formula_names!(formula_names)
-  end
-  CacheStoreDatabase.use(:cask_descriptions) do |db|
-    CaskDescriptionCacheStore.new(db)
-                             .update_from_cask_tokens!(cask_tokens)
-  end
-
-  if official?
-    untapped = self.class.untapped_official_taps
-    untapped -= [name]
-
-    if untapped.empty?
-      Homebrew::Settings.delete :untapped
-    else
-      Homebrew::Settings.write :untapped, untapped.join(";")
-    end
-  end
-
-  return if clone_target
-  return unless private?
-  return if quiet
-
-  path.cd do
-    return if Utils.popen_read("git", "config", "--get", "credential.helper").present?
-  end
-
-  $stderr.puts <<~EOS
-    It looks like you tapped a private repository. To avoid entering your
-    credentials each time you update, you can use git HTTP credential
-    caching or issue the following command:
-      cd #{path}
-      git remote set-url origin git@github.com:#{full_name}.git
-  EOS
-end
-
-
- -
-

- - #installed?Boolean - - - - - -

-
-

Check whether this Tap is installed.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-389
-390
-391
-
-
# File 'tap.rb', line 389
-
-def installed?
-  path.directory?
-end
-
-
- -
-

- - #issues_urlString? - - - - - -

-
-

The issues URL of this Tap. -e.g. https://github.com/user/homebrew-repo/issues

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-335
-336
-337
-338
-339
-
-
# File 'tap.rb', line 335
-
-def issues_url
-  return if !official? && custom_remote?
-
-  "#{default_remote}/issues"
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-
-
# File 'tap.rb', line 549
-
-def link_completions_and_manpages
-  command = "brew tap --repair"
-  Utils::Link.link_manpages(path, command)
-
-  Homebrew::Completions.show_completions_message_if_needed
-  if official? || Homebrew::Completions.link_completions?
-    Utils::Link.link_completions(path, command)
-  else
-    Utils::Link.unlink_completions(path)
-  end
-end
-
-
- -
-

- - #new_cask_path(token) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - token - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-674
-675
-676
-
-
# File 'tap.rb', line 674
-
-def new_cask_path(token)
-  cask_dir/"#{token.downcase}.rb"
-end
-
-
- -
-

- - #new_formula_path(name) ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-661
-662
-663
-
-
# File 'tap.rb', line 661
-
-def new_formula_path(name)
-  formula_dir/"#{name.downcase}.rb"
-end
-
-
- -
-

- - #official?Boolean - - - - - -

-
-

Check whether this Tap is an official Homebrew tap.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-344
-345
-346
-
-
# File 'tap.rb', line 344
-
-def official?
-  user == "Homebrew"
-end
-
-
- -
-

- - #potential_formula_dirsArray<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-656
-657
-658
-
-
# File 'tap.rb', line 656
-
-def potential_formula_dirs
-  @potential_formula_dirs ||= [path/"Formula", path/"HomebrewFormula", path].freeze
-end
-
-
- -
-

- - #prefix_to_versioned_formulae_namesHash{String => Array<String>} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A hash of all Formula name prefixes to versioned Formula in this Tap.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-788
-789
-790
-791
-792
-793
-794
-
-
# File 'tap.rb', line 788
-
-def prefix_to_versioned_formulae_names
-  @prefix_to_versioned_formulae_names ||= formula_names
-                                          .select { |name| name.include?("@") }
-                                          .group_by { |name| name.gsub(/(@[\d.]+)?$/, "") }
-                                          .transform_values(&:sort)
-                                          .freeze
-end
-
-
- -
-

- - #private?Boolean - - - - - -

-
-

Check whether the remote of this Tap is a private repository.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-
-
# File 'tap.rb', line 352
-
-def private?
-  return @private if defined?(@private)
-
-  @private = if (value = config[:private]).nil?
-    config[:private] = begin
-      if custom_remote?
-        true
-      else
-        # Don't store config if we don't know for sure.
-        return false if (value = GitHub.private_repo?(full_name)).nil?
-
-        value
-      end
-    rescue GitHub::API::HTTPNotFoundError
-      true
-    rescue GitHub::API::Error
-      false
-    end
-  else
-    value
-  end
-end
-
-
- -
-

- - #pypi_formula_mappingsHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Hash with pypi formula mappings

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-980
-981
-982
-
-
# File 'tap.rb', line 980
-
-def pypi_formula_mappings
-  @pypi_formula_mappings ||= read_formula_list(path/HOMEBREW_TAP_PYPI_FORMULA_MAPPINGS_FILE)
-end
-
-
- -
-

- - #relative_cask_path(token) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - token - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-679
-680
-681
-682
-
-
# File 'tap.rb', line 679
-
-def relative_cask_path(token)
-  new_cask_path(token).to_s
-                      .delete_prefix("#{path}/")
-end
-
-
- -
-

- - #remoteObject - - - - - -

-
-

The remote path to this Tap. -e.g. https://github.com/user/homebrew-repository

- - -
-
-
- - -
- - - - -
-
-
-
-261
-262
-263
-264
-265
-
-
# File 'tap.rb', line 261
-
-def remote
-  return default_remote unless installed?
-
-  @remote ||= git_repository.origin_url
-end
-
-
- -
-

- - #remote_repoString? - - - - - -

-
-

The remote repository name of this Tap. -e.g. user/homebrew-repository

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-272
-273
-274
-275
-276
-277
-278
-
-
# File 'tap.rb', line 272
-
-def remote_repo
-  return unless (remote = self.remote)
-
-  @remote_repo ||= remote.delete_prefix("https://github.com/")
-                         .delete_prefix("git@github.com:")
-                         .delete_suffix(".git")
-end
-
-
- -
-

- - #repository_var_suffixString - - - - Also known as: - repo_var_suffix - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-287
-288
-289
-290
-291
-292
-
-
# File 'tap.rb', line 287
-
-def repository_var_suffix
-  @repository_var_suffix ||= path.to_s
-                                 .delete_prefix(TAP_DIRECTORY.to_s)
-                                 .tr("^A-Za-z0-9", "_")
-                                 .upcase
-end
-
-
- -
-

- - #reverse_tap_migrations_renamesHash{String => Array<String>} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-926
-927
-928
-929
-930
-931
-932
-933
-934
-935
-936
-
-
# File 'tap.rb', line 926
-
-def reverse_tap_migrations_renames
-  @reverse_tap_migrations_renames ||= tap_migrations.each_with_object({}) do |(old_name, new_name), hash|
-    # Only include renames:
-    # + `homebrew/cask/water-buffalo`
-    # - `homebrew/cask`
-    next if new_name.count("/") != 2
-
-    hash[new_name] ||= []
-    hash[new_name] << old_name
-  end
-end
-
-
- -
-

- - #shallow?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check whether this Tap is a shallow clone.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-394
-395
-396
-
-
# File 'tap.rb', line 394
-
-def shallow?
-  (path/".git/shallow").exist?
-end
-
-
- -
-

- - #should_report_analytics?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-995
-996
-997
-
-
# File 'tap.rb', line 995
-
-def should_report_analytics?
-  installed? && !private?
-end
-
-
- -
-

- - #style_exceptionsHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Hash with style exceptions

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-974
-975
-976
-
-
# File 'tap.rb', line 974
-
-def style_exceptions
-  @style_exceptions ||= read_formula_list_directory("#{HOMEBREW_TAP_STYLE_EXCEPTIONS_DIR}/*")
-end
-
-
- -
-

- - #synced_versions_formulaeArray<Array<String>> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Array with synced versions formulae

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-986
-987
-988
-989
-990
-991
-992
-
-
# File 'tap.rb', line 986
-
-def synced_versions_formulae
-  @synced_versions_formulae ||= if (synced_file = path/HOMEBREW_TAP_SYNCED_VERSIONS_FORMULAE_FILE).file?
-    JSON.parse(synced_file.read)
-  else
-    []
-  end
-end
-
-
- -
-

- - #tap_migrationsHash{String => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Hash with tap migrations.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-917
-918
-919
-920
-921
-922
-923
-
-
# File 'tap.rb', line 917
-
-def tap_migrations
-  @tap_migrations ||= if (migration_file = path/HOMEBREW_TAP_MIGRATIONS_FILE).file?
-    JSON.parse(migration_file.read)
-  else
-    {}
-  end
-end
-
-
- -
-

- - #to_hashHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-853
-854
-855
-856
-857
-858
-859
-860
-861
-862
-863
-864
-865
-866
-867
-868
-869
-870
-871
-872
-873
-874
-875
-
-
# File 'tap.rb', line 853
-
-def to_hash
-  hash = {
-    "name"          => name,
-    "user"          => user,
-    "repo"          => repo,
-    "path"          => path.to_s,
-    "installed"     => installed?,
-    "official"      => official?,
-    "formula_names" => formula_names,
-    "cask_tokens"   => cask_tokens,
-  }
-
-  if installed?
-    hash["formula_files"] = formula_files.map(&:to_s)
-    hash["cask_files"] = cask_files.map(&:to_s)
-    hash["command_files"] = command_files.map(&:to_s)
-    hash["remote"] = remote
-    hash["custom_remote"] = custom_remote?
-    hash["private"] = private?
-  end
-
-  hash
-end
-
-
- -
-

- - #uninstall(manual: false) ⇒ Object - - - - - -

-
-

Uninstall this Tap.

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-
-
# File 'tap.rb', line 596
-
-def uninstall(manual: false)
-  require "descriptions"
-  raise TapUnavailableError, name unless installed?
-
-  $stderr.puts "Untapping #{name}..."
-
-  abv = path.abv
-  formatted_contents = contents.presence&.to_sentence&.dup&.prepend(" ")
-
-  CacheStoreDatabase.use(:descriptions) do |db|
-    DescriptionCacheStore.new(db)
-                         .delete_from_formula_names!(formula_names)
-  end
-  CacheStoreDatabase.use(:cask_descriptions) do |db|
-    CaskDescriptionCacheStore.new(db)
-                             .delete_from_cask_tokens!(cask_tokens)
-  end
-  Utils::Link.unlink_manpages(path)
-  Utils::Link.unlink_completions(path)
-  path.rmtree
-  path.parent.rmdir_if_possible
-  $stderr.puts "Untapped#{formatted_contents} (#{abv})."
-
-  Commands.rebuild_commands_completion_list
-  clear_cache
-  Tap.clear_cache
-
-  return if !manual || !official?
-
-  untapped = self.class.untapped_official_taps
-  return if untapped.include? name
-
-  untapped << name
-  Homebrew::Settings.write :untapped, untapped.join(";")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Tap/InvalidNameError.html b/docs/Tap/InvalidNameError.html deleted file mode 100644 index b44bae149..000000000 --- a/docs/Tap/InvalidNameError.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - Exception: Tap::InvalidNameError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Tap::InvalidNameError - - - Private -

-
- -
-
Inherits:
-
- ArgumentError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
tap.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/TapAlreadyTappedError.html b/docs/TapAlreadyTappedError.html deleted file mode 100644 index 9d15dbe3e..000000000 --- a/docs/TapAlreadyTappedError.html +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - Exception: TapAlreadyTappedError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapAlreadyTappedError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a tap is already installed.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #name ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name) ⇒ TapAlreadyTappedError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapAlreadyTappedError.

- - -
-
-
- - -
- - - - -
-
-
-
-341
-342
-343
-344
-345
-346
-347
-
-
# File 'exceptions.rb', line 341
-
-def initialize(name)
-  @name = name
-
-  super <<~EOS
-    Tap #{name} already tapped.
-  EOS
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-339
-340
-341
-
-
# File 'exceptions.rb', line 339
-
-def name
-  @name
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/TapConfig.html b/docs/TapConfig.html deleted file mode 100644 index 239403196..000000000 --- a/docs/TapConfig.html +++ /dev/null @@ -1,620 +0,0 @@ - - - - - - - Class: TapConfig - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: TapConfig - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
tap.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Permanent configuration per Tap using git-config(1).

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #tap ⇒ Tap - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(tap) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tap - - - (Tap) - - - -
  • - -
- - -
- - - - -
-
-
-
-1482
-1483
-1484
-
-
# File 'tap.rb', line 1482
-
-def initialize(tap)
-  @tap = tap
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #tapTap (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Tap) - - - -
  • - -
- -
- - - - -
-
-
-
-1479
-1480
-1481
-
-
# File 'tap.rb', line 1479
-
-def tap
-  @tap
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #[](key) ⇒ Boolean? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (Symbol) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-1487
-1488
-1489
-1490
-1491
-1492
-1493
-1494
-1495
-
-
# File 'tap.rb', line 1487
-
-def [](key)
-  return unless tap.git?
-  return unless Utils::Git.available?
-
-  case Homebrew::Settings.read(key, repo: tap.path)
-  when "true" then true
-  when "false" then false
-  end
-end
-
-
- -
-

- - #[]=(key, value) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - key - - - (Symbol) - - - -
  • - -
  • - - value - - - (Boolean) - - - -
  • - -
- - -
- - - - -
-
-
-
-1498
-1499
-1500
-1501
-1502
-1503
-
-
# File 'tap.rb', line 1498
-
-def []=(key, value)
-  return unless tap.git?
-  return unless Utils::Git.available?
-
-  Homebrew::Settings.write key, value.to_s, repo: tap.path
-end
-
-
- -
-

- - #delete(key) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - key - - - (Symbol) - - - -
  • - -
- - -
- - - - -
-
-
-
-1506
-1507
-1508
-1509
-1510
-1511
-
-
# File 'tap.rb', line 1506
-
-def delete(key)
-  return unless tap.git?
-  return unless Utils::Git.available?
-
-  Homebrew::Settings.delete key, repo: tap.path
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/TapCoreRemoteMismatchError.html b/docs/TapCoreRemoteMismatchError.html deleted file mode 100644 index 4c95162d5..000000000 --- a/docs/TapCoreRemoteMismatchError.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - Exception: TapCoreRemoteMismatchError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapCoreRemoteMismatchError - - - Private -

-
- -
-
Inherits:
-
- TapRemoteMismatchError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when the remote of homebrew/core does not match HOMEBREW_CORE_GIT_REMOTE.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes inherited from TapRemoteMismatchError

-

#actual_remote, #expected_remote, #name

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from TapRemoteMismatchError

-

#initialize

- -
-

Constructor Details

- -

This class inherits a constructor from TapRemoteMismatchError

- -
- - -
-

Instance Method Details

- - -
-

- - #messageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-328
-329
-330
-331
-332
-333
-334
-
-
# File 'exceptions.rb', line 328
-
-def message
-  <<~EOS
-    Tap #{name} remote does not match HOMEBREW_CORE_GIT_REMOTE.
-    #{expected_remote} != #{actual_remote}
-    Please set HOMEBREW_CORE_GIT_REMOTE="#{actual_remote}" and run `brew update` instead.
-  EOS
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/TapFormulaAmbiguityError.html b/docs/TapFormulaAmbiguityError.html deleted file mode 100644 index b7ca796f8..000000000 --- a/docs/TapFormulaAmbiguityError.html +++ /dev/null @@ -1,469 +0,0 @@ - - - - - - - Exception: TapFormulaAmbiguityError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapFormulaAmbiguityError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula with the same name is found in multiple taps.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name, loaders) ⇒ TapFormulaAmbiguityError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapFormulaAmbiguityError.

- - -
-
-
- - -
- - - - -
-
-
-
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-
-
# File 'exceptions.rb', line 267
-
-def initialize(name, loaders)
-  @name = name
-  @loaders = loaders
-  @taps = loaders.map(&:tap)
-
-  formulae = taps.map { |tap| "#{tap}/#{name}" }
-  formula_list = formulae.map { |f| "\n       * #{f}" }.join
-
-  super <<~EOS
-    Formulae found in multiple taps:#{formula_list}
-
-    Please use the fully-qualified name (e.g. #{formulae.first}) to refer to a specific formula.
-  EOS
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #loadersObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-265
-266
-267
-
-
# File 'exceptions.rb', line 265
-
-def loaders
-  @loaders
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-265
-266
-267
-
-
# File 'exceptions.rb', line 265
-
-def name
-  @name
-end
-
-
- - - -
-

- - #tapsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-265
-266
-267
-
-
# File 'exceptions.rb', line 265
-
-def taps
-  @taps
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/TapFormulaClassUnavailableError.html b/docs/TapFormulaClassUnavailableError.html deleted file mode 100644 index cb3850c71..000000000 --- a/docs/TapFormulaClassUnavailableError.html +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - Exception: TapFormulaClassUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapFormulaClassUnavailableError - - - Private -

-
- -
-
Inherits:
-
- TapFormulaUnavailableError - - - show all - -
-
- - - - - - -
-
Includes:
-
FormulaClassUnavailableErrorModule
-
- - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula in a specific tap does not contain a formula class.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #tap ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes included from FormulaClassUnavailableErrorModule

-

#class_list, #class_name, #path

- - - -

Attributes inherited from TapFormulaUnavailableError

-

#repo, #user

- - - -

Attributes inherited from FormulaUnavailableError

-

#dependent

- - - -

Attributes inherited from FormulaOrCaskUnavailableError

-

#name

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - - - - - - - -

Methods inherited from FormulaUnavailableError

-

#dependent_s

- - - - - - - - - -

Methods inherited from FormulaOrCaskUnavailableError

-

#did_you_mean

- -
-

Constructor Details

- -
-

- - #initialize(tap, name, path, class_name, class_list) ⇒ TapFormulaClassUnavailableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapFormulaClassUnavailableError.

- - -
-
-
- - -
- - - - -
-
-
-
-244
-245
-246
-247
-248
-249
-
-
# File 'exceptions.rb', line 244
-
-def initialize(tap, name, path, class_name, class_list)
-  @path = path
-  @class_name = class_name
-  @class_list = class_list
-  super tap, name
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #tapObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-242
-243
-244
-
-
# File 'exceptions.rb', line 242
-
-def tap
-  @tap
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/TapFormulaOrCaskUnavailableError.html b/docs/TapFormulaOrCaskUnavailableError.html deleted file mode 100644 index 0ab65113e..000000000 --- a/docs/TapFormulaOrCaskUnavailableError.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - Exception: TapFormulaOrCaskUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapFormulaOrCaskUnavailableError - - - Private -

-
- -
-
Inherits:
-
- FormulaOrCaskUnavailableError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula or cask in a specific tap is not available.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #tap ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from FormulaOrCaskUnavailableError

-

#name

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaOrCaskUnavailableError

-

#did_you_mean

- -
-

Constructor Details

- -
-

- - #initialize(tap, name) ⇒ TapFormulaOrCaskUnavailableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapFormulaOrCaskUnavailableError.

- - -
-
-
- - -
- - - - -
-
-
-
-125
-126
-127
-128
-
-
# File 'exceptions.rb', line 125
-
-def initialize(tap, name)
-  super "#{tap}/#{name}"
-  @tap = tap
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #tapObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-123
-124
-125
-
-
# File 'exceptions.rb', line 123
-
-def tap
-  @tap
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/TapFormulaUnavailableError.html b/docs/TapFormulaUnavailableError.html deleted file mode 100644 index 4212fcdb5..000000000 --- a/docs/TapFormulaUnavailableError.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - Exception: TapFormulaUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapFormulaUnavailableError - - - Private -

-
- -
-
Inherits:
-
- FormulaUnavailableError - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula in a specific tap is unavailable.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #repo ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #tap ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - - -
  • - - - #user ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

Attributes inherited from FormulaUnavailableError

-

#dependent

- - - -

Attributes inherited from FormulaOrCaskUnavailableError

-

#name

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from FormulaUnavailableError

-

#dependent_s

- - - - - - - - - -

Methods inherited from FormulaOrCaskUnavailableError

-

#did_you_mean

- -
-

Constructor Details

- -
-

- - #initialize(tap, name) ⇒ TapFormulaUnavailableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapFormulaUnavailableError.

- - -
-
-
- - -
- - - - -
-
-
-
-223
-224
-225
-226
-227
-228
-
-
# File 'exceptions.rb', line 223
-
-def initialize(tap, name)
-  @tap = tap
-  @user = tap.user
-  @repo = tap.repo
-  super "#{tap}/#{name}"
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #repoObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-221
-222
-223
-
-
# File 'exceptions.rb', line 221
-
-def repo
-  @repo
-end
-
-
- - - -
-

- - #tapObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-221
-222
-223
-
-
# File 'exceptions.rb', line 221
-
-def tap
-  @tap
-end
-
-
- - - -
-

- - #userObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-221
-222
-223
-
-
# File 'exceptions.rb', line 221
-
-def user
-  @user
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/TapFormulaUnreadableError.html b/docs/TapFormulaUnreadableError.html deleted file mode 100644 index 36b69569a..000000000 --- a/docs/TapFormulaUnreadableError.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - Exception: TapFormulaUnreadableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapFormulaUnreadableError - - - Private -

-
- -
-
Inherits:
-
- TapFormulaUnavailableError - - - show all - -
-
- - - - - - -
-
Includes:
-
FormulaUnreadableErrorModule
-
- - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a formula in a specific tap is unreadable.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from FormulaUnreadableErrorModule

-

#formula_error

- - - -

Attributes inherited from TapFormulaUnavailableError

-

#repo, #tap, #user

- - - -

Attributes inherited from FormulaUnavailableError

-

#dependent

- - - -

Attributes inherited from FormulaOrCaskUnavailableError

-

#name

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - - - - - - - -

Methods inherited from FormulaUnavailableError

-

#dependent_s

- - - - - - - - - -

Methods inherited from FormulaOrCaskUnavailableError

-

#did_you_mean

- -
-

Constructor Details

- -
-

- - #initialize(tap, name, error) ⇒ TapFormulaUnreadableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapFormulaUnreadableError.

- - -
-
-
- - -
- - - - -
-
-
-
-256
-257
-258
-259
-260
-
-
# File 'exceptions.rb', line 256
-
-def initialize(tap, name, error)
-  super(tap, name)
-  @formula_error = error
-  set_backtrace(error.backtrace)
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/TapNoCustomRemoteError.html b/docs/TapNoCustomRemoteError.html deleted file mode 100644 index aa294dd35..000000000 --- a/docs/TapNoCustomRemoteError.html +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - Exception: TapNoCustomRemoteError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapNoCustomRemoteError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when run brew tap --custom-remote without a remote URL.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #name ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name) ⇒ TapNoCustomRemoteError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapNoCustomRemoteError.

- - -
-
-
- - -
- - - - -
-
-
-
-354
-355
-356
-357
-358
-359
-360
-
-
# File 'exceptions.rb', line 354
-
-def initialize(name)
-  @name = name
-
-  super <<~EOS
-    Tap #{name} with option `--custom-remote` but without a remote URL.
-  EOS
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-352
-353
-354
-
-
# File 'exceptions.rb', line 352
-
-def name
-  @name
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/TapRemoteMismatchError.html b/docs/TapRemoteMismatchError.html deleted file mode 100644 index a9f1824ad..000000000 --- a/docs/TapRemoteMismatchError.html +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - - Exception: TapRemoteMismatchError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapRemoteMismatchError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a tap's remote does not match the actual remote.

- - -
-
-
- - -
-

Direct Known Subclasses

-

TapCoreRemoteMismatchError

-
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name, expected_remote, actual_remote) ⇒ TapRemoteMismatchError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapRemoteMismatchError.

- - -
-
-
- - -
- - - - -
-
-
-
-310
-311
-312
-313
-314
-315
-316
-
-
# File 'exceptions.rb', line 310
-
-def initialize(name, expected_remote, actual_remote)
-  @name = name
-  @expected_remote = expected_remote
-  @actual_remote = actual_remote
-
-  super message
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #actual_remoteObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-308
-309
-310
-
-
# File 'exceptions.rb', line 308
-
-def actual_remote
-  @actual_remote
-end
-
-
- - - -
-

- - #expected_remoteObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-308
-309
-310
-
-
# File 'exceptions.rb', line 308
-
-def expected_remote
-  @expected_remote
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-308
-309
-310
-
-
# File 'exceptions.rb', line 308
-
-def name
-  @name
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #messageObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-318
-319
-320
-321
-322
-323
-
-
# File 'exceptions.rb', line 318
-
-def message
-  <<~EOS
-    Tap #{name} remote mismatch.
-    #{expected_remote} != #{actual_remote}
-  EOS
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/TapUnavailableError.html b/docs/TapUnavailableError.html deleted file mode 100644 index 0a8b3fae9..000000000 --- a/docs/TapUnavailableError.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - Exception: TapUnavailableError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: TapUnavailableError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a tap is unavailable.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #name ⇒ Object - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(name) ⇒ TapUnavailableError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TapUnavailableError.

- - -
-
-
- - -
- - - - -
-
-
-
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-
-
# File 'exceptions.rb', line 287
-
-def initialize(name)
-  @name = name
-
-  message = "No available tap #{name}.\n"
-  if [CoreTap.instance.name, CoreCaskTap.instance.name].include?(name)
-    command = "brew tap --force #{name}"
-    message += <<~EOS
-      Run #{Formatter.identifier(command)} to tap #{name}!
-    EOS
-  else
-    command = "brew tap-new #{name}"
-    message += <<~EOS
-      Run #{Formatter.identifier(command)} to create a new #{name} tap!
-    EOS
-  end
-  super message.freeze
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-285
-286
-287
-
-
# File 'exceptions.rb', line 285
-
-def name
-  @name
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Tapioca.html b/docs/Tapioca.html deleted file mode 100644 index 4992a7ff6..000000000 --- a/docs/Tapioca.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - Module: Tapioca - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Tapioca - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/tapioca/compilers/tty.rb,
- sorbet/tapioca/compilers/args.rb,
sorbet/tapioca/compilers/rubocop.rb,
sorbet/tapioca/compilers/env_config.rb
-
-
- -
- -

Defined Under Namespace

-

- - - Modules: Compilers - - - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Tapioca/Compilers.html b/docs/Tapioca/Compilers.html deleted file mode 100644 index f6cff6532..000000000 --- a/docs/Tapioca/Compilers.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - Module: Tapioca::Compilers - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Tapioca::Compilers - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/tapioca/compilers/tty.rb,
- sorbet/tapioca/compilers/args.rb,
sorbet/tapioca/compilers/rubocop.rb,
sorbet/tapioca/compilers/env_config.rb
-
-
- -
- -

Defined Under Namespace

-

- - - - - Classes: Args, EnvConfig, RuboCop, Tty - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Tapioca/Compilers/Args.html b/docs/Tapioca/Compilers/Args.html deleted file mode 100644 index c4d24e797..000000000 --- a/docs/Tapioca/Compilers/Args.html +++ /dev/null @@ -1,685 +0,0 @@ - - - - - - - Class: Tapioca::Compilers::Args - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Tapioca::Compilers::Args - - - -

-
- -
-
Inherits:
-
- Dsl::Compiler - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/tapioca/compilers/args.rb
-
- -
- - - -

- Constant Summary - collapse -

- -
- -
GLOBAL_OPTIONS = - -
-
T.let(
-  Homebrew::CLI::Parser.global_options.map do |short_option, long_option, _|
-    [short_option, long_option].map { "#{Homebrew::CLI::Parser.option_to_name(_1)}?" }
-  end.flatten.freeze, T::Array[String]
-)
- -
Parsable = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
T.type_alias { T.any(T.class_of(Homebrew::CLI::Args), T.class_of(Homebrew::AbstractCommand)) }
- -
ConstantType = - -
-
type_member { { fixed: Parsable } }
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Class Method Details

- - -
-

- - .gather_constantsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'sorbet/tapioca/compilers/args.rb', line 23
-
-def self.gather_constants
-  # require all the commands to ensure the _arg methods are defined
-  ["cmd", "dev-cmd"].each do |dir|
-    Dir[File.join(__dir__, "../../../#{dir}", "*.rb")].each { require(_1) }
-  end
-  [Homebrew::CLI::Args] + Homebrew::AbstractCommand.subclasses
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #args_table(parser) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-56
-
-
# File 'sorbet/tapioca/compilers/args.rb', line 53
-
-def args_table(parser)
-  # we exclude non-args from the table, such as :named and :remaining
-  parser.instance_variable_get(:@args).instance_variable_get(:@table).except(:named, :remaining)
-end
-
-
- -
-

- - #comma_arrays(parser) ⇒ Array<Symbol> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-59
-60
-61
-62
-
-
# File 'sorbet/tapioca/compilers/args.rb', line 59
-
-def comma_arrays(parser)
-  parser.instance_variable_get(:@non_global_processed_options)
-        .filter_map { |k, v| parser.option_to_name(k).to_sym if v == :comma_array }
-end
-
-
- -
-

- - #decoratevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'sorbet/tapioca/compilers/args.rb', line 32
-
-def decorate
-  if constant == Homebrew::CLI::Args
-    root.create_path(Homebrew::CLI::Args) do |klass|
-      Homebrew.methods(false).select { _1.end_with?("_args") }.each do |args_method_name|
-        parser = Homebrew.method(args_method_name).call
-        create_args_methods(klass, parser)
-      end
-    end
-  else
-    cmd = T.cast(constant, T.class_of(Homebrew::AbstractCommand))
-    args_class_name = T.must(T.must(cmd.args_class).name)
-    root.create_class(args_class_name, superclass_name: "Homebrew::CLI::Args") do |klass|
-      create_args_methods(klass, cmd.parser)
-    end
-    root.create_path(constant) do |klass|
-      klass.create_method("args", return_type: args_class_name)
-    end
-  end
-end
-
-
- -
-

- - #get_return_type(method_name, value, comma_array_methods) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - method_name - - - (Symbol) - - - -
  • - -
  • - - value - - - (T.untyped) - - - -
  • - -
  • - - comma_array_methods - - - (Array<Symbol>) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# File 'sorbet/tapioca/compilers/args.rb', line 65
-
-def get_return_type(method_name, value, comma_array_methods)
-  if comma_array_methods.include?(method_name)
-    "T.nilable(T::Array[String])"
-  elsif [true, false].include?(value)
-    "T::Boolean"
-  else
-    "T.nilable(String)"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Tapioca/Compilers/EnvConfig.html b/docs/Tapioca/Compilers/EnvConfig.html deleted file mode 100644 index 0746237fe..000000000 --- a/docs/Tapioca/Compilers/EnvConfig.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - Class: Tapioca::Compilers::EnvConfig - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Tapioca::Compilers::EnvConfig - - - -

-
- -
-
Inherits:
-
- Dsl::Compiler - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/tapioca/compilers/env_config.rb
-
- -
- - - -

- Constant Summary - collapse -

- -
- -
ConstantType = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
type_member { { fixed: Module } }
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Class Method Details

- - -
-

- - .gather_constantsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-
-
# File 'sorbet/tapioca/compilers/env_config.rb', line 16
-
-def self.gather_constants = [Homebrew::EnvConfig]
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #decoratevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-
-
# File 'sorbet/tapioca/compilers/env_config.rb', line 19
-
-def decorate
-  root.create_module(T.must(constant.name)) do |mod|
-    dynamic_methods = {}
-    Homebrew::EnvConfig::ENVS.each do |env, hash|
-      next if Homebrew::EnvConfig::CUSTOM_IMPLEMENTATIONS.include?(env)
-
-      name = Homebrew::EnvConfig.env_method_name(env, hash)
-      dynamic_methods[name] = hash[:default]
-    end
-
-    dynamic_methods.each do |method, default|
-      return_type = if method.end_with?("?")
-        T::Boolean
-      elsif default
-        default.class
-      else
-        T.nilable(String)
-      end
-
-      mod.create_method(method, return_type:, class_method: true)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Tapioca/Compilers/RuboCop.html b/docs/Tapioca/Compilers/RuboCop.html deleted file mode 100644 index 385d0f4a0..000000000 --- a/docs/Tapioca/Compilers/RuboCop.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - Class: Tapioca::Compilers::RuboCop - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Tapioca::Compilers::RuboCop - - - -

-
- -
-
Inherits:
-
- Dsl::Compiler - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/tapioca/compilers/rubocop.rb
-
- -
- - - -

- Constant Summary - collapse -

- -
- -
ConstantType = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
type_member { { fixed: Module } }
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Class Method Details

- - -
-

- - .gather_constantsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'sorbet/tapioca/compilers/rubocop.rb', line 19
-
-def self.gather_constants
-  all_modules.select do |klass|
-    next unless klass.singleton_class < ::RuboCop::AST::NodePattern::Macros
-
-    path = T.must(Object.const_source_location(klass.to_s)).fetch(0).to_s
-    # exclude vendored code, to avoid contradicting their RBI files
-    !path.include?("/vendor/bundle/ruby/") &&
-      # exclude source code that already has an RBI file
-      !File.exist?("#{path}i") &&
-      # exclude source code that doesn't use the DSLs
-      File.readlines(path).any?(/def_node_/)
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #decoratevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'sorbet/tapioca/compilers/rubocop.rb', line 34
-
-def decorate
-  root.create_path(constant) do |klass|
-    constant.instance_methods(false).each do |method_name|
-      source = constant.instance_method(method_name).source.lstrip
-      # For more info on these DSLs:
-      #   https://www.rubydoc.info/gems/rubocop-ast/RuboCop/AST/NodePattern/Macros
-      #   https://github.com/rubocop/rubocop-ast/blob/master/lib/rubocop/ast/node_pattern.rb
-      #   https://github.com/rubocop/rubocop-ast/blob/master/lib/rubocop/ast/node_pattern/method_definer.rb
-      # The type signatures below could maybe be stronger, but I only wanted to avoid errors:
-      case source
-      when /\Adef_node_matcher/
-        # https://github.com/Shopify/tapioca/blob/3341a9b/lib/tapioca/rbi_ext/model.rb#L89
-        klass.create_method(
-          method_name.to_s,
-          parameters:  [
-            create_param("node", type: "RuboCop::AST::Node"),
-            create_kw_rest_param("kwargs", type: "T.untyped"),
-            create_block_param("block", type: "T.untyped"),
-          ],
-          return_type: "T.untyped",
-        )
-      when /\Adef_node_search/
-        klass.create_method(
-          method_name.to_s,
-          parameters:  [
-            create_param("node", type: "RuboCop::AST::Node"),
-            create_rest_param("pattern", type: "T.any(String, Symbol)"),
-            create_kw_rest_param("kwargs", type: "T.untyped"),
-            create_block_param("block", type: "T.untyped"),
-          ],
-          return_type: method_name.to_s.end_with?("?") ? "T::Boolean" : "T.untyped",
-        )
-      end
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Tapioca/Compilers/Tty.html b/docs/Tapioca/Compilers/Tty.html deleted file mode 100644 index 665a49cbc..000000000 --- a/docs/Tapioca/Compilers/Tty.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - Class: Tapioca::Compilers::Tty - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Tapioca::Compilers::Tty - - - -

-
- -
-
Inherits:
-
- Dsl::Compiler - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
sorbet/tapioca/compilers/tty.rb
-
- -
- - - -

- Constant Summary - collapse -

- -
- -
ConstantType = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
type_member { { fixed: Module } }
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Class Method Details

- - -
-

- - .gather_constantsObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-16
-
-
# File 'sorbet/tapioca/compilers/tty.rb', line 16
-
-def self.gather_constants = [::Tty]
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #decoratevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'sorbet/tapioca/compilers/tty.rb', line 19
-
-def decorate
-  root.create_module(T.must(constant.name)) do |mod|
-    dynamic_methods = ::Tty::COLOR_CODES.keys + ::Tty::STYLE_CODES.keys + ::Tty::SPECIAL_CODES.keys
-
-    dynamic_methods.each do |method|
-      mod.create_method(method.to_s, return_type: "String", class_method: true)
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/TestRunnerFormula.html b/docs/TestRunnerFormula.html deleted file mode 100644 index 74f071f9e..000000000 --- a/docs/TestRunnerFormula.html +++ /dev/null @@ -1,1488 +0,0 @@ - - - - - - - Class: TestRunnerFormula - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: TestRunnerFormula - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
test_runner_formula.rb
-
- -
- - - -

- Constant Summary - collapse -

- -
- -
SIMULATE_SYSTEM_SYMBOLS = - -
-
T.let({ arm64: :arm, x86_64: :intel }.freeze, T::Hash[Symbol, Symbol])
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(formula, eval_all: Homebrew::EnvConfig.eval_all?) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
  • - - eval_all - - - (Boolean) - - - (defaults to: Homebrew::EnvConfig.eval_all?) - - -
  • - -
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'test_runner_formula.rb', line 17
-
-def initialize(formula, eval_all: Homebrew::EnvConfig.eval_all?)
-  Formulary.enable_factory_cache!
-  @formula = T.let(formula, Formula)
-  @name = T.let(formula.name, String)
-  @dependent_hash = T.let({}, T::Hash[Symbol, T::Array[TestRunnerFormula]])
-  @eval_all = T.let(eval_all, T::Boolean)
-  freeze
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #eval_allBoolean (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'test_runner_formula.rb', line 14
-
-def eval_all
-  @eval_all
-end
-
-
- - - -
-

- - #formulaFormula (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'test_runner_formula.rb', line 11
-
-def formula
-  @formula
-end
-
-
- - - -
-

- - #nameString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'test_runner_formula.rb', line 8
-
-def name
-  @name
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #arm64_compatible?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'test_runner_formula.rb', line 62
-
-def arm64_compatible?
-  !x86_64_only?
-end
-
-
- -
-

- - #arm64_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-58
-59
-
-
# File 'test_runner_formula.rb', line 57
-
-def arm64_only?
-  formula.requirements.any? { |r| r.is_a?(ArchRequirement) && (r.arch == :arm64) }
-end
-
-
- -
-

- - #compatible_with?(macos_version) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'test_runner_formula.rb', line 72
-
-def compatible_with?(macos_version)
-  # Assign to a variable to assist type-checking.
-  requirement = versioned_macos_requirement
-  return true if requirement.blank?
-
-  macos_version.public_send(requirement.comparator, requirement.version)
-end
-
-
- -
-

- - #dependents(platform:, arch:, macos_version:) ⇒ Array<TestRunnerFormula> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - platform - - - (Symbol) - - - -
  • - -
  • - - arch - - - (Symbol) - - - -
  • - -
  • - - macos_version - - - (Symbol, nil) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-
-
# File 'test_runner_formula.rb', line 89
-
-def dependents(platform:, arch:, macos_version:)
-  cache_key = :"#{platform}_#{arch}_#{macos_version}"
-
-  @dependent_hash[cache_key] ||= begin
-    formula_selector, eval_all_env = if eval_all
-      [:all, "1"]
-    else
-      [:installed, nil]
-    end
-
-    with_env(HOMEBREW_EVAL_ALL: eval_all_env) do
-      os = macos_version || platform
-      arch = SIMULATE_SYSTEM_SYMBOLS.fetch(arch)
-
-      Homebrew::SimulateSystem.with(os:, arch:) do
-        Formula.public_send(formula_selector)
-               .select { |candidate_f| candidate_f.deps.map(&:name).include?(name) }
-               .map { |f| TestRunnerFormula.new(f, eval_all:) }
-               .freeze
-      end
-    end
-  end
-
-  @dependent_hash.fetch(cache_key)
-end
-
-
- -
-

- - #linux_compatible?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'test_runner_formula.rb', line 42
-
-def linux_compatible?
-  !macos_only?
-end
-
-
- -
-

- - #linux_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'test_runner_formula.rb', line 37
-
-def linux_only?
-  formula.requirements.any?(LinuxRequirement)
-end
-
-
- -
-

- - #macos_compatible?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'test_runner_formula.rb', line 32
-
-def macos_compatible?
-  !linux_only?
-end
-
-
- -
-

- - #macos_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'test_runner_formula.rb', line 27
-
-def macos_only?
-  formula.requirements.any? { |r| r.is_a?(MacOSRequirement) && !r.version_specified? }
-end
-
-
- -
-

- - #versioned_macos_requirementMacOSRequirement? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'test_runner_formula.rb', line 67
-
-def versioned_macos_requirement
-  formula.requirements.find { |r| r.is_a?(MacOSRequirement) && r.version_specified? }
-end
-
-
- -
-

- - #x86_64_compatible?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-52
-53
-54
-
-
# File 'test_runner_formula.rb', line 52
-
-def x86_64_compatible?
-  !arm64_only?
-end
-
-
- -
-

- - #x86_64_only?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'test_runner_formula.rb', line 47
-
-def x86_64_only?
-  formula.requirements.any? { |r| r.is_a?(ArchRequirement) && (r.arch == :x86_64) }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Time.html b/docs/Time.html deleted file mode 100644 index 9a5687571..000000000 --- a/docs/Time.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - Class: Time - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Time - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/blank.rb,
- extend/time.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

:nodoc:

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #blank?false - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

No Time is blank:

- -
Time.now.blank? # => false
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (false) - - - -
  • - -
- -
- - - - -
-
-
-
-195
-
-
# File 'extend/blank.rb', line 195
-
-def blank? = false
-
-
- -
-

- - #present?true - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (true) - - - -
  • - -
- -
- - - - -
-
-
-
-198
-
-
# File 'extend/blank.rb', line 198
-
-def present? = true
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/TrueClass.html b/docs/TrueClass.html deleted file mode 100644 index 69b3598a7..000000000 --- a/docs/TrueClass.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - Class: TrueClass - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: TrueClass - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/blank.rb
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #blank?false - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

true is not blank:

- -
true.blank? # => false
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (false) - - - -
  • - -
- -
- - - - -
-
-
-
-85
-
-
# File 'extend/blank.rb', line 85
-
-def blank? = false
-
-
- -
-

- - #present?true - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (true) - - - -
  • - -
- -
- - - - -
-
-
-
-88
-
-
# File 'extend/blank.rb', line 88
-
-def present? = true # :nodoc:
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Tty.html b/docs/Tty.html deleted file mode 100644 index 00217fb89..000000000 --- a/docs/Tty.html +++ /dev/null @@ -1,2258 +0,0 @@ - - - - - - - Module: Tty - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Tty - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/tty.rb,
- sorbet/rbi/dsl/tty.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Various helper functions for interacting with TTYs.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
COLOR_CODES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  red:     31,
-  green:   32,
-  yellow:  33,
-  blue:    34,
-  magenta: 35,
-  cyan:    36,
-  default: 39,
-}.freeze
- -
STYLE_CODES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  reset:         0,
-  bold:          1,
-  italic:        3,
-  underline:     4,
-  strikethrough: 9,
-  no_underline:  24,
-}.freeze
- -
SPECIAL_CODES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  up:         "1A",
-  down:       "1B",
-  right:      "1C",
-  left:       "1D",
-  erase_line: "K",
-  erase_char: "P",
-}.freeze
- -
CODES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
COLOR_CODES.merge(STYLE_CODES).freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .blueString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 11
-
-def blue; end
-
-
- -
-

- - .boldString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 14
-
-def bold; end
-
-
- -
-

- - .color?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-111
-112
-113
-114
-115
-116
-
-
# File 'utils/tty.rb', line 111
-
-def color?
-  return false if Homebrew::EnvConfig.no_color?
-  return true if Homebrew::EnvConfig.color?
-
-  @stream.tty?
-end
-
-
- -
-

- - .current_escape_sequenceString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-
-
# File 'utils/tty.rb', line 72
-
-def current_escape_sequence
-  return "" if @escape_sequence.nil?
-
-  "\033[#{@escape_sequence.join(";")}m"
-end
-
-
- -
-

- - .cyanString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 17
-
-def cyan; end
-
-
- -
-

- - .defaultString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 20
-
-def default; end
-
-
- -
-

- - .downString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 23
-
-def down; end
-
-
- -
-

- - .erase_charString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 26
-
-def erase_char; end
-
-
- -
-

- - .erase_lineString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 29
-
-def erase_line; end
-
-
- -
-

- - .greenString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 32
-
-def green; end
-
-
- -
-

- - .italicString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 35
-
-def italic; end
-
-
- -
-

- - .leftString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 38
-
-def left; end
-
-
- -
-

- - .magentaString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-41
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 41
-
-def magenta; end
-
-
- -
-

- - .no_underlineString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-44
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 44
-
-def no_underline; end
-
-
- -
-

- - .redString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 47
-
-def red; end
-
-
- -
-

- - .resetString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 50
-
-def reset; end
-
-
- -
-

- - .reset_escape_sequence!void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-79
-80
-81
-
-
# File 'utils/tty.rb', line 79
-
-def reset_escape_sequence!
-  @escape_sequence = nil
-end
-
-
- -
-

- - .rightString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 53
-
-def right; end
-
-
- -
-

- - .strikethroughString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-56
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 56
-
-def strikethrough; end
-
-
- -
-

- - .strip_ansi(string) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - string - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-52
-53
-54
-
-
# File 'utils/tty.rb', line 52
-
-def strip_ansi(string)
-  string.gsub(/\033\[\d+(;\d+)*m/, "")
-end
-
-
- -
-

- - .truncate(string) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - string - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'utils/tty.rb', line 67
-
-def truncate(string)
-  (w = width).zero? ? string.to_s : (string.to_s[0, w - 4] || "")
-end
-
-
- -
-

- - .underlineString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 59
-
-def underline; end
-
-
- -
-

- - .upString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-62
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 62
-
-def up; end
-
-
- -
-

- - .widthInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'utils/tty.rb', line 57
-
-def width
-  @width ||= begin
-    _, width = `/bin/stty size 2>/dev/null`.split
-    width, = `/usr/bin/tput cols 2>/dev/null`.split if width.to_i.zero?
-    width ||= 80
-    width.to_i
-  end
-end
-
-
- -
-

- - .with(stream, &_block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - stream - - - (IO, StringIO) - - - -
  • - -
  • - - _block - - - (T.proc.params(arg0: T.any(IO, StringIO)).void) - - - -
  • - -
- - -
- - - - -
-
-
-
-42
-43
-44
-45
-46
-47
-48
-49
-
-
# File 'utils/tty.rb', line 42
-
-def with(stream, &_block)
-  previous_stream = @stream
-  @stream = stream
-
-  yield stream
-ensure
-  @stream = previous_stream
-end
-
-
- -
-

- - .yellowString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-65
-
-
# File 'sorbet/rbi/dsl/tty.rbi', line 65
-
-def yellow; end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/URL.html b/docs/URL.html deleted file mode 100644 index 70546e34d..000000000 --- a/docs/URL.html +++ /dev/null @@ -1,555 +0,0 @@ - - - - - - - Class: URL - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: URL - - - -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
url.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #specs ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute specs.

    -
    - -
  • - - - -
  • - - - #using ⇒ Object - - - - - - - - readonly - - - - - - - private - -

    Returns the value of attribute using.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(url, specs = {}) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - -
  • - -
  • - - specs - - - (Hash{Symbol => T.untyped}) - - - (defaults to: {}) - - -
  • - -
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-
-
# File 'url.rb', line 11
-
-def initialize(url, specs = {})
-  @url = url.freeze
-  @specs = specs.dup
-  @using = @specs.delete(:using)
-  @specs.freeze
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #specsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute specs.

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'url.rb', line 8
-
-def specs
-  @specs
-end
-
-
- - - -
-

- - #usingObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the value of attribute using.

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'url.rb', line 8
-
-def using
-  @using
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #download_strategyT.class_of(AbstractDownloadStrategy) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'url.rb', line 24
-
-def download_strategy
-  @download_strategy ||= DownloadStrategyDetector.detect(@url, @using)
-end
-
-
- -
-

- - #versionVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'url.rb', line 29
-
-def version
-  @version ||= Version.detect(@url, **@specs)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnbottledError.html b/docs/UnbottledError.html deleted file mode 100644 index ca02ac798..000000000 --- a/docs/UnbottledError.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - Exception: UnbottledError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: UnbottledError - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised if the formula or its dependencies are not bottled and are being -installed in a situation where a bottle is required.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(formulae) ⇒ UnbottledError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of UnbottledError.

- - -
-
-
- - -
- - - - -
-
-
-
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-
-
# File 'exceptions.rb', line 556
-
-def initialize(formulae)
-  msg = +<<~EOS
-    The following #{Utils.pluralize("formula", formulae.count, plural: "e")} cannot be installed from #{Utils.pluralize("bottle", formulae.count)} and must be
-    built from source.
-      #{formulae.to_sentence}
-  EOS
-  msg += "#{DevelopmentTools.installation_instructions}\n" unless DevelopmentTools.installed?
-  msg.freeze
-  super(msg)
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/UnboundMethod.html b/docs/UnboundMethod.html deleted file mode 100644 index 5f15c541c..000000000 --- a/docs/UnboundMethod.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - Class: UnboundMethod - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnboundMethod - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
extend/object/duplicable.rb
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- -
    - - -
  • - - - #duplicable? ⇒ false - - - - - - - - - - private - -

    Unbound methods are not duplicable:.

    -
    - -
  • - - -
- - - - -
-

Instance Method Details

- - -
-

- - #duplicable?false - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Unbound methods are not duplicable:

- -
method(:puts).unbind.duplicable? # => false
-method(:puts).unbind.dup         # => TypeError: allocator undefined for UnboundMethod
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (false) - - - -
  • - -
- -
- - - - -
-
-
-
-56
-
-
# File 'extend/object/duplicable.rb', line 56
-
-def duplicable? = false
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy.html b/docs/UnpackStrategy.html deleted file mode 100644 index c14acd861..000000000 --- a/docs/UnpackStrategy.html +++ /dev/null @@ -1,1216 +0,0 @@ - - - - - - - Module: UnpackStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: UnpackStrategy - - - Private -

-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - -
-
Includes:
-
Kernel, SystemCommand::Mixin
-
- - - - -
-
Included in:
-
Air, Bzip2, Cab, Directory, Dmg, Fossil, GenericUnar, Gzip, Lha, Lzip, Lzma, P7Zip, Pax, Rar, Tar, Uncompressed, Xar, Xz, Zip, Zstd
-
- - - -
-
Defined in:
-
unpack_strategy.rb,
- extend/os/mac/unpack_strategy/zip.rb,
unpack_strategy/xz.rb,
unpack_strategy/air.rb,
unpack_strategy/cab.rb,
unpack_strategy/cvs.rb,
unpack_strategy/dmg.rb,
unpack_strategy/git.rb,
unpack_strategy/jar.rb,
unpack_strategy/lha.rb,
unpack_strategy/otf.rb,
unpack_strategy/pax.rb,
unpack_strategy/pkg.rb,
unpack_strategy/rar.rb,
unpack_strategy/sit.rb,
unpack_strategy/tar.rb,
unpack_strategy/ttf.rb,
unpack_strategy/xar.rb,
unpack_strategy/zip.rb,
unpack_strategy/gzip.rb,
unpack_strategy/lzip.rb,
unpack_strategy/lzma.rb,
unpack_strategy/zstd.rb,
unpack_strategy/bzip2.rb,
unpack_strategy/p7zip.rb,
unpack_strategy/bazaar.rb,
unpack_strategy/fossil.rb,
unpack_strategy/compress.rb,
unpack_strategy/lua_rock.rb,
unpack_strategy/directory.rb,
unpack_strategy/mercurial.rb,
unpack_strategy/executable.rb,
unpack_strategy/subversion.rb,
unpack_strategy/generic_unar.rb,
unpack_strategy/uncompressed.rb,
unpack_strategy/microsoft_office_xml.rb,
unpack_strategy/self_extracting_executable.rb,
unpack_strategy.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Air, Bazaar, Bzip2, Cab, Compress, Cvs, Directory, Dmg, Executable, Fossil, GenericUnar, Git, Gzip, Jar, Lha, LuaRock, Lzip, Lzma, Mercurial, MicrosoftOfficeXml, Otf, P7Zip, Pax, Pkg, Rar, SelfExtractingExecutable, Sit, Subversion, Tar, Ttf, Uncompressed, Xar, Xz, Zip, Zstd - - -

- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- -
-

Instance Attribute Details

- - - -
-

- - #merge_xattrsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-91
-92
-93
-
-
# File 'unpack_strategy.rb', line 91
-
-def merge_xattrs
-  @merge_xattrs
-end
-
-
- - - -
-

- - #pathObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-91
-92
-93
-
-
# File 'unpack_strategy.rb', line 91
-
-def path
-  @path
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .detect(path, prioritize_extension: false, type: nil, ref_type: nil, ref: nil, merge_xattrs: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-
-
# File 'unpack_strategy.rb', line 74
-
-def self.detect(path, prioritize_extension: false, type: nil, ref_type: nil, ref: nil, merge_xattrs: nil)
-  strategy = from_type(type) if type
-
-  if prioritize_extension && path.extname.present?
-    strategy ||= from_extension(path.extname)
-    strategy ||= strategies.select { |s| s < Directory || s == Fossil }
-                           .find { |s| s.can_extract?(path) }
-  else
-    strategy ||= from_magic(path)
-    strategy ||= from_extension(path.extname)
-  end
-
-  strategy ||= Uncompressed
-
-  strategy.new(path, ref_type:, ref:, merge_xattrs:)
-end
-
-
- -
-

- - .from_extension(extension) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-64
-65
-66
-67
-68
-
-
# File 'unpack_strategy.rb', line 64
-
-def self.from_extension(extension)
-  strategies.sort_by { |s| s.extensions.map(&:length).max || 0 }
-            .reverse
-            .find { |s| s.extensions.any? { |ext| extension.end_with?(ext) } }
-end
-
-
- -
-

- - .from_magic(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-70
-71
-72
-
-
# File 'unpack_strategy.rb', line 70
-
-def self.from_magic(path)
-  strategies.find { |s| s.can_extract?(path) }
-end
-
-
- -
-

- - .from_type(type) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-
-
# File 'unpack_strategy.rb', line 50
-
-def self.from_type(type)
-  type = {
-    naked:     :uncompressed,
-    nounzip:   :uncompressed,
-    seven_zip: :p7zip,
-  }.fetch(type, type)
-
-  begin
-    const_get(type.to_s.split("_").map(&:capitalize).join.gsub(/\d+[a-z]/, &:upcase))
-  rescue NameError
-    nil
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-152
-153
-154
-
-
# File 'unpack_strategy.rb', line 152
-
-def dependencies
-  []
-end
-
-
- -
-

- - #each_directory(pathname, &_block) ⇒ Pathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Helper method for iterating over directory trees.

- - -
-
-
-

Parameters:

-
    - -
  • - - pathname - - - (Pathname) - - - -
  • - -
  • - - _block - - - (T.proc.params(path: Pathname).void) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-163
-164
-165
-166
-167
-
-
# File 'unpack_strategy.rb', line 163
-
-def each_directory(pathname, &_block)
-  pathname.find do |path|
-    yield path if path.directory?
-  end
-end
-
-
- -
-

- - #extract(to: nil, basename: nil, verbose: false) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - to - - - (Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - basename - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-110
-111
-112
-113
-114
-115
-
-
# File 'unpack_strategy.rb', line 110
-
-def extract(to: nil, basename: nil, verbose: false)
-  basename ||= path.basename
-  unpack_dir = Pathname(to || Dir.pwd).expand_path
-  unpack_dir.mkpath
-  extract_to_dir(unpack_dir, basename: Pathname(basename), verbose:)
-end
-
-
- -
-

- - #extract_nestedly(to: nil, basename: nil, verbose: false, prioritize_extension: false) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - to - - - (Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - basename - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - prioritize_extension - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-
-
# File 'unpack_strategy.rb', line 125
-
-def extract_nestedly(to: nil, basename: nil, verbose: false, prioritize_extension: false)
-  Dir.mktmpdir("homebrew-unpack", HOMEBREW_TEMP) do |tmp_unpack_dir|
-    tmp_unpack_dir = Pathname(tmp_unpack_dir)
-
-    extract(to: tmp_unpack_dir, basename:, verbose:)
-
-    children = tmp_unpack_dir.children
-
-    if children.size == 1 && !children.fetch(0).directory?
-      s = UnpackStrategy.detect(children.first, prioritize_extension:)
-
-      s.extract_nestedly(to:, verbose:, prioritize_extension:)
-
-      next
-    end
-
-    # Ensure all extracted directories are writable.
-    each_directory(tmp_unpack_dir) do |path|
-      next if path.writable?
-
-      FileUtils.chmod "u+w", path, verbose:
-    end
-
-    Directory.new(tmp_unpack_dir).extract(to:, verbose:)
-  end
-end
-
-
- -
-

- - #initialize(path, ref_type: nil, ref: nil, merge_xattrs: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-93
-94
-95
-96
-97
-98
-
-
# File 'unpack_strategy.rb', line 93
-
-def initialize(path, ref_type: nil, ref: nil, merge_xattrs: nil)
-  @path = Pathname(path).expand_path
-  @ref_type = ref_type
-  @ref = ref
-  @merge_xattrs = merge_xattrs
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Air.html b/docs/UnpackStrategy/Air.html deleted file mode 100644 index 3644904d1..000000000 --- a/docs/UnpackStrategy/Air.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - Class: UnpackStrategy::Air - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Air - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/air.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Adobe Air archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-
-
# File 'unpack_strategy/air.rb', line 14
-
-def self.can_extract?(path)
-  mime_type = "application/vnd.adobe.air-application-installer-package+zip"
-  path.magic_number.match?(/.{59}#{Regexp.escape(mime_type)}/)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/air.rb', line 10
-
-def self.extensions
-  [".air"]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'unpack_strategy/air.rb', line 19
-
-def dependencies
-  @dependencies ||= [Cask::CaskLoader.load("adobe-air")]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Bazaar.html b/docs/UnpackStrategy/Bazaar.html deleted file mode 100644 index 9babeaebc..000000000 --- a/docs/UnpackStrategy/Bazaar.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - Class: UnpackStrategy::Bazaar - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Bazaar - - - Private -

-
- -
-
Inherits:
-
- Directory - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/bazaar.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Bazaar archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Directory

-

extensions

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'unpack_strategy/bazaar.rb', line 9
-
-def self.can_extract?(path)
-  super && (path/".bzr").directory?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Bzip2.html b/docs/UnpackStrategy/Bzip2.html deleted file mode 100644 index 5e8bc1521..000000000 --- a/docs/UnpackStrategy/Bzip2.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: UnpackStrategy::Bzip2 - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Bzip2 - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/bzip2.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking bzip2 archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/bzip2.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\ABZh/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/bzip2.rb', line 10
-
-def self.extensions
-  [".bz2"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Cab.html b/docs/UnpackStrategy/Cab.html deleted file mode 100644 index 0199a3eee..000000000 --- a/docs/UnpackStrategy/Cab.html +++ /dev/null @@ -1,552 +0,0 @@ - - - - - - - Class: UnpackStrategy::Cab - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Cab - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/cab.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Cabinet archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/cab.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\AMSCF/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/cab.rb', line 10
-
-def self.extensions
-  [".cab"]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'unpack_strategy/cab.rb', line 26
-
-def dependencies
-  @dependencies ||= [Formula["cabextract"]]
-end
-
-
- -
-

- - #extract_to_dir(unpack_dir, basename:, verbose:) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - unpack_dir - - - (Pathname) - - - -
  • - -
  • - - basename - - - (Pathname) - - - -
  • - -
  • - - verbose - - - (Boolean) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-
-
# File 'unpack_strategy/cab.rb', line 19
-
-def extract_to_dir(unpack_dir, basename:, verbose:)
-  system_command! "cabextract",
-                  args:    ["-d", unpack_dir, "--", path],
-                  env:     { "PATH" => PATH.new(Formula["cabextract"].opt_bin, ENV.fetch("PATH")) },
-                  verbose:
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Compress.html b/docs/UnpackStrategy/Compress.html deleted file mode 100644 index 45423426c..000000000 --- a/docs/UnpackStrategy/Compress.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - Class: UnpackStrategy::Compress - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Compress - - - Private -

-
- -
-
Inherits:
-
- Tar - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/compress.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking compress archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/compress.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\A\037\235/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/compress.rb', line 10
-
-def self.extensions
-  [".Z"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Cvs.html b/docs/UnpackStrategy/Cvs.html deleted file mode 100644 index 120e38113..000000000 --- a/docs/UnpackStrategy/Cvs.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - Class: UnpackStrategy::Cvs - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Cvs - - - Private -

-
- -
-
Inherits:
-
- Directory - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/cvs.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking CVS repositories.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Directory

-

extensions

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'unpack_strategy/cvs.rb', line 9
-
-def self.can_extract?(path)
-  super && (path/"CVS").directory?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Directory.html b/docs/UnpackStrategy/Directory.html deleted file mode 100644 index 037cb5acb..000000000 --- a/docs/UnpackStrategy/Directory.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - - Class: UnpackStrategy::Directory - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Directory - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/directory.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking directories.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Bazaar, Cvs, Git, Mercurial, Subversion

-
- - - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/directory.rb', line 14
-
-def self.can_extract?(path)
-  path.directory?
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/directory.rb', line 10
-
-def self.extensions
-  []
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Dmg.html b/docs/UnpackStrategy/Dmg.html deleted file mode 100644 index c30da9226..000000000 --- a/docs/UnpackStrategy/Dmg.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - Class: UnpackStrategy::Dmg - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Dmg - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/dmg.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking disk images.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: Bom - - - - -

- - - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-173
-174
-175
-176
-
-
# File 'unpack_strategy/dmg.rb', line 173
-
-def self.can_extract?(path)
-  stdout, _, status = system_command("hdiutil", args: ["imageinfo", "-format", path], print_stderr: false)
-  status.success? && !stdout.empty?
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-169
-170
-171
-
-
# File 'unpack_strategy/dmg.rb', line 169
-
-def self.extensions
-  [".dmg"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Dmg/Bom.html b/docs/UnpackStrategy/Dmg/Bom.html deleted file mode 100644 index 092e56df9..000000000 --- a/docs/UnpackStrategy/Dmg/Bom.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - - Module: UnpackStrategy::Dmg::Bom - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: UnpackStrategy::Dmg::Bom - - - Private -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
unpack_strategy/dmg.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for listing the contents of a volume mounted from a disk image.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: EmptyError, Error - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .bom(pathname) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - pathname - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-
-
# File 'unpack_strategy/dmg.rb', line 53
-
-def self.bom(pathname)
-  tries = 0
-  result = loop do
-    # We need to use `find` here instead of Ruby in order to properly handle
-    # file names containing special characters, such as “e” + “´” vs. “é”.
-    r = system_command("find", args: [".", "-print0"], chdir: pathname, print_stderr: false)
-    tries += 1
-
-    # Spurious bug on CI, which in most cases can be worked around by retrying.
-    break r unless r.stderr.match?(/Interrupted system call/i)
-
-    raise "Command `#{r.command.shelljoin}` was interrupted." if tries >= 3
-  end
-
-  odebug "Command `#{result.command.shelljoin}` in '#{pathname}' took #{tries} tries." if tries > 1
-
-  bom_paths = result.stdout.split("\0")
-
-  raise EmptyError, pathname if bom_paths.empty?
-
-  bom_paths
-    .reject { |path| dmg_metadata?(Pathname(path)) }
-    .reject { |path| system_dir_symlink?(pathname/path) }
-    .join("\n")
-end
-
-
- -
-

- - .dmg_metadata?(pathname) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if path is considered disk image metadata.

- - -
-
-
-

Parameters:

-
    - -
  • - - pathname - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'unpack_strategy/dmg.rb', line 42
-
-def self.dmg_metadata?(pathname)
-  DMG_METADATA.include?(pathname.cleanpath.ascend.to_a.last.to_s)
-end
-
-
- -
-

- - .system_dir_symlink?(pathname) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if path is a symlink to a system directory (commonly to /Applications).

- - -
-
-
-

Parameters:

-
    - -
  • - - pathname - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'unpack_strategy/dmg.rb', line 48
-
-def self.system_dir_symlink?(pathname)
-  pathname.symlink? && MacOS.system_dir?(pathname.dirname.join(pathname.readlink))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Dmg/Bom/EmptyError.html b/docs/UnpackStrategy/Dmg/Bom/EmptyError.html deleted file mode 100644 index 10c7423cd..000000000 --- a/docs/UnpackStrategy/Dmg/Bom/EmptyError.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - Exception: UnpackStrategy::Dmg::Bom::EmptyError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: UnpackStrategy::Dmg::Bom::EmptyError - - - Private -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/dmg.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(path) ⇒ EmptyError - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of EmptyError.

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'unpack_strategy/dmg.rb', line 35
-
-def initialize(path)
-  super "BOM for path '#{path}' is empty."
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Dmg/Bom/Error.html b/docs/UnpackStrategy/Dmg/Bom/Error.html deleted file mode 100644 index bb9b9288d..000000000 --- a/docs/UnpackStrategy/Dmg/Bom/Error.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - Exception: UnpackStrategy::Dmg::Bom::Error - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: UnpackStrategy::Dmg::Bom::Error - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/dmg.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-

Direct Known Subclasses

-

EmptyError

-
- - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Executable.html b/docs/UnpackStrategy/Executable.html deleted file mode 100644 index bd96c1cf0..000000000 --- a/docs/UnpackStrategy/Executable.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - Class: UnpackStrategy::Executable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Executable - - - Private -

-
- -
-
Inherits:
-
- Uncompressed - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/executable.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking executables.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Uncompressed

-

#extract_nestedly

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-
-
# File 'unpack_strategy/executable.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\A#!\s*\S+/n) ||
-    path.magic_number.match?(/\AMZ/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/executable.rb', line 10
-
-def self.extensions
-  [".sh", ".bash"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Fossil.html b/docs/UnpackStrategy/Fossil.html deleted file mode 100644 index 90f095a35..000000000 --- a/docs/UnpackStrategy/Fossil.html +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - Class: UnpackStrategy::Fossil - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Fossil - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/fossil.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Fossil repositories.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-
-
# File 'unpack_strategy/fossil.rb', line 17
-
-def self.can_extract?(path)
-  return false unless path.magic_number.match?(/\ASQLite format 3\000/n)
-
-  # Fossil database is made up of artifacts, so the `artifact` table must exist.
-  query = "select count(*) from sqlite_master where type = 'view' and name = 'artifact'"
-  system_command("sqlite3", args: [path, query]).stdout.to_i == 1
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'unpack_strategy/fossil.rb', line 13
-
-def self.extensions
-  []
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/GenericUnar.html b/docs/UnpackStrategy/GenericUnar.html deleted file mode 100644 index fa48bba04..000000000 --- a/docs/UnpackStrategy/GenericUnar.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - Class: UnpackStrategy::GenericUnar - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::GenericUnar - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/generic_unar.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking archives with unar.

- - -
-
-
- - -
-

Direct Known Subclasses

-

SelfExtractingExecutable, Sit

-
- - - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(_path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/generic_unar.rb', line 14
-
-def self.can_extract?(_path)
-  false
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/generic_unar.rb', line 10
-
-def self.extensions
-  []
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'unpack_strategy/generic_unar.rb', line 18
-
-def dependencies
-  @dependencies ||= [Formula["unar"]]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Git.html b/docs/UnpackStrategy/Git.html deleted file mode 100644 index fd20f2157..000000000 --- a/docs/UnpackStrategy/Git.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - Class: UnpackStrategy::Git - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Git - - - Private -

-
- -
-
Inherits:
-
- Directory - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/git.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Git repositories.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Directory

-

extensions

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'unpack_strategy/git.rb', line 9
-
-def self.can_extract?(path)
-  super && (path/".git").directory?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Gzip.html b/docs/UnpackStrategy/Gzip.html deleted file mode 100644 index 58c3dadfb..000000000 --- a/docs/UnpackStrategy/Gzip.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: UnpackStrategy::Gzip - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Gzip - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/gzip.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking gzip archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/gzip.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\A\037\213/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/gzip.rb', line 10
-
-def self.extensions
-  [".gz"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Jar.html b/docs/UnpackStrategy/Jar.html deleted file mode 100644 index 040a81a39..000000000 --- a/docs/UnpackStrategy/Jar.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - Class: UnpackStrategy::Jar - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Jar - - - Private -

-
- -
-
Inherits:
-
- Uncompressed - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/jar.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Java archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Uncompressed

-

#extract_nestedly

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-
-
# File 'unpack_strategy/jar.rb', line 14
-
-def self.can_extract?(path)
-  return false unless Zip.can_extract?(path)
-
-  # Check further if the ZIP is a JAR/WAR.
-  path.zipinfo.include?("META-INF/MANIFEST.MF")
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/jar.rb', line 10
-
-def self.extensions
-  [".apk", ".jar"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Lha.html b/docs/UnpackStrategy/Lha.html deleted file mode 100644 index 1f5011e1e..000000000 --- a/docs/UnpackStrategy/Lha.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - Class: UnpackStrategy::Lha - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Lha - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/lha.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking LHa archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/lha.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\A..-(lh0|lh1|lz4|lz5|lzs|lh\\40|lhd|lh2|lh3|lh4|lh5)-/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/lha.rb', line 10
-
-def self.extensions
-  [".lha", ".lzh"]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'unpack_strategy/lha.rb', line 18
-
-def dependencies
-  @dependencies ||= [Formula["lha"]]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/LuaRock.html b/docs/UnpackStrategy/LuaRock.html deleted file mode 100644 index 1c9288d54..000000000 --- a/docs/UnpackStrategy/LuaRock.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - Class: UnpackStrategy::LuaRock - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::LuaRock - - - Private -

-
- -
-
Inherits:
-
- Uncompressed - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/lua_rock.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking LuaRock archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Uncompressed

-

#extract_nestedly

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-
-
# File 'unpack_strategy/lua_rock.rb', line 14
-
-def self.can_extract?(path)
-  return false unless Zip.can_extract?(path)
-
-  # Check further if the ZIP is a LuaRocks package.
-  path.zipinfo.grep(%r{\A[^/]+.rockspec\Z}).any?
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/lua_rock.rb', line 10
-
-def self.extensions
-  [".rock"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Lzip.html b/docs/UnpackStrategy/Lzip.html deleted file mode 100644 index ec69ff167..000000000 --- a/docs/UnpackStrategy/Lzip.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - Class: UnpackStrategy::Lzip - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Lzip - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/lzip.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking lzip archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/lzip.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\ALZIP/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/lzip.rb', line 10
-
-def self.extensions
-  [".lz"]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'unpack_strategy/lzip.rb', line 18
-
-def dependencies
-  @dependencies ||= [Formula["lzip"]]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Lzma.html b/docs/UnpackStrategy/Lzma.html deleted file mode 100644 index d42af9a45..000000000 --- a/docs/UnpackStrategy/Lzma.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - Class: UnpackStrategy::Lzma - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Lzma - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/lzma.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking LZMA archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/lzma.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\A\]\000\000\200\000/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/lzma.rb', line 10
-
-def self.extensions
-  [".lzma"]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'unpack_strategy/lzma.rb', line 18
-
-def dependencies
-  @dependencies ||= [Formula["xz"]]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Mercurial.html b/docs/UnpackStrategy/Mercurial.html deleted file mode 100644 index 131b1a087..000000000 --- a/docs/UnpackStrategy/Mercurial.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - Class: UnpackStrategy::Mercurial - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Mercurial - - - Private -

-
- -
-
Inherits:
-
- Directory - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/mercurial.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Mercurial repositories.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Directory

-

extensions

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'unpack_strategy/mercurial.rb', line 9
-
-def self.can_extract?(path)
-  super && (path/".hg").directory?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/MicrosoftOfficeXml.html b/docs/UnpackStrategy/MicrosoftOfficeXml.html deleted file mode 100644 index 1ec0dbaf9..000000000 --- a/docs/UnpackStrategy/MicrosoftOfficeXml.html +++ /dev/null @@ -1,375 +0,0 @@ - - - - - - - Class: UnpackStrategy::MicrosoftOfficeXml - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::MicrosoftOfficeXml - - - Private -

-
- -
-
Inherits:
-
- Uncompressed - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/microsoft_office_xml.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Microsoft Office documents.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Uncompressed

-

#extract_nestedly

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'unpack_strategy/microsoft_office_xml.rb', line 18
-
-def self.can_extract?(path)
-  return false unless Zip.can_extract?(path)
-
-  # Check further if the ZIP is a Microsoft Office XML document.
-  path.magic_number.match?(/\APK\003\004/n) &&
-    path.magic_number.match?(%r{\A.{30}(\[Content_Types\]\.xml|_rels/\.rels)}n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-
-
# File 'unpack_strategy/microsoft_office_xml.rb', line 10
-
-def self.extensions
-  [
-    ".doc", ".docx",
-    ".ppt", ".pptx",
-    ".xls", ".xlsx"
-  ]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Otf.html b/docs/UnpackStrategy/Otf.html deleted file mode 100644 index 4c952a26f..000000000 --- a/docs/UnpackStrategy/Otf.html +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - - Class: UnpackStrategy::Otf - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Otf - - - Private -

-
- -
-
Inherits:
-
- Uncompressed - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/otf.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking OpenType fonts.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Uncompressed

-

#extract_nestedly

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/otf.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\AOTTO/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/otf.rb', line 10
-
-def self.extensions
-  [".otf"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/P7Zip.html b/docs/UnpackStrategy/P7Zip.html deleted file mode 100644 index 233a36667..000000000 --- a/docs/UnpackStrategy/P7Zip.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - Class: UnpackStrategy::P7Zip - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::P7Zip - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/p7zip.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking P7ZIP archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/p7zip.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\A7z\xBC\xAF\x27\x1C/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/p7zip.rb', line 10
-
-def self.extensions
-  [".7z"]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'unpack_strategy/p7zip.rb', line 18
-
-def dependencies
-  @dependencies ||= [Formula["p7zip"]]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Pax.html b/docs/UnpackStrategy/Pax.html deleted file mode 100644 index b2c1fa8e3..000000000 --- a/docs/UnpackStrategy/Pax.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: UnpackStrategy::Pax - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Pax - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/pax.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking pax archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(_path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/pax.rb', line 14
-
-def self.can_extract?(_path)
-  false
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/pax.rb', line 10
-
-def self.extensions
-  [".pax"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Pkg.html b/docs/UnpackStrategy/Pkg.html deleted file mode 100644 index dcec97874..000000000 --- a/docs/UnpackStrategy/Pkg.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - Class: UnpackStrategy::Pkg - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Pkg - - - Private -

-
- -
-
Inherits:
-
- Uncompressed - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/pkg.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking macOS package installers.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Uncompressed

-

#extract_nestedly

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-
-
# File 'unpack_strategy/pkg.rb', line 14
-
-def self.can_extract?(path)
-  path.extname.match?(/\A.m?pkg\Z/) &&
-    (path.directory? || path.magic_number.match?(/\Axar!/n))
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/pkg.rb', line 10
-
-def self.extensions
-  [".pkg", ".mkpg"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Rar.html b/docs/UnpackStrategy/Rar.html deleted file mode 100644 index d04954a37..000000000 --- a/docs/UnpackStrategy/Rar.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - Class: UnpackStrategy::Rar - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Rar - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/rar.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking RAR archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/rar.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\ARar!/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/rar.rb', line 10
-
-def self.extensions
-  [".rar"]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'unpack_strategy/rar.rb', line 18
-
-def dependencies
-  @dependencies ||= [Formula["libarchive"]]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/SelfExtractingExecutable.html b/docs/UnpackStrategy/SelfExtractingExecutable.html deleted file mode 100644 index 79ba16034..000000000 --- a/docs/UnpackStrategy/SelfExtractingExecutable.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - Class: UnpackStrategy::SelfExtractingExecutable - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::SelfExtractingExecutable - - - Private -

-
- -
-
Inherits:
-
- GenericUnar - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/self_extracting_executable.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking self-extracting executables.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from GenericUnar

-

#dependencies

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-
-
# File 'unpack_strategy/self_extracting_executable.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\AMZ/n) &&
-    path.file_type.include?("self-extracting archive")
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/self_extracting_executable.rb', line 10
-
-def self.extensions
-  []
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Sit.html b/docs/UnpackStrategy/Sit.html deleted file mode 100644 index 468784702..000000000 --- a/docs/UnpackStrategy/Sit.html +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - - Class: UnpackStrategy::Sit - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Sit - - - Private -

-
- -
-
Inherits:
-
- GenericUnar - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/sit.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Stuffit archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from GenericUnar

-

#dependencies

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/sit.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\AStuffIt/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/sit.rb', line 10
-
-def self.extensions
-  [".sit"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Subversion.html b/docs/UnpackStrategy/Subversion.html deleted file mode 100644 index bfe24c9bd..000000000 --- a/docs/UnpackStrategy/Subversion.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - Class: UnpackStrategy::Subversion - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Subversion - - - Private -

-
- -
-
Inherits:
-
- Directory - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/subversion.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking Subversion repositories.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Directory

-

extensions

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'unpack_strategy/subversion.rb', line 9
-
-def self.can_extract?(path)
-  super && (path/".svn").directory?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Tar.html b/docs/UnpackStrategy/Tar.html deleted file mode 100644 index aab17e0f2..000000000 --- a/docs/UnpackStrategy/Tar.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - Class: UnpackStrategy::Tar - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Tar - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/tar.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking tar archives.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Compress

-
- - - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'unpack_strategy/tar.rb', line 25
-
-def self.can_extract?(path)
-  return true if path.magic_number.match?(/\A.{257}ustar/n)
-
-  return false unless [Bzip2, Gzip, Lzip, Xz, Zstd].any? { |s| s.can_extract?(path) }
-
-  # Check if `tar` can list the contents, then it can also extract it.
-  stdout, _, status = system_command("tar", args: ["--list", "--file", path], print_stderr: false)
-  status.success? && !stdout.empty?
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-
-
# File 'unpack_strategy/tar.rb', line 13
-
-def self.extensions
-  [
-    ".tar",
-    ".tbz", ".tbz2", ".tar.bz2",
-    ".tgz", ".tar.gz",
-    ".tlzma", ".tar.lzma",
-    ".txz", ".tar.xz",
-    ".tar.zst",
-    ".crate"
-  ]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Ttf.html b/docs/UnpackStrategy/Ttf.html deleted file mode 100644 index 843545d7d..000000000 --- a/docs/UnpackStrategy/Ttf.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - Class: UnpackStrategy::Ttf - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Ttf - - - Private -

-
- -
-
Inherits:
-
- Uncompressed - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
unpack_strategy/ttf.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking TrueType fonts.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Uncompressed

-

#extract_nestedly

- - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-
-
# File 'unpack_strategy/ttf.rb', line 14
-
-def self.can_extract?(path)
-  # TrueType Font
-  path.magic_number.match?(/\A\000\001\000\000\000/n) ||
-    # Truetype Font Collection
-    path.magic_number.match?(/\Attcf/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/ttf.rb', line 10
-
-def self.extensions
-  [".ttc", ".ttf"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Uncompressed.html b/docs/UnpackStrategy/Uncompressed.html deleted file mode 100644 index 505d6dd92..000000000 --- a/docs/UnpackStrategy/Uncompressed.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - Class: UnpackStrategy::Uncompressed - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Uncompressed - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/uncompressed.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking uncompressed files.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Executable, Jar, LuaRock, MicrosoftOfficeXml, Otf, Pkg, Ttf

-
- - - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Instance Method Details

- - -
-

- - #extract_nestedly(to: nil, basename: nil, verbose: false, prioritize_extension: false) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - to - - - (Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - basename - - - (String, Pathname, nil) - - - (defaults to: nil) - - -
  • - -
  • - - verbose - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - prioritize_extension - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'unpack_strategy/uncompressed.rb', line 17
-
-def extract_nestedly(to: nil, basename: nil, verbose: false, prioritize_extension: false)
-  extract(to:, basename:, verbose:)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Xar.html b/docs/UnpackStrategy/Xar.html deleted file mode 100644 index da0680eaf..000000000 --- a/docs/UnpackStrategy/Xar.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: UnpackStrategy::Xar - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Xar - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/xar.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking xar archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/xar.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\Axar!/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/xar.rb', line 10
-
-def self.extensions
-  [".xar"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Xz.html b/docs/UnpackStrategy/Xz.html deleted file mode 100644 index 6ff9862af..000000000 --- a/docs/UnpackStrategy/Xz.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - Class: UnpackStrategy::Xz - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Xz - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/xz.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking xz archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/xz.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\A\xFD7zXZ\x00/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/xz.rb', line 10
-
-def self.extensions
-  [".xz"]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'unpack_strategy/xz.rb', line 18
-
-def dependencies
-  @dependencies ||= [Formula["xz"]]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Zip.html b/docs/UnpackStrategy/Zip.html deleted file mode 100644 index e4eca0049..000000000 --- a/docs/UnpackStrategy/Zip.html +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - Class: UnpackStrategy::Zip - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Zip - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/zip.rb,
- extend/os/mac/unpack_strategy/zip.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking ZIP archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

#dependencies, detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'unpack_strategy/zip.rb', line 15
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\APK(\003\004|\005\006)/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/zip.rb', line 10
-
-def self.extensions
-  [".zip"]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnpackStrategy/Zstd.html b/docs/UnpackStrategy/Zstd.html deleted file mode 100644 index 820ef7120..000000000 --- a/docs/UnpackStrategy/Zstd.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - Class: UnpackStrategy::Zstd - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UnpackStrategy::Zstd - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
UnpackStrategy
-
- - - - - - -
-
Defined in:
-
unpack_strategy/zstd.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Strategy for unpacking zstd archives.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary

- -

Attributes included from UnpackStrategy

-

#merge_xattrs, #path

- - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from UnpackStrategy

-

detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

- - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - -
-

Class Method Details

- - -
-

- - .can_extract?(path) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'unpack_strategy/zstd.rb', line 14
-
-def self.can_extract?(path)
-  path.magic_number.match?(/\x28\xB5\x2F\xFD/n)
-end
-
-
- -
-

- - .extensionsArray<String> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'unpack_strategy/zstd.rb', line 10
-
-def self.extensions
-  [".zst"]
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #dependenciesObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'unpack_strategy/zstd.rb', line 18
-
-def dependencies
-  @dependencies ||= [Formula["zstd"]]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UnsatisfiedRequirements.html b/docs/UnsatisfiedRequirements.html deleted file mode 100644 index 392da9ad7..000000000 --- a/docs/UnsatisfiedRequirements.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - Exception: UnsatisfiedRequirements - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: UnsatisfiedRequirements - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when there are unsatisfied requirements.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(reqs) ⇒ UnsatisfiedRequirements - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of UnsatisfiedRequirements.

- - -
-
-
- - -
- - - - -
-
-
-
-387
-388
-389
-390
-391
-392
-393
-
-
# File 'exceptions.rb', line 387
-
-def initialize(reqs)
-  if reqs.length == 1
-    super "An unsatisfied requirement failed this build."
-  else
-    super "Unsatisfied requirements failed this build."
-  end
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/UnsupportedInstallationMethod.html b/docs/UnsupportedInstallationMethod.html deleted file mode 100644 index 3d8adb680..000000000 --- a/docs/UnsupportedInstallationMethod.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - Exception: UnsupportedInstallationMethod - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: UnsupportedInstallationMethod - - - -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- - - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/UsageError.html b/docs/UsageError.html deleted file mode 100644 index 9f4d773fe..000000000 --- a/docs/UsageError.html +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - Exception: UsageError - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: UsageError - - - -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
exceptions.rb
-
- -
- -

Overview

-
-

- This class is part of an internal API. - This class may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Raised when a command is used wrong.

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(reason = nil) ⇒ UsageError - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of UsageError.

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-
-
# File 'exceptions.rb', line 13
-
-def initialize(reason = nil)
-  super
-
-  @reason = reason
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #reasonObject (readonly) - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'exceptions.rb', line 11
-
-def reason
-  @reason
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/User.html b/docs/User.html deleted file mode 100644 index 6a3988dba..000000000 --- a/docs/User.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - Class: User - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: User - - - Private -

-
- -
-
Inherits:
-
- SimpleDelegator - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
SystemCommand::Mixin
-
- - - - - - -
-
Defined in:
-
utils/user.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A system user.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- -
    - - -
  • - - - #gui? ⇒ Boolean - - - - - - - - - - private - -

    Return whether the user has an active GUI session.

    -
    - -
  • - - -
- - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - -
-

Class Method Details

- - -
-

- - .currentT.attached_class? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return the current user.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.attached_class, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'utils/user.rb', line 26
-
-def self.current
-  return @current if defined?(@current)
-
-  pwuid = Etc.getpwuid(Process.euid)
-  return if pwuid.nil?
-
-  @current = new(pwuid.name)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #gui?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return whether the user has an active GUI session.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'utils/user.rb', line 15
-
-def gui?
-  out, _, status = system_command "who"
-  return false unless status.success?
-
-  out.lines
-     .map(&:split)
-     .any? { |user, type,| user == self && type == "console" }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/UsesFromMacOSDependency.html b/docs/UsesFromMacOSDependency.html deleted file mode 100644 index ff4eb05c0..000000000 --- a/docs/UsesFromMacOSDependency.html +++ /dev/null @@ -1,780 +0,0 @@ - - - - - - - Class: UsesFromMacOSDependency - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: UsesFromMacOSDependency - - - Private -

-
- -
-
Inherits:
-
- Dependency - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
dependency.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A dependency that's marked as "installed" on macOS

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Dependable

-

Dependable::RESERVED_TAGS

- - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from Dependency

-

#name, #tap

- - - -

Attributes included from Dependable

-

#tags

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Dependency

-

action, expand, keep_but_prune_recursive_deps, merge_repeats, #missing_options, #option_names, prune, #satisfied?, skip, #to_formula

- - - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Dependable

-

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

-
-

Constructor Details

- -
-

- - #initialize(name, tags = [], bounds:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-243
-244
-245
-246
-247
-
-
# File 'dependency.rb', line 243
-
-def initialize(name, tags = [], bounds:)
-  super(name, tags)
-
-  @bounds = bounds
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #boundsObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-240
-241
-242
-
-
# File 'dependency.rb', line 240
-
-def bounds
-  @bounds
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #dup_with_formula_name(formula) ⇒ T.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-285
-286
-287
-
-
# File 'dependency.rb', line 285
-
-def dup_with_formula_name(formula)
-  self.class.new(formula.full_name.to_s, tags, bounds:)
-end
-
-
- -
-

- - #installed?(minimum_version: nil, minimum_revision: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - minimum_version - - - (Version, nil) - - - (defaults to: nil) - - -
  • - -
  • - - minimum_revision - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-258
-259
-260
-
-
# File 'dependency.rb', line 258
-
-def installed?(minimum_version: nil, minimum_revision: nil)
-  use_macos_install? || super
-end
-
-
- -
-

- - #use_macos_install?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-
-
# File 'dependency.rb', line 263
-
-def use_macos_install?
-  # Check whether macOS is new enough for dependency to not be required.
-  if Homebrew::SimulateSystem.simulating_or_running_on_macos?
-    # Assume the oldest macOS version when simulating a generic macOS version
-    return true if Homebrew::SimulateSystem.current_os == :macos && !bounds.key?(:since)
-
-    if Homebrew::SimulateSystem.current_os != :macos
-      current_os = MacOSVersion.from_symbol(Homebrew::SimulateSystem.current_os)
-      since_os = MacOSVersion.from_symbol(bounds[:since]) if bounds.key?(:since)
-      return true if current_os >= since_os
-    end
-  end
-
-  false
-end
-
-
- -
-

- - #uses_from_macos?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-280
-281
-282
-
-
# File 'dependency.rb', line 280
-
-def uses_from_macos?
-  true
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils.html b/docs/Utils.html deleted file mode 100644 index d4fd89d21..000000000 --- a/docs/Utils.html +++ /dev/null @@ -1,2183 +0,0 @@ - - - - - - - Module: Utils - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
extend/os/mac/utils/bottles.rb,
- utils.rb,
utils/ast.rb,
utils/git.rb,
utils/svn.rb,
utils/tar.rb,
utils/uid.rb,
utils/curl.rb,
utils/fork.rb,
utils/gzip.rb,
utils/link.rb,
utils/path.rb,
utils/popen.rb,
utils/shell.rb,
utils/timer.rb,
utils/bottles.rb,
utils/service.rb,
utils/shebang.rb,
utils/analytics.rb,
utils/backtrace.rb,
utils/inreplace.rb,
utils/autoremove.rb,
utils/git_repository.rb,
utils/topological_hash.rb,
utils/ast.rbi,
utils/shell.rbi,
utils/service.rbi,
utils/shebang.rbi,
sorbet/rbi/parlour.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: AST, Analytics, Backtrace, Bottles, Curl, Git, Gzip, Inreplace, Link, Path, Service, Shebang, Shell, Svn, Tar, Timer, UID - - - - Classes: TopologicalHash - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .deconstantize(path) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Removes the rightmost segment from the constant expression in the string.

- -

deconstantize('Net::HTTP') # => "Net" - deconstantize('::Net::HTTP') # => "::Net" - deconstantize('String') # => "" - deconstantize('::String') # => "" - deconstantize('') # => ""

- -

See also #demodulize.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-103
-104
-105
-
-
# File 'utils.rb', line 103
-
-def self.deconstantize(path)
-  T.must(path[0, path.rindex("::") || 0]) # implementation based on the one in facets' Module#spacename
-end
-
-
- -
-

- - .demodulize(path) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Removes the module part from the expression in the string.

- -

demodulize('ActiveSupport::Inflector::Inflections') # => "Inflections" - demodulize('Inflections') # => "Inflections" - demodulize('::Inflections') # => "Inflections" - demodulize('') # => ""

- -

See also #deconstantize.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-118
-119
-120
-121
-122
-123
-124
-
-
# File 'utils.rb', line 118
-
-def self.demodulize(path)
-  if (i = path.rindex("::"))
-    T.must(path[(i + 2)..])
-  else
-    path
-  end
-end
-
-
- -
-

- - .git_branch(repo = Pathname.pwd, safe: true) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the name of the currently checked-out branch, or HEAD if the repository is in a detached HEAD state.

- - -
-
-
-

Parameters:

-
    - -
  • - - repo - - - (String, Pathname) - - - (defaults to: Pathname.pwd) - - -
  • - -
  • - - safe - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'utils/git_repository.rb', line 38
-
-def self.git_branch(repo = Pathname.pwd, safe: true)
-  GitRepository.new(Pathname(repo)).branch_name(safe:)
-end
-
-
- -
-

- - .git_commit_message(repo = Pathname.pwd, commit: "HEAD", safe: true) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the full commit message of the specified commit, or of the HEAD commit if unspecified.

- - -
-
-
-

Parameters:

-
    - -
  • - - repo - - - (String, Pathname) - - - (defaults to: Pathname.pwd) - - -
  • - -
  • - - commit - - - (String) - - - (defaults to: "HEAD") - - -
  • - -
  • - - safe - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'utils/git_repository.rb', line 50
-
-def self.git_commit_message(repo = Pathname.pwd, commit: "HEAD", safe: true)
-  GitRepository.new(Pathname(repo)).commit_message(commit, safe:)
-end
-
-
- -
-

- - .git_head(repo = Pathname.pwd, length: nil, safe: true) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the full commit hash of the HEAD commit.

- - -
-
-
-

Parameters:

-
    - -
  • - - repo - - - (String, Pathname) - - - (defaults to: Pathname.pwd) - - -
  • - -
  • - - length - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
  • - - safe - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-
-
# File 'utils/git_repository.rb', line 13
-
-def self.git_head(repo = Pathname.pwd, length: nil, safe: true)
-  return git_short_head(repo, length:) if length
-
-  GitRepository.new(Pathname(repo)).head_ref(safe:)
-end
-
-
- -
-

- - .git_short_head(repo = Pathname.pwd, length: nil, safe: true) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets a short commit hash of the HEAD commit.

- - -
-
-
-

Parameters:

-
    - -
  • - - repo - - - (String, Pathname) - - - (defaults to: Pathname.pwd) - - -
  • - -
  • - - length - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
  • - - safe - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'utils/git_repository.rb', line 27
-
-def self.git_short_head(repo = Pathname.pwd, length: nil, safe: true)
-  GitRepository.new(Pathname(repo)).short_head_ref(length:, safe:)
-end
-
-
- -
-

- - .parse_author!(author) ⇒ Hash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - author - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-
-
# File 'utils.rb', line 139
-
-def self.parse_author!(author)
-  match_data = /^(?<name>[^<]+?)[ \t]*<(?<email>[^>]+?)>$/.match(author)
-  if match_data
-    name = match_data[:name]
-    email = match_data[:email]
-  end
-  raise UsageError, "Unable to parse name and email." if name.blank? && email.blank?
-
-  { name: T.must(name), email: T.must(email) }
-end
-
-
- -
-

- - .pluralize(stem, count, plural: "s", singular: "", include_count: false) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

A lightweight alternative to ActiveSupport::Inflector.pluralize: -Combines stem with the singular or plural suffix based on count. -Adds a prefix of the count value if include_count is set to true.

- - -
-
-
-

Parameters:

-
    - -
  • - - stem - - - (String) - - - -
  • - -
  • - - count - - - (Integer) - - - -
  • - -
  • - - plural - - - (String) - - - (defaults to: "s") - - -
  • - -
  • - - singular - - - (String) - - - (defaults to: "") - - -
  • - -
  • - - include_count - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-132
-133
-134
-135
-136
-
-
# File 'utils.rb', line 132
-
-def self.pluralize(stem, count, plural: "s", singular: "", include_count: false)
-  prefix = include_count ? "#{count} " : ""
-  suffix = (count == 1) ? singular : plural
-  "#{prefix}#{stem}#{suffix}"
-end
-
-
- -
-

- - .popen(args, mode, options = {}) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'utils/popen.rb', line 46
-
-def self.popen(args, mode, options = {})
-  IO.popen("-", mode) do |pipe|
-    if pipe
-      return pipe.read unless block_given?
-
-      yield pipe
-    else
-      options[:err] ||= "/dev/null" unless ENV["HOMEBREW_STDERR"]
-      begin
-        exec(*args, options)
-      rescue Errno::ENOENT
-        $stderr.puts "brew: command not found: #{args[0]}" if options[:err] != :close
-        exit! 127
-      rescue SystemCallError
-        $stderr.puts "brew: exec failed: #{args[0]}" if options[:err] != :close
-        exit! 1
-      end
-    end
-  end
-end
-
-
- -
-

- - .popen_read(*args, safe: false, **options, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-
-
# File 'utils/popen.rb', line 8
-
-def self.popen_read(*args, safe: false, **options, &block)
-  output = popen(args, "rb", options, &block)
-  return output if !safe || $CHILD_STATUS.success?
-
-  raise ErrorDuringExecution.new(args, status: $CHILD_STATUS, output: [[:stdout, output]])
-end
-
-
- -
-

- - .popen_write(*args, safe: false, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'utils/popen.rb', line 19
-
-def self.popen_write(*args, safe: false, **options)
-  output = ""
-  popen(args, "w+b", options) do |pipe|
-    # Before we yield to the block, capture as much output as we can
-    loop do
-      output += pipe.read_nonblock(IO_DEFAULT_BUFFER_SIZE)
-    rescue IO::WaitReadable, EOFError
-      break
-    end
-
-    yield pipe
-    pipe.close_write
-    pipe.wait_readable
-
-    # Capture the rest of the output
-    output += pipe.read
-    output.freeze
-  end
-  return output if !safe || $CHILD_STATUS.success?
-
-  raise ErrorDuringExecution.new(args, status: $CHILD_STATUS, output: [[:stdout, output]])
-end
-
-
- -
-

- - .rewrite_child_error(child_error) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'utils/fork.rb', line 8
-
-def self.rewrite_child_error(child_error)
-  error = if child_error.inner["cmd"] &&
-             child_error.inner_class == ErrorDuringExecution
-    ErrorDuringExecution.new(child_error.inner["cmd"],
-                             status: child_error.inner["status"],
-                             output: child_error.inner["output"])
-  elsif child_error.inner["cmd"] &&
-        child_error.inner_class == BuildError
-    # We fill `BuildError#formula` and `BuildError#options` in later,
-    # when we rescue this in `FormulaInstaller#build`.
-    BuildError.new(nil, child_error.inner["cmd"],
-                   child_error.inner["args"], child_error.inner["env"])
-  elsif child_error.inner_class == Interrupt
-    Interrupt.new
-  else
-    # Everything other error in the child just becomes a RuntimeError.
-    RuntimeError.new(child_error.message)
-  end
-
-  error.set_backtrace child_error.backtrace
-
-  error
-end
-
-
- -
-

- - .safe_filename(basename) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - basename - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-181
-182
-183
-
-
# File 'utils.rb', line 181
-
-def self.safe_filename(basename)
-  basename.gsub(SAFE_FILENAME_REGEX, "")
-end
-
-
- -
-

- - .safe_filename?(basename) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - basename - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-176
-177
-178
-
-
# File 'utils.rb', line 176
-
-def self.safe_filename?(basename)
-  !SAFE_FILENAME_REGEX.match?(basename)
-end
-
-
- -
-

- - .safe_forkObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-
-
# File 'utils/fork.rb', line 32
-
-def self.safe_fork
-  Dir.mktmpdir("homebrew", HOMEBREW_TEMP) do |tmpdir|
-    UNIXServer.open("#{tmpdir}/socket") do |server|
-      read, write = IO.pipe
-
-      pid = fork do
-        # bootsnap doesn't like these forked processes
-        ENV["HOMEBREW_NO_BOOTSNAP"] = "1"
-        error_pipe = server.path
-        ENV["HOMEBREW_ERROR_PIPE"] = error_pipe
-        server.close
-        read.close
-        write.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
-
-        Process::UID.change_privilege(Process.euid) if Process.euid != Process.uid
-
-        yield(error_pipe)
-      rescue Exception => e # rubocop:disable Lint/RescueException
-        error_hash = JSON.parse e.to_json
-
-        # Special case: We need to recreate ErrorDuringExecutions
-        # for proper error messages and because other code expects
-        # to rescue them further down.
-        if e.is_a?(ErrorDuringExecution)
-          error_hash["cmd"] = e.cmd
-          error_hash["status"] = if e.status.is_a?(Process::Status)
-            {
-              exitstatus: e.status.exitstatus,
-              termsig:    e.status.termsig,
-            }
-          else
-            e.status
-          end
-          error_hash["output"] = e.output
-        end
-
-        write.puts error_hash.to_json
-        write.close
-
-        exit!
-      else
-        exit!(true)
-      end
-
-      ignore_interrupts(:quietly) do # the child will receive the interrupt and marshal it back
-        begin
-          socket = server.accept_nonblock
-        rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR
-          retry unless Process.waitpid(T.must(pid), Process::WNOHANG)
-        else
-          socket.send_io(write)
-          socket.close
-        end
-        write.close
-        data = read.read
-        read.close
-        Process.wait(T.must(pid)) unless socket.nil?
-
-        # 130 is the exit status for a process interrupted via Ctrl-C.
-        # We handle it here because of the possibility of an interrupted process terminating
-        # without writing its Interrupt exception to the error pipe.
-        raise Interrupt if $CHILD_STATUS.exitstatus == 130
-
-        if data.present?
-          error_hash = JSON.parse(T.must(data.lines.first))
-
-          e = ChildProcessError.new(error_hash)
-
-          raise rewrite_child_error(e)
-        end
-
-        raise "Forked child process failed: #{$CHILD_STATUS}" unless $CHILD_STATUS.success?
-      end
-    end
-  end
-end
-
-
- -
-

- - .safe_popen_read(*args, **options, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'utils/popen.rb', line 15
-
-def self.safe_popen_read(*args, **options, &block)
-  popen_read(*args, safe: true, **options, &block)
-end
-
-
- -
-

- - .safe_popen_write(*args, **options, &block) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'utils/popen.rb', line 42
-
-def self.safe_popen_write(*args, **options, &block)
-  popen_write(*args, safe: true, **options, &block)
-end
-
-
- -
-

- - .underscore(camel_cased_word) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Makes an underscored, lowercase form from the expression in the string.

- -

Changes '::' to '/' to convert namespaces to paths.

- -

underscore('ActiveModel') # => "active_model" - underscore('ActiveModel::Errors') # => "active_model/errors"

- - -
-
-
-

Parameters:

-
    - -
  • - - camel_cased_word - - - (String, Symbol) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-
-
# File 'utils.rb', line 160
-
-def self.underscore(camel_cased_word)
-  return camel_cased_word.to_s unless /[A-Z-]|::/.match?(camel_cased_word)
-
-  word = camel_cased_word.to_s.gsub("::", "/")
-  word.gsub!(/([A-Z])(?=[A-Z][a-z])|([a-z\d])(?=[A-Z])/) do
-    T.must(::Regexp.last_match(1) || ::Regexp.last_match(2)) << "_"
-  end
-  word.tr!("-", "_")
-  word.downcase!
-  word
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/AST.html b/docs/Utils/AST.html deleted file mode 100644 index 883711a17..000000000 --- a/docs/Utils/AST.html +++ /dev/null @@ -1,870 +0,0 @@ - - - - - - - Module: Utils::AST - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::AST - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - -
-
Included in:
-
FormulaAST
-
- - - -
-
Defined in:
-
utils/ast.rb,
- utils/ast.rbi,
sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for editing Ruby files.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: FormulaAST - - -

- - -

- Constant Summary - collapse -

- -
- -
Node = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
RuboCop::AST::Node
- -
SendNode = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
RuboCop::AST::SendNode
- -
BlockNode = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
RuboCop::AST::BlockNode
- -
ProcessedSource = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
RuboCop::AST::ProcessedSource
- -
TreeRewriter = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
Parser::Source::TreeRewriter
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .body_children(body_node) ⇒ Array<Node> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - body_node - - - (Node) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'utils/ast.rb', line 19
-
-def body_children(body_node)
-  if body_node.blank?
-    []
-  elsif body_node.begin_type?
-    body_node.children.compact
-  else
-    [body_node]
-  end
-end
-
-
- -
-

- - .call_node_match?(node, name:, type: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - node - - - (Node) - - - -
  • - -
  • - - name - - - (Symbol) - - - -
  • - -
  • - - type - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'utils/ast.rb', line 61
-
-def call_node_match?(node, name:, type: nil)
-  node_type = case node
-  when SendNode then :method_call
-  when BlockNode then :block_call
-  else return false
-  end
-
-  component_match?(component_name: node.method_name,
-                   component_type: node_type,
-                   target_name:    name,
-                   target_type:    type)
-end
-
-
- -
-

- - .component_match?(component_name:, component_type:, target_name:, target_type: nil) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - component_name - - - (Symbol) - - - -
  • - -
  • - - component_type - - - (Symbol) - - - -
  • - -
  • - - target_name - - - (Symbol) - - - -
  • - -
  • - - target_type - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'utils/ast.rb', line 56
-
-def component_match?(component_name:, component_type:, target_name:, target_type: nil)
-  component_name == target_name && (target_type.nil? || component_type == target_type)
-end
-
-
- -
-

- - .process_source(source) ⇒ Array(ProcessedSource, Node) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - source - - - (String) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-
-
# File 'utils/ast.rb', line 41
-
-def process_source(source)
-  ruby_version = Version.new(HOMEBREW_REQUIRED_RUBY_VERSION).major_minor.to_f
-  processed_source = ProcessedSource.new(source, ruby_version)
-  root_node = processed_source.ast
-  [processed_source, root_node]
-end
-
-
- -
-

- - .stanza_text(name, value, indent: nil) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (Symbol) - - - -
  • - -
  • - - value - - - (Numeric, String, Symbol) - - - -
  • - -
  • - - indent - - - (Integer, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'utils/ast.rb', line 30
-
-def stanza_text(name, value, indent: nil)
-  text = if value.is_a?(String)
-    _, node = process_source(value)
-    value if (node.is_a?(SendNode) || node.is_a?(BlockNode)) && node.method_name == name
-  end
-  text ||= "#{name} #{value.inspect}"
-  text = text.gsub(/^(?!$)/, " " * indent) if indent && !text.match?(/\A\n* +/)
-  text
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/AST/FormulaAST.html b/docs/Utils/AST/FormulaAST.html deleted file mode 100644 index 18d75ac31..000000000 --- a/docs/Utils/AST/FormulaAST.html +++ /dev/null @@ -1,1164 +0,0 @@ - - - - - - - Class: Utils::AST::FormulaAST - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Utils::AST::FormulaAST - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
Forwardable
-
- - - -
-
Includes:
-
Utils::AST
-
- - - - - - -
-
Defined in:
-
utils/ast.rb,
- sorbet/rbi/parlour.rbi
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Helper class for editing formulae.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Utils::AST

-

BlockNode, Node, ProcessedSource, SendNode, TreeRewriter

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods included from Utils::AST

-

body_children, call_node_match?, component_match?, process_source, stanza_text

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

-
-

Constructor Details

- -
-

- - #initialize(formula_contents) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - formula_contents - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-
-
# File 'utils/ast.rb', line 82
-
-def initialize(formula_contents)
-  @formula_contents = formula_contents
-  processed_source, children = process_formula
-  @processed_source = T.let(processed_source, ProcessedSource)
-  @children = T.let(children, T::Array[Node])
-  @tree_rewriter = T.let(TreeRewriter.new(processed_source.buffer), TreeRewriter)
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #add_bottle_block(bottle_output) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - bottle_output - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'utils/ast.rb', line 106
-
-def add_bottle_block(bottle_output)
-  add_stanza(:bottle, "\n#{bottle_output.chomp}", type: :block_call)
-end
-
-
- -
-

- - #add_stanza(name, value, type: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - name - - - (Symbol) - - - -
  • - -
  • - - value - - - (Numeric, String, Symbol) - - - -
  • - -
  • - - type - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-
-
# File 'utils/ast.rb', line 152
-
-def add_stanza(name, value, type: nil)
-  preceding_component = if children.length > 1
-    children.reduce do |previous_child, current_child|
-      if formula_component_before_target?(current_child,
-                                          target_name: name,
-                                          target_type: type)
-        next current_child
-      else
-        break previous_child
-      end
-    end
-  else
-    children.first
-  end
-  preceding_component = preceding_component.last_argument if preceding_component.is_a?(SendNode)
-
-  preceding_expr = preceding_component.location.expression
-  processed_source.comments.each do |comment|
-    comment_expr = comment.location.expression
-    distance = comment_expr.first_line - preceding_expr.first_line
-    case distance
-    when 0
-      if comment_expr.last_line > preceding_expr.last_line ||
-         comment_expr.end_pos > preceding_expr.end_pos
-        preceding_expr = comment_expr
-      end
-    when 1
-      preceding_expr = comment_expr
-    end
-  end
-
-  tree_rewriter.insert_after(preceding_expr, "\n#{stanza_text(name, value, indent: 2)}")
-end
-
-
- -
-

- - #bottle_blockNode? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Node, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-91
-92
-93
-
-
# File 'utils/ast.rb', line 91
-
-def bottle_block
-  stanza(:bottle, type: :block_call)
-end
-
-
- -
-

- - #process(*args, **options, &block) ⇒ T.untyped - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - args - - - (T.untyped) - - - -
  • - -
  • - - options - - - (T.untyped) - - - -
  • - -
  • - - block - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.untyped) - - - -
  • - -
- -
- - - - -
-
-
-
-288
-
-
# File 'sorbet/rbi/parlour.rbi', line 288
-
-def process(*args, **options, &block); end
-
-
- -
-

- - #remove_stanza(name, type: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - name - - - (Symbol) - - - -
  • - -
  • - - type - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-
-
# File 'utils/ast.rb', line 111
-
-def remove_stanza(name, type: nil)
-  stanza_node = stanza(name, type:)
-  raise "Could not find '#{name}' stanza!" if stanza_node.blank?
-
-  # stanza is probably followed by a newline character
-  # try to delete it if so
-  stanza_range = stanza_node.source_range
-  trailing_range = stanza_range.with(begin_pos: stanza_range.end_pos,
-                                     end_pos:   stanza_range.end_pos + 1)
-  if trailing_range.source.chomp.empty?
-    stanza_range = stanza_range.adjust(end_pos: 1)
-
-    # stanza_node is probably indented
-    # since a trailing newline has been removed,
-    # try to delete leading whitespace on line
-    leading_range = stanza_range.with(begin_pos: stanza_range.begin_pos - stanza_range.column,
-                                      end_pos:   stanza_range.begin_pos)
-    if leading_range.source.strip.empty?
-      stanza_range = stanza_range.adjust(begin_pos: -stanza_range.column)
-
-      # if the stanza was preceded by a blank line, it should be removed
-      # that is, if the two previous characters are newlines,
-      # then delete one of them
-      leading_range = stanza_range.with(begin_pos: stanza_range.begin_pos - 2,
-                                        end_pos:   stanza_range.begin_pos)
-      stanza_range = stanza_range.adjust(begin_pos: -1) if leading_range.source.chomp.chomp.empty?
-    end
-  end
-
-  tree_rewriter.remove(stanza_range)
-end
-
-
- -
-

- - #replace_bottle_block(bottle_output) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - bottle_output - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'utils/ast.rb', line 101
-
-def replace_bottle_block(bottle_output)
-  replace_stanza(:bottle, bottle_output.chomp, type: :block_call)
-end
-
-
- -
-

- - #replace_stanza(name, replacement, type: nil) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - name - - - (Symbol) - - - -
  • - -
  • - - replacement - - - (Numeric, String, Symbol) - - - -
  • - -
  • - - type - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-144
-145
-146
-147
-148
-149
-
-
# File 'utils/ast.rb', line 144
-
-def replace_stanza(name, replacement, type: nil)
-  stanza_node = stanza(name, type:)
-  raise "Could not find '#{name}' stanza!" if stanza_node.blank?
-
-  tree_rewriter.replace(stanza_node.source_range, stanza_text(name, replacement, indent: 2).lstrip)
-end
-
-
- -
-

- - #stanza(name, type: nil) ⇒ Node? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (Symbol) - - - -
  • - -
  • - - type - - - (Symbol, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Node, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-97
-98
-
-
# File 'utils/ast.rb', line 96
-
-def stanza(name, type: nil)
-  children.find { |child| call_node_match?(child, name:, type:) }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Analytics.html b/docs/Utils/Analytics.html deleted file mode 100644 index 49fd2109c..000000000 --- a/docs/Utils/Analytics.html +++ /dev/null @@ -1,2894 +0,0 @@ - - - - - - - Module: Utils::Analytics - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Analytics - - - Private -

-
- - - - -
-
Extended by:
-
Cachable, Context
-
- - - - - - - - -
-
Defined in:
-
utils/analytics.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for fetching and reporting analytics data.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
INFLUX_BUCKET = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"analytics"
- -
INFLUX_TOKEN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"iVdsgJ_OjvTYGAA79gOfWlA_fX0QCuj4eYUNdb-qVUTrC3tp3JTWCADVNE9HxV0kp2ZjIK9tuthy_teX4szr9A=="
- -
INFLUX_HOST = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"https://eu-central-1-1.aws.cloud2.influxdata.com"
- -
INFLUX_ORG = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
"d81a3e6d582d485f"
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Context

-

current, current=, debug?, quiet?, verbose?, with_context

- - - - - - - - - - -

Methods included from Cachable

-

cache, clear_cache

- - -
-

Class Method Details

- - -
-

- - .cask_output(cask, args:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-
-
# File 'utils/analytics.rb', line 323
-
-def cask_output(cask, args:)
-  return if Homebrew::EnvConfig.no_analytics? || Homebrew::EnvConfig.no_github_api?
-
-  json = Homebrew::API::Cask.fetch cask.token
-  return if json.blank? || json["analytics"].blank?
-
-  output_analytics(json, args:)
-rescue ArgumentError
-  # Ignore failed API requests
-  nil
-end
-
-
- -
-

- - .config_true?(key) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-465
-466
-467
-
-
# File 'utils/analytics.rb', line 465
-
-def config_true?(key)
-  Homebrew::Settings.read(key) == "true"
-end
-
-
- -
-

- - .default_package_fieldsHash{Symbol => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

remove os_version starting with " or number -remove macOS patch release

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-
-
# File 'utils/analytics.rb', line 357
-
-def default_package_fields
-  cache[:default_package_fields] ||= begin
-    version = if (match_data = HOMEBREW_VERSION.match(/^[\d.]+/))
-      suffix = "-dev" if HOMEBREW_VERSION.include?("-")
-      match_data[0] + suffix.to_s
-    else
-      ">=4.1.22"
-    end
-
-    # Only include OS versions with an actual name.
-    os_name_and_version = if (os_version = OS_VERSION.presence) && os_version.downcase.match?(/^[a-z]/)
-      os_version
-    end
-
-    {
-      version:,
-      os_name_and_version:,
-    }
-  end
-end
-
-
- -
-

- - .default_package_tagsHash{Symbol => String} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-
-
# File 'utils/analytics.rb', line 336
-
-def default_package_tags
-  cache[:default_package_tags] ||= begin
-    # Only display default prefixes to reduce cardinality and improve privacy
-    prefix = Homebrew.default_prefix? ? HOMEBREW_PREFIX.to_s : "custom-prefix"
-
-    # Tags are always strings and must have low cardinality.
-    {
-      ci:             ENV["CI"].present?,
-      prefix:,
-      default_prefix: Homebrew.default_prefix?,
-      developer:      Homebrew::EnvConfig.developer?,
-      devcmdrun:      config_true?(:devcmdrun),
-      arch:           HOMEBREW_PHYSICAL_PROCESSOR,
-      os:             HOMEBREW_SYSTEM,
-    }
-  end
-end
-
-
- -
-

- - .deferred_curl(url, args) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'utils/analytics.rb', line 53
-
-def deferred_curl(url, args)
-  curl = Utils::Curl.curl_executable
-  if ENV["HOMEBREW_ANALYTICS_DEBUG"]
-    puts "#{curl} #{args.join(" ")} \"#{url}\""
-    puts Utils.popen_read(curl, *args, url)
-  else
-    pid = fork do
-      exec curl, *args, "--silent", "--output", "/dev/null", url
-    end
-    Process.detach T.must(pid)
-  end
-end
-
-
- -
-

- - .delete_uuid!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-201
-202
-203
-
-
# File 'utils/analytics.rb', line 201
-
-def delete_uuid!
-  Homebrew::Settings.delete :analyticsuuid
-end
-
-
- -
-

- - .disable!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-196
-197
-198
-199
-
-
# File 'utils/analytics.rb', line 196
-
-def disable!
-  Homebrew::Settings.write :analyticsdisabled, true
-  delete_uuid!
-end
-
-
- -
-

- - .disabled?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-169
-170
-171
-172
-173
-
-
# File 'utils/analytics.rb', line 169
-
-def disabled?
-  return true if Homebrew::EnvConfig.no_analytics?
-
-  config_true?(:analyticsdisabled)
-end
-
-
- -
-

- - .enable!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-190
-191
-192
-193
-194
-
-
# File 'utils/analytics.rb', line 190
-
-def enable!
-  Homebrew::Settings.write :analyticsdisabled, false
-  delete_uuid!
-  messages_displayed!
-end
-
-
- -
-

- - .format_count(count) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-469
-470
-471
-
-
# File 'utils/analytics.rb', line 469
-
-def format_count(count)
-  count.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse
-end
-
-
- -
-

- - .format_percent(percent) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-473
-474
-475
-
-
# File 'utils/analytics.rb', line 473
-
-def format_percent(percent)
-  format("%<percent>.2f", percent:)
-end
-
-
- -
-

- - .formula_output(formula, args:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-
-
# File 'utils/analytics.rb', line 310
-
-def formula_output(formula, args:)
-  return if Homebrew::EnvConfig.no_analytics? || Homebrew::EnvConfig.no_github_api?
-
-  json = Homebrew::API::Formula.fetch formula.name
-  return if json.blank? || json["analytics"].blank?
-
-  output_analytics(json, args:)
-  output_github_packages_downloads(formula, args:)
-rescue ArgumentError
-  # Ignore failed API requests
-  nil
-end
-
-
- -
-

- - .influx_message_displayed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-159
-160
-161
-
-
# File 'utils/analytics.rb', line 159
-
-def influx_message_displayed?
-  config_true?(:influxanalyticsmessage)
-end
-
-
- -
-

- - .messages_displayed!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-184
-185
-186
-187
-188
-
-
# File 'utils/analytics.rb', line 184
-
-def messages_displayed!
-  Homebrew::Settings.write :analyticsmessage, true
-  Homebrew::Settings.write :caskanalyticsmessage, true
-  Homebrew::Settings.write :influxanalyticsmessage, true
-end
-
-
- -
-

- - .messages_displayed?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-163
-164
-165
-166
-167
-
-
# File 'utils/analytics.rb', line 163
-
-def messages_displayed?
-  config_true?(:analyticsmessage) &&
-    config_true?(:caskanalyticsmessage) &&
-    influx_message_displayed?
-end
-
-
- -
-

- - .no_message_output?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-179
-180
-181
-182
-
-
# File 'utils/analytics.rb', line 179
-
-def no_message_output?
-  # Used by Homebrew/install
-  ENV["HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT"].present?
-end
-
-
- -
-

- - .not_this_run?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-175
-176
-177
-
-
# File 'utils/analytics.rb', line 175
-
-def not_this_run?
-  ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"].present?
-end
-
-
- -
-

- - .output(args:, filter: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-
-
# File 'utils/analytics.rb', line 205
-
-def output(args:, filter: nil)
-  days = args.days || "30"
-  category = args.category || "install"
-  begin
-    json = Homebrew::API::Analytics.fetch category, days
-  rescue ArgumentError
-    # Ignore failed API requests
-    return
-  end
-  return if json.blank? || json["items"].blank?
-
-  os_version = category == "os-version"
-  cask_install = category == "cask-install"
-  results = {}
-  json["items"].each do |item|
-    key = if os_version
-      item["os_version"]
-    elsif cask_install
-      item["cask"]
-    else
-      item["formula"]
-    end
-    next if filter.present? && key != filter && !key.start_with?("#{filter} ")
-
-    results[key] = item["count"].tr(",", "").to_i
-  end
-
-  if filter.present? && results.blank?
-    onoe "No results matching `#{filter}` found!"
-    return
-  end
-
-  table_output(category, days, results, os_version:, cask_install:)
-end
-
-
- -
-

- - .output_analytics(json, args:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-
-
# File 'utils/analytics.rb', line 240
-
-def output_analytics(json, args:)
-  full_analytics = args.analytics? || verbose?
-
-  ohai "Analytics"
-  json["analytics"].each do |category, value|
-    category = category.tr("_", "-")
-    analytics = []
-
-    value.each do |days, results|
-      days = days.to_i
-      if full_analytics
-        next if args.days.present? && args.days&.to_i != days
-        next if args.category.present? && args.category != category
-
-        table_output(category, days, results)
-      else
-        total_count = results.values.inject("+")
-        analytics << "#{number_readable(total_count)} (#{days} days)"
-      end
-    end
-
-    puts "#{category}: #{analytics.join(", ")}" unless full_analytics
-  end
-end
-
-
- -
-

- - .output_github_packages_downloads(formula, args:) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method is undocumented because it is not intended for general use. -It relies on screen scraping some GitHub HTML that's not available as an API. -This seems very likely to break in the future. -That said, it's the only way to get the data we want right now.

- - -
-
-
- - -
- - - - -
-
-
-
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-
-
# File 'utils/analytics.rb', line 269
-
-def output_github_packages_downloads(formula, args:)
-  return unless args.github_packages_downloads?
-  return unless formula.core_formula?
-
-  escaped_formula_name = GitHubPackages.image_formula_name(formula.name)
-                                       .gsub("/", "%2F")
-  formula_url_suffix = "container/core%2F#{escaped_formula_name}/"
-  formula_url = "https://github.com/Homebrew/homebrew-core/pkgs/#{formula_url_suffix}"
-  output = Utils::Curl.curl_output("--fail", formula_url)
-  return unless output.success?
-
-  formula_version_urls = output.stdout
-                               .scan(%r{/orgs/Homebrew/packages/#{formula_url_suffix}\d+\?tag=[^"]+})
-                               .map do |url|
-    url.sub("/orgs/Homebrew/packages/", "/Homebrew/homebrew-core/pkgs/")
-  end
-  return if formula_version_urls.empty?
-
-  thirty_day_download_count = 0
-  formula_version_urls.each do |formula_version_url_suffix|
-    formula_version_url = "https://github.com#{formula_version_url_suffix}"
-    output = Utils::Curl.curl_output("--fail", formula_version_url)
-    next unless output.success?
-
-    last_thirty_days_match = output.stdout.match(
-      %r{<span class="[\s\-a-z]*">Last 30 days</span>\s*<span class="[\s\-a-z]*">([\d.M,]+)</span>}m,
-    )
-    next if last_thirty_days_match.blank?
-
-    last_thirty_days_downloads = last_thirty_days_match.captures.first.tr(",", "")
-    thirty_day_download_count += if (millions_match = last_thirty_days_downloads.match(/(\d+\.\d+)M/).presence)
-      millions_match.captures.first.to_i * 1_000_000
-    else
-      last_thirty_days_downloads.to_i
-    end
-  end
-
-  ohai "GitHub Packages Downloads"
-  puts "#{number_readable(thirty_day_download_count)} (30 days)"
-end
-
-
- -
-

- - .report_build_error(exception) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-
-
# File 'utils/analytics.rb', line 90
-
-def report_build_error(exception)
-  return if not_this_run? || disabled?
-
-  formula = exception.formula
-  return unless formula
-
-  tap = formula.tap
-  return unless tap
-  return unless tap.should_report_analytics?
-
-  options = exception.options.to_a.compact.map(&:to_s).sort.uniq.join(" ")
-  report_package_event(:build_error, package_name: formula.name, tap_name: tap.name, options:)
-end
-
-
- -
-

- - .report_command_run(command_instance) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
-
# File 'utils/analytics.rb', line 105
-
-def report_command_run(command_instance)
-  return if not_this_run? || disabled?
-
-  command = command_instance.class.command_name
-
-  options_array = command_instance.args.options_only.to_a.compact
-
-  # Strip out any flag values to reduce cardinality and preserve privacy.
-  options_array.map! { |option| option.sub(/=.*/, "=") }
-  options = options_array.sort.uniq.join(" ")
-
-  # Tags must have low cardinality.
-  tags = {
-    command:,
-    ci:        ENV["CI"].present?,
-    devcmdrun: config_true?(:devcmdrun),
-    developer: Homebrew::EnvConfig.developer?,
-  }
-
-  # Fields can have high cardinality.
-  fields = { options: }
-
-  report_influx(:command_run, tags, fields)
-end
-
-
- -
-

- - .report_influx(measurement, tags, fields) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'utils/analytics.rb', line 27
-
-def report_influx(measurement, tags, fields)
-  return if not_this_run? || disabled?
-
-  # Tags are always implicitly strings and must have low cardinality.
-  tags_string = tags.map { |k, v| "#{k}=#{v}" }
-                    .join(",")
-
-  # Fields need explicitly wrapped with quotes and can have high cardinality.
-  fields_string = fields.compact
-                        .map { |k, v| %Q(#{k}="#{v}") }
-                        .join(",")
-
-  args = [
-    "--max-time", "3",
-    "--header", "Authorization: Token #{INFLUX_TOKEN}",
-    "--header", "Content-Type: text/plain; charset=utf-8",
-    "--header", "Accept: application/json",
-    "--data-binary", "#{measurement},#{tags_string} #{fields_string} #{Time.now.to_i}"
-  ]
-
-  # Second precision is highest we can do and has the lowest performance cost.
-  url = "#{INFLUX_HOST}/api/v2/write?bucket=#{INFLUX_BUCKET}&precision=s"
-  deferred_curl(url, args)
-end
-
-
- -
-

- - .report_package_event(measurement, package_name:, tap_name:, on_request: false, options: "") ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - measurement - - - (Symbol) - - - -
  • - -
  • - - package_name - - - (String) - - - -
  • - -
  • - - tap_name - - - (String) - - - -
  • - -
  • - - on_request - - - (Boolean) - - - (defaults to: false) - - -
  • - -
  • - - options - - - (String) - - - (defaults to: "") - - -
  • - -
- - -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-
-
# File 'utils/analytics.rb', line 70
-
-def report_package_event(measurement, package_name:, tap_name:, on_request: false, options: "")
-  return if not_this_run? || disabled?
-
-  # ensure on_request is a boolean
-  on_request = on_request ? true : false
-
-  # ensure options are removed (by `.compact` below) if empty
-  options = nil if options.blank?
-
-  # Tags must have low cardinality.
-  tags = default_package_tags.merge(on_request:)
-
-  # Fields can have high cardinality.
-  fields = default_package_fields.merge(package: package_name, tap_name:, options:)
-                                 .compact
-
-  report_influx(measurement, tags, fields)
-end
-
-
- -
-

- - .report_test_bot_test(step_command_short, passed) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

-
    - -
  • - - step_command_short - - - (String) - - - -
  • - -
  • - - passed - - - (Boolean) - - - -
  • - -
- - -
- - - - -
-
-
-
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-
-
# File 'utils/analytics.rb', line 131
-
-def report_test_bot_test(step_command_short, passed)
-  return if not_this_run? || disabled?
-  return if ENV["HOMEBREW_TEST_BOT_ANALYTICS"].blank?
-
-  # ensure passed is a boolean
-  passed = passed ? true : false
-
-  # Tags must have low cardinality.
-  tags = {
-    passed:,
-    arch:   HOMEBREW_PHYSICAL_PROCESSOR,
-    os:     HOMEBREW_SYSTEM,
-  }
-
-  # Strip out any flag values to reduce cardinality and preserve privacy.
-  # Sort options to ensure consistent ordering and improve readability.
-  command_and_package, options =
-    step_command_short.split
-                      .map { |arg| arg.sub(/=.*/, "=") }
-                      .partition { |arg| !arg.start_with?("-") }
-  command = (command_and_package + options.sort).join(" ")
-
-  # Fields can have high cardinality.
-  fields = { command: }
-
-  report_influx(:test_bot_test, tags, fields)
-end
-
-
- -
-

- - .table_output(category, days, results, os_version: false, cask_install: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-
-
# File 'utils/analytics.rb', line 378
-
-def table_output(category, days, results, os_version: false, cask_install: false)
-  oh1 "#{category} (#{days} days)"
-  total_count = results.values.inject("+")
-  formatted_total_count = format_count(total_count)
-  formatted_total_percent = format_percent(100)
-
-  index_header = "Index"
-  count_header = "Count"
-  percent_header = "Percent"
-  name_with_options_header = if os_version
-    "macOS Version"
-  elsif cask_install
-    "Token"
-  else
-    "Name (with options)"
-  end
-
-  total_index_footer = "Total"
-  max_index_width = results.length.to_s.length
-  index_width = [
-    index_header.length,
-    total_index_footer.length,
-    max_index_width,
-  ].max
-  count_width = [
-    count_header.length,
-    formatted_total_count.length,
-  ].max
-  percent_width = [
-    percent_header.length,
-    formatted_total_percent.length,
-  ].max
-  name_with_options_width = Tty.width -
-                            index_width -
-                            count_width -
-                            percent_width -
-                            10 # spacing and lines
-
-  formatted_index_header =
-    format "%#{index_width}s", index_header
-  formatted_name_with_options_header =
-    format "%-#{name_with_options_width}s",
-           name_with_options_header[0..name_with_options_width-1]
-  formatted_count_header =
-    format "%#{count_width}s", count_header
-  formatted_percent_header =
-    format "%#{percent_width}s", percent_header
-  puts "#{formatted_index_header} | #{formatted_name_with_options_header} | " \
-       "#{formatted_count_header} |  #{formatted_percent_header}"
-
-  columns_line = "#{"-"*index_width}:|-#{"-"*name_with_options_width}-|-" \
-                 "#{"-"*count_width}:|-#{"-"*percent_width}:"
-  puts columns_line
-
-  index = 0
-  results.each do |name_with_options, count|
-    index += 1
-    formatted_index = format "%0#{max_index_width}d", index
-    formatted_index = format "%-#{index_width}s", formatted_index
-    formatted_name_with_options =
-      format "%-#{name_with_options_width}s",
-             name_with_options[0..name_with_options_width-1]
-    formatted_count = format "%#{count_width}s", format_count(count)
-    formatted_percent = if total_count.zero?
-      format "%#{percent_width}s", format_percent(0)
-    else
-      format "%#{percent_width}s",
-             format_percent((count.to_i * 100) / total_count.to_f)
-    end
-    puts "#{formatted_index} | #{formatted_name_with_options} | " \
-         "#{formatted_count} | #{formatted_percent}%"
-    next if index > 10
-  end
-  return if results.length <= 1
-
-  formatted_total_footer =
-    format "%-#{index_width}s", total_index_footer
-  formatted_blank_footer =
-    format "%-#{name_with_options_width}s", ""
-  formatted_total_count_footer =
-    format "%#{count_width}s", formatted_total_count
-  formatted_total_percent_footer =
-    format "%#{percent_width}s", formatted_total_percent
-  puts "#{formatted_total_footer} | #{formatted_blank_footer} | " \
-       "#{formatted_total_count_footer} | #{formatted_total_percent_footer}%"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Backtrace.html b/docs/Utils/Backtrace.html deleted file mode 100644 index e0bfbc043..000000000 --- a/docs/Utils/Backtrace.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - - - Module: Utils::Backtrace - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Backtrace - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/backtrace.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .clean(error) ⇒ Array<String>? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Cleans sorbet-runtime gem paths from the backtrace unless...

- -
    -
  1. verbose is set
  2. -
  3. first backtrace line starts with sorbet-runtime - -
      -
    • This implies that the error is related to Sorbet.
    • -
  4. -
- - -
-
-
-

Parameters:

-
    - -
  • - - error - - - (Exception) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-
-
# File 'utils/backtrace.rb', line 13
-
-def self.clean(error)
-  backtrace = error.backtrace
-
-  return backtrace if Context.current.verbose?
-  return backtrace if backtrace.blank?
-  return backtrace if backtrace.fetch(0).start_with?(sorbet_runtime_path)
-
-  old_backtrace_length = backtrace.length
-  backtrace.reject { |line| line.start_with?(sorbet_runtime_path) }
-           .tap { |new_backtrace| print_backtrace_message if old_backtrace_length > new_backtrace.length }
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-
-
# File 'utils/backtrace.rb', line 31
-
-def self.print_backtrace_message
-  return if @print_backtrace_message
-
-  opoo "Removed Sorbet lines from backtrace!"
-  puts "Rerun with `--verbose` to see the original backtrace" unless Homebrew::EnvConfig.no_env_hints?
-
-  @print_backtrace_message = true
-end
-
-
- -
-

- - .sorbet_runtime_pathString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'utils/backtrace.rb', line 26
-
-def self.sorbet_runtime_path
-  @sorbet_runtime_path ||= T.let("#{Gem.paths.home}/gems/sorbet-runtime", T.nilable(String))
-end
-
-
- -
-

- - .tap_error_url(error) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - error - - - (Exception) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-
-
# File 'utils/backtrace.rb', line 41
-
-def self.tap_error_url(error)
-  backtrace = error.backtrace
-  return if backtrace.blank?
-
-  backtrace.each do |line|
-    if (tap = line.match(%r{/Library/Taps/([^/]+/[^/]+)/}))
-      return "https://github.com/#{tap[1]}/issues/new"
-    end
-  end
-
-  nil
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Bottles.html b/docs/Utils/Bottles.html deleted file mode 100644 index ffd4cb887..000000000 --- a/docs/Utils/Bottles.html +++ /dev/null @@ -1,1093 +0,0 @@ - - - - - - - Module: Utils::Bottles - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Bottles - - - -

-
- - - - -
-
Extended by:
-
MacOSOverride
-
- - - - - - - - -
-
Defined in:
-
utils/bottles.rb,
- extend/os/mac/utils/bottles.rb
-
-
- -
- -

Overview

-
-

- This module is part of an internal API. - This module may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for bottles.

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: MacOSOverride - - - - Classes: Collector, Tag, TagSpecification - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from MacOSOverride

-

tag

- - -
-

Class Method Details

- - -
-

- - .built_as?(formula) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-
-
# File 'utils/bottles.rb', line 30
-
-def built_as?(formula)
-  return false unless formula.latest_version_installed?
-
-  tab = Keg.new(formula.latest_installed_prefix).tab
-  tab.built_as_bottle
-end
-
-
- -
-

- - .extname_tag_rebuild(filename) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'utils/bottles.rb', line 49
-
-def extname_tag_rebuild(filename)
-  HOMEBREW_BOTTLES_EXTNAME_REGEX.match(filename).to_a
-end
-
-
- -
-

- - .file_from_bottle(bottle_file, file_path) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'utils/bottles.rb', line 59
-
-def file_from_bottle(bottle_file, file_path)
-  Utils.popen_read("tar", "--extract", "--to-stdout", "--file", bottle_file, file_path)
-end
-
-
- -
-

- - .file_outdated?(formula, file) ⇒ Boolean - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'utils/bottles.rb', line 37
-
-def file_outdated?(formula, file)
-  file = file.resolved_path
-
-  filename = file.basename.to_s
-  return false if formula.bottle.blank?
-
-  _, bottle_tag, bottle_rebuild = extname_tag_rebuild(filename)
-  return false if bottle_tag.blank?
-
-  bottle_tag != formula.bottle.tag.to_s || bottle_rebuild.to_i != formula.bottle.rebuild
-end
-
-
- -
-

- - .formula_contents(bottle_file, name: ) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-88
-89
-90
-91
-92
-93
-94
-95
-96
-
-
# File 'utils/bottles.rb', line 88
-
-def formula_contents(bottle_file,
-                     name: resolve_formula_names(bottle_file)[0])
-  bottle_version = resolve_version bottle_file
-  formula_path = "#{name}/#{bottle_version}/.brew/#{name}.rb"
-  contents = file_from_bottle(bottle_file, formula_path)
-  raise BottleFormulaUnavailableError.new(bottle_file, formula_path) unless $CHILD_STATUS.success?
-
-  contents
-end
-
-
- -
-

- - .load_tab(formula) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-
-
# File 'utils/bottles.rb', line 107
-
-def load_tab(formula)
-  keg = Keg.new(formula.prefix)
-  tabfile = keg/Tab::FILENAME
-  bottle_json_path = formula.local_bottle_path&.sub(/\.(\d+\.)?tar\.gz$/, ".json")
-
-  if (tab_attributes = formula.bottle_tab_attributes.presence)
-    Tab.from_file_content(tab_attributes.to_json, tabfile)
-  elsif !tabfile.exist? && bottle_json_path&.exist?
-    _, tag, = Utils::Bottles.extname_tag_rebuild(formula.local_bottle_path)
-    bottle_hash = JSON.parse(File.read(bottle_json_path))
-    tab_json = bottle_hash[formula.full_name]["bottle"]["tags"][tag]["tab"].to_json
-    Tab.from_file_content(tab_json, tabfile)
-  else
-    tab = keg.tab
-
-    tab.runtime_dependencies = begin
-      f_runtime_deps = formula.runtime_dependencies(read_from_tab: false)
-      Tab.runtime_deps_hash(formula, f_runtime_deps)
-    end
-
-    tab
-  end
-end
-
-
- -
-

- - .path_resolved_basename(root_url, name, checksum, filename) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-103
-104
-105
-
-
# File 'utils/bottles.rb', line 98
-
-def path_resolved_basename(root_url, name, checksum, filename)
-  if root_url.match?(GitHubPackages::URL_REGEX)
-    image_name = GitHubPackages.image_formula_name(name)
-    ["#{image_name}/blobs/sha256:#{checksum}", filename&.github_packages]
-  else
-    filename&.url_encode
-  end
-end
-
-
- -
-

- - .receipt_path(bottle_file) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-
-
# File 'utils/bottles.rb', line 53
-
-def receipt_path(bottle_file)
-  bottle_file_list(bottle_file).find do |line|
-    %r{.+/.+/INSTALL_RECEIPT.json}.match?(line)
-  end
-end
-
-
- -
-

- - .resolve_formula_names(bottle_file) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-
-
# File 'utils/bottles.rb', line 63
-
-def resolve_formula_names(bottle_file)
-  name = bottle_file_list(bottle_file).first.to_s.split("/").first
-  full_name = if (receipt_file_path = receipt_path(bottle_file))
-    receipt_file = file_from_bottle(bottle_file, receipt_file_path)
-    tap = Tab.from_file_content(receipt_file, "#{bottle_file}/#{receipt_file_path}").tap
-    "#{tap}/#{name}" if tap.present? && !tap.core_tap?
-  else
-    bottle_json_path = Pathname(bottle_file.sub(/\.(\d+\.)?tar\.gz$/, ".json"))
-    if bottle_json_path.exist? &&
-       (bottle_json_path_contents = bottle_json_path.read.presence) &&
-       (bottle_json = JSON.parse(bottle_json_path_contents).presence) &&
-       bottle_json.is_a?(Hash)
-      bottle_json.keys.first.presence
-    end
-  end
-  full_name ||= name
-
-  [name, full_name]
-end
-
-
- -
-

- - .resolve_version(bottle_file) ⇒ Object - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-83
-84
-85
-86
-
-
# File 'utils/bottles.rb', line 83
-
-def resolve_version(bottle_file)
-  version = bottle_file_list(bottle_file).first.to_s.split("/").second
-  PkgVersion.parse(version)
-end
-
-
- -
-

- - .tag(tag = nil) ⇒ Tag - - - - - -

-
-

- This method is part of an internal API. - This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Gets the tag for the running OS.

- - -
-
-
-

Parameters:

-
    - -
  • - - tag - - - (Symbol, Tag, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Tag) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-
-
# File 'utils/bottles.rb', line 16
-
-def tag(tag = nil)
-  case tag
-  when Symbol
-    Tag.from_symbol(tag)
-  when Tag
-    tag
-  else
-    @tag ||= Tag.new(
-      system: HOMEBREW_SYSTEM.downcase.to_sym,
-      arch:   HOMEBREW_PROCESSOR.downcase.to_sym,
-    )
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Bottles/Collector.html b/docs/Utils/Bottles/Collector.html deleted file mode 100644 index b67ab6f19..000000000 --- a/docs/Utils/Bottles/Collector.html +++ /dev/null @@ -1,702 +0,0 @@ - - - - - - - Class: Utils::Bottles::Collector - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Utils::Bottles::Collector - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/bottles.rb,
- extend/os/mac/utils/bottles.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Collector for bottle specifications.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initializevoid - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-283
-284
-285
-
-
# File 'utils/bottles.rb', line 283
-
-def initialize
-  @tag_specs = T.let({}, T::Hash[Utils::Bottles::Tag, Utils::Bottles::TagSpecification])
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #add(tag, checksum:, cellar:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-298
-299
-300
-301
-
-
# File 'utils/bottles.rb', line 298
-
-def add(tag, checksum:, cellar:)
-  spec = Utils::Bottles::TagSpecification.new(tag:, checksum:, cellar:)
-  @tag_specs[tag] = spec
-end
-
-
- -
-

- - #each_tag(&block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

- -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-310
-311
-312
-
-
# File 'utils/bottles.rb', line 310
-
-def each_tag(&block)
-  @tag_specs.each_key(&block)
-end
-
-
- -
-

- - #specification_for(tag, no_older_versions: false) ⇒ Utils::Bottles::TagSpecification? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tag - - - (Utils::Bottles::Tag) - - - -
  • - -
  • - - no_older_versions - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-318
-319
-320
-321
-
-
# File 'utils/bottles.rb', line 318
-
-def specification_for(tag, no_older_versions: false)
-  tag = find_matching_tag(tag, no_older_versions:)
-  @tag_specs[tag] if tag
-end
-
-
- -
-

- - #tag?(tag, no_older_versions: false) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tag - - - (Utils::Bottles::Tag) - - - -
  • - -
  • - - no_older_versions - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-304
-305
-306
-307
-
-
# File 'utils/bottles.rb', line 304
-
-def tag?(tag, no_older_versions: false)
-  tag = find_matching_tag(tag, no_older_versions:)
-  tag.present?
-end
-
-
- -
-

- - #tagsArray<Utils::Bottles::Tag> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-288
-289
-290
-
-
# File 'utils/bottles.rb', line 288
-
-def tags
-  @tag_specs.keys
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Bottles/MacOSOverride.html b/docs/Utils/Bottles/MacOSOverride.html deleted file mode 100644 index 1483d7184..000000000 --- a/docs/Utils/Bottles/MacOSOverride.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - Module: Utils::Bottles::MacOSOverride - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Bottles::MacOSOverride - - - Private -

-
- - - - - - - - - -
-
Included in:
-
Utils::Bottles
-
- - - -
-
Defined in:
-
extend/os/mac/utils/bottles.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #tag(tag = nil) ⇒ Tag - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - tag - - - (Symbol, Tag, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Tag) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-
-
# File 'extend/os/mac/utils/bottles.rb', line 9
-
-def tag(tag = nil)
-  return Tag.new(system: MacOS.version.to_sym, arch: Hardware::CPU.arch) if tag.nil?
-
-  super
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Bottles/Tag.html b/docs/Utils/Bottles/Tag.html deleted file mode 100644 index af6b4b4ff..000000000 --- a/docs/Utils/Bottles/Tag.html +++ /dev/null @@ -1,1227 +0,0 @@ - - - - - - - Class: Utils::Bottles::Tag - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Utils::Bottles::Tag - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/bottles.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Denotes the arch and OS of a bottle.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(system:, arch:) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - system - - - (Symbol) - - - -
  • - -
  • - - arch - - - (Symbol) - - - -
  • - -
- - -
- - - - -
-
-
-
-165
-166
-167
-168
-
-
# File 'utils/bottles.rb', line 165
-
-def initialize(system:, arch:)
-  @system = system
-  @arch = arch
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #archObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-143
-144
-145
-
-
# File 'utils/bottles.rb', line 143
-
-def arch
-  @arch
-end
-
-
- - - -
-

- - #systemObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-143
-144
-145
-
-
# File 'utils/bottles.rb', line 143
-
-def system
-  @system
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_symbol(value) ⇒ T.attached_class - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (Symbol) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.attached_class) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-
-
# File 'utils/bottles.rb', line 146
-
-def self.from_symbol(value)
-  return new(system: :all, arch: :all) if value == :all
-
-  @all_archs_regex ||= begin
-    all_archs = Hardware::CPU::ALL_ARCHS.map(&:to_s)
-    /
-      ^((?<arch>#{Regexp.union(all_archs)})_)?
-      (?<system>[\w.]+)$
-    /x
-  end
-  match = @all_archs_regex.match(value.to_s)
-  raise ArgumentError, "Invalid bottle tag symbol" unless match
-
-  system = match[:system].to_sym
-  arch = match[:arch]&.to_sym || :x86_64
-  new(system:, arch:)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #default_cellarString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-246
-247
-248
-249
-250
-251
-252
-253
-254
-
-
# File 'utils/bottles.rb', line 246
-
-def default_cellar
-  if linux?
-    Homebrew::DEFAULT_LINUX_CELLAR
-  elsif arch == :arm64
-    Homebrew::DEFAULT_MACOS_ARM_CELLAR
-  else
-    Homebrew::DEFAULT_MACOS_CELLAR
-  end
-end
-
-
- -
-

- - #default_prefixString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-235
-236
-237
-238
-239
-240
-241
-242
-243
-
-
# File 'utils/bottles.rb', line 235
-
-def default_prefix
-  if linux?
-    HOMEBREW_LINUX_DEFAULT_PREFIX
-  elsif arch == :arm64
-    HOMEBREW_MACOS_ARM_DEFAULT_PREFIX
-  else
-    HOMEBREW_DEFAULT_PREFIX
-  end
-end
-
-
- -
-

- - #linux?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-216
-217
-218
-
-
# File 'utils/bottles.rb', line 216
-
-def linux?
-  system == :linux
-end
-
-
- -
-

- - #macos?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-221
-222
-223
-
-
# File 'utils/bottles.rb', line 221
-
-def macos?
-  MacOSVersion::SYMBOLS.key?(system)
-end
-
-
- -
-

- - #standardized_archSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-187
-188
-189
-190
-191
-192
-
-
# File 'utils/bottles.rb', line 187
-
-def standardized_arch
-  return :x86_64 if [:x86_64, :intel].include? arch
-  return :arm64 if [:arm64, :arm].include? arch
-
-  arch
-end
-
-
- -
-

- - #to_macos_versionMacOSVersion - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-211
-212
-213
-
-
# File 'utils/bottles.rb', line 211
-
-def to_macos_version
-  @to_macos_version ||= MacOSVersion.from_symbol(system)
-end
-
-
- -
-

- - #to_symSymbol - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-195
-196
-197
-198
-199
-200
-201
-202
-203
-
-
# File 'utils/bottles.rb', line 195
-
-def to_sym
-  if system == :all && arch == :all
-    :all
-  elsif macos? && [:x86_64, :intel].include?(arch)
-    system
-  else
-    :"#{standardized_arch}_#{system}"
-  end
-end
-
-
- -
-

- - #valid_combination?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-226
-227
-228
-229
-230
-231
-232
-
-
# File 'utils/bottles.rb', line 226
-
-def valid_combination?
-  return true unless [:arm64, :arm].include? arch
-  return false if linux?
-
-  # Big Sur is the first version of macOS that runs on ARM
-  to_macos_version >= :big_sur
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Bottles/TagSpecification.html b/docs/Utils/Bottles/TagSpecification.html deleted file mode 100644 index ae46f9fdc..000000000 --- a/docs/Utils/Bottles/TagSpecification.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - Class: Utils::Bottles::TagSpecification - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Utils::Bottles::TagSpecification - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/bottles.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

The specification for a specific tag

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(tag:, checksum:, cellar:) ⇒ TagSpecification - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of TagSpecification.

- - -
-
-
- - -
- - - - -
-
-
-
-268
-269
-270
-271
-272
-
-
# File 'utils/bottles.rb', line 268
-
-def initialize(tag:, checksum:, cellar:)
-  @tag = tag
-  @checksum = checksum
-  @cellar = cellar
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #cellarSymbol, String (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-266
-267
-268
-
-
# File 'utils/bottles.rb', line 266
-
-def cellar
-  @cellar
-end
-
-
- - - -
-

- - #checksumChecksum (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-263
-264
-265
-
-
# File 'utils/bottles.rb', line 263
-
-def checksum
-  @checksum
-end
-
-
- - - -
-

- - #tagUtils::Bottles::Tag (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-260
-261
-262
-
-
# File 'utils/bottles.rb', line 260
-
-def tag
-  @tag
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Curl.html b/docs/Utils/Curl.html deleted file mode 100644 index d79aeade5..000000000 --- a/docs/Utils/Curl.html +++ /dev/null @@ -1,2683 +0,0 @@ - - - - - - - Module: Utils::Curl - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Curl - - - Private -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - -
-
Includes:
-
Kernel, SystemCommand::Mixin
-
- - - - -
-
Included in:
-
Cask::Audit, CurlDownloadStrategy, Homebrew::FormulaAuditor, Homebrew::Livecheck::Strategy, Homebrew::ResourceAuditor
-
- - - -
-
Defined in:
-
utils/curl.rb,
- utils/curl.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .clear_path_cacheObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'utils/curl.rb', line 53
-
-def clear_path_cache
-  @curl_path = nil
-end
-
-
- -
-

- - .curl(*args, print_stdout: true, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-185
-186
-187
-188
-189
-
-
# File 'utils/curl.rb', line 185
-
-def curl(*args, print_stdout: true, **options)
-  result = curl_with_workarounds(*args, print_stdout:, **options)
-  result.assert_success!
-  result
-end
-
-
- -
-

- - .curl_args(*extra_args, connect_timeout: nil, max_time: nil, retries: Homebrew::EnvConfig.curl_retries.to_i, retry_max_time: nil, show_output: false, show_error: true, user_agent: nil, referer: nil) ⇒ Array<T.untyped> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - extra_args - - - (T.untyped) - - - -
  • - -
  • - - connect_timeout - - - (Integer, Float, nil) - - - (defaults to: nil) - - -
  • - -
  • - - max_time - - - (Integer, Float, nil) - - - (defaults to: nil) - - -
  • - -
  • - - retries - - - (Integer, nil) - - - (defaults to: Homebrew::EnvConfig.curl_retries.to_i) - - -
  • - -
  • - - retry_max_time - - - (Integer, Float, nil) - - - (defaults to: nil) - - -
  • - -
  • - - show_output - - - (Boolean, nil) - - - (defaults to: false) - - -
  • - -
  • - - show_error - - - (Boolean, nil) - - - (defaults to: true) - - -
  • - -
  • - - user_agent - - - (String, Symbol, nil) - - - (defaults to: nil) - - -
  • - -
  • - - referer - - - (String, nil) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array<T.untyped>) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
-
# File 'utils/curl.rb', line 70
-
-def curl_args(
-  *extra_args,
-  connect_timeout: nil,
-  max_time: nil,
-  retries: Homebrew::EnvConfig.curl_retries.to_i,
-  retry_max_time: nil,
-  show_output: false,
-  show_error: true,
-  user_agent: nil,
-  referer: nil
-)
-  args = []
-
-  # do not load .curlrc unless requested (must be the first argument)
-  curlrc = Homebrew::EnvConfig.curlrc
-  if curlrc&.start_with?("/")
-    # If the file exists, we still want to disable loading the default curlrc.
-    args << "--disable" << "--config" << curlrc
-  elsif curlrc
-    # This matches legacy behavior: `HOMEBREW_CURLRC` was a bool,
-    # omitting `--disable` when present.
-  else
-    args << "--disable"
-  end
-
-  # echo any cookies received on a redirect
-  args << "--cookie" << "/dev/null"
-
-  args << "--globoff"
-
-  args << "--show-error" if show_error
-
-  args << "--user-agent" << case user_agent
-  when :browser, :fake
-    HOMEBREW_USER_AGENT_FAKE_SAFARI
-  when :default, nil
-    HOMEBREW_USER_AGENT_CURL
-  when String
-    user_agent
-  else
-    raise TypeError, ":user_agent must be :browser/:fake, :default, or a String"
-  end
-
-  args << "--header" << "Accept-Language: en"
-
-  if show_output != true
-    args << "--fail"
-    args << "--progress-bar" unless Context.current.verbose?
-    args << "--verbose" if Homebrew::EnvConfig.curl_verbose?
-    args << "--silent" if !$stdout.tty? || Context.current.quiet?
-  end
-
-  args << "--connect-timeout" << connect_timeout.round(3) if connect_timeout.present?
-  args << "--max-time" << max_time.round(3) if max_time.present?
-
-  # A non-positive integer (e.g. 0) or `nil` will omit this argument
-  args << "--retry" << retries if retries&.positive?
-
-  args << "--retry-max-time" << retry_max_time.round if retry_max_time.present?
-
-  args << "--referer" << referer if referer.present?
-
-  args + extra_args
-end
-
-
- -
-

- - .curl_check_http_content(url, url_type, specs: {}, user_agents: [:default], referer: nil, check_content: false, strict: false, use_homebrew_curl: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-
-
# File 'utils/curl.rb', line 283
-
-def curl_check_http_content(url, url_type, specs: {}, user_agents: [:default], referer: nil,
-                            check_content: false, strict: false, use_homebrew_curl: false)
-  return unless url.start_with? "http"
-
-  secure_url = url.sub(/\Ahttp:/, "https:")
-  secure_details = T.let(nil, T.nilable(T::Hash[Symbol, T.untyped]))
-  hash_needed = T.let(false, T::Boolean)
-  if url != secure_url
-    user_agents.each do |user_agent|
-      secure_details = begin
-        curl_http_content_headers_and_checksum(
-          secure_url,
-          specs:,
-          hash_needed:       true,
-          use_homebrew_curl:,
-          user_agent:,
-          referer:,
-        )
-      rescue Timeout::Error
-        next
-      end
-
-      next unless http_status_ok?(secure_details[:status_code])
-
-      hash_needed = true
-      user_agents = [user_agent]
-      break
-    end
-  end
-
-  details = T.let(nil, T.nilable(T::Hash[Symbol, T.untyped]))
-  attempts = 0
-  user_agents.each do |user_agent|
-    loop do
-      details = curl_http_content_headers_and_checksum(
-        url,
-        specs:,
-        hash_needed:,
-        use_homebrew_curl:,
-        user_agent:,
-        referer:,
-      )
-
-      # Retry on network issues
-      break if details[:exit_status] != 52 && details[:exit_status] != 56
-
-      attempts += 1
-      break if attempts >= Homebrew::EnvConfig.curl_retries.to_i
-    end
-
-    break if http_status_ok?(details[:status_code])
-  end
-
-  return "The #{url_type} #{url} is not reachable" unless details[:status_code]
-
-  unless http_status_ok?(details[:status_code])
-    return if details[:responses].any? do |response|
-      url_protected_by_cloudflare?(response) || url_protected_by_incapsula?(response)
-    end
-
-    # https://github.com/Homebrew/brew/issues/13789
-    # If the `:homepage` of a formula is private, it will fail an `audit`
-    # since there's no way to specify a `strategy` with `using:` and
-    # GitHub does not authorize access to the web UI using token
-    #
-    # Strategy:
-    # If the `:homepage` 404s, it's a GitHub link and we have a token then
-    # check the API (which does use tokens) for the repository
-    repo_details = url.match(%r{https?://github\.com/(?<user>[^/]+)/(?<repo>[^/]+)/?.*})
-    check_github_api = url_type == SharedAudits::URL_TYPE_HOMEPAGE &&
-                       details[:status_code] == "404" &&
-                       repo_details &&
-                       Homebrew::EnvConfig.github_api_token
-
-    unless check_github_api
-      return "The #{url_type} #{url} is not reachable (HTTP status code #{details[:status_code]})"
-    end
-
-    "Unable to find homepage" if SharedAudits.github_repo_data(repo_details[:user], repo_details[:repo]).nil?
-  end
-
-  if url.start_with?("https://") && Homebrew::EnvConfig.no_insecure_redirect? &&
-     (details[:final_url].present? && !details[:final_url].start_with?("https://"))
-    return "The #{url_type} #{url} redirects back to HTTP"
-  end
-
-  return unless secure_details
-
-  return if !http_status_ok?(details[:status_code]) || !http_status_ok?(secure_details[:status_code])
-
-  etag_match = details[:etag] &&
-               details[:etag] == secure_details[:etag]
-  content_length_match =
-    details[:content_length] &&
-    details[:content_length] == secure_details[:content_length]
-  file_match = details[:file_hash] == secure_details[:file_hash]
-
-  http_with_https_available =
-    url.start_with?("http://") &&
-    (secure_details[:final_url].present? && secure_details[:final_url].start_with?("https://"))
-
-  if (etag_match || content_length_match || file_match) && http_with_https_available
-    return "The #{url_type} #{url} should use HTTPS rather than HTTP"
-  end
-
-  return unless check_content
-
-  no_protocol_file_contents = %r{https?:\\?/\\?/}
-  http_content = details[:file]&.scrub&.gsub(no_protocol_file_contents, "/")
-  https_content = secure_details[:file]&.scrub&.gsub(no_protocol_file_contents, "/")
-
-  # Check for the same content after removing all protocols
-  if (http_content && https_content) && (http_content == https_content) && http_with_https_available
-    return "The #{url_type} #{url} should use HTTPS rather than HTTP"
-  end
-
-  return unless strict
-
-  # Same size, different content after normalization
-  # (typical causes: Generated ID, Timestamp, Unix time)
-  if http_content.length == https_content.length
-    return "The #{url_type} #{url} may be able to use HTTPS rather than HTTP. Please verify it in a browser."
-  end
-
-  lenratio = (https_content.length * 100 / http_content.length).to_i
-  return unless (90..110).cover?(lenratio)
-
-  "The #{url_type} #{url} may be able to use HTTPS rather than HTTP. Please verify it in a browser."
-end
-
-
- -
-

- - .curl_download(*args, to: nil, try_partial: false, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-
-
# File 'utils/curl.rb', line 191
-
-def curl_download(*args, to: nil, try_partial: false, **options)
-  destination = Pathname(to)
-  destination.dirname.mkpath
-
-  args = ["--location", *args]
-
-  if try_partial && destination.exist?
-    headers = begin
-      parsed_output = curl_headers(*args, **options, wanted_headers: ["accept-ranges"])
-      parsed_output.fetch(:responses).last&.fetch(:headers) || {}
-    rescue ErrorDuringExecution
-      # Ignore errors here and let actual download fail instead.
-      {}
-    end
-
-    # Any value for `Accept-Ranges` other than `none` indicates that the server
-    # supports partial requests. Its absence indicates no support.
-    supports_partial = headers.fetch("accept-ranges", "none") != "none"
-    content_length = headers["content-length"]&.to_i
-
-    if supports_partial
-      # We've already downloaded all bytes.
-      return if destination.size == content_length
-
-      args = ["--continue-at", "-", *args]
-    end
-  end
-
-  args = ["--remote-time", "--output", destination, *args]
-
-  curl(*args, **options)
-end
-
-
- -
-

- - .curl_executable(use_homebrew_curl: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-
-
# File 'utils/curl.rb', line 43
-
-def curl_executable(use_homebrew_curl: false)
-  return HOMEBREW_BREWED_CURL_PATH if use_homebrew_curl
-
-  @curl_executable ||= HOMEBREW_SHIMS_PATH/"shared/curl"
-end
-
-
- -
-

- - .curl_headers(*args, wanted_headers: [], **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-
-
# File 'utils/curl.rb', line 228
-
-def curl_headers(*args, wanted_headers: [], **options)
-  [[], ["--request", "GET"]].each do |request_args|
-    result = curl_output(
-      "--fail", "--location", "--silent", "--head", *request_args, *args,
-      **options
-    )
-
-    # We still receive usable headers with certain non-successful exit
-    # statuses, so we special case them below.
-    if result.success? ||
-       [CURL_WEIRD_SERVER_REPLY_EXIT_CODE, CURL_HTTP_RETURNED_ERROR_EXIT_CODE].include?(result.exit_status)
-      parsed_output = parse_curl_output(result.stdout)
-
-      if request_args.empty?
-        # If we didn't get any wanted header yet, retry using `GET`.
-        next if wanted_headers.any? &&
-                parsed_output.fetch(:responses).none? { |r| (r.fetch(:headers).keys & wanted_headers).any? }
-
-        # Some CDNs respond with 400 codes for `HEAD` but resolve with `GET`.
-        next if (400..499).cover?(parsed_output.fetch(:responses).last&.fetch(:status_code).to_i)
-      end
-
-      return parsed_output if result.success? ||
-                              result.exit_status == CURL_WEIRD_SERVER_REPLY_EXIT_CODE
-    end
-
-    result.assert_success!
-  end
-end
-
-
- -
-

- - .curl_http_content_headers_and_checksum(url, specs: {}, hash_needed: false, use_homebrew_curl: false, user_agent: :default, referer: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-
-
# File 'utils/curl.rb', line 413
-
-def curl_http_content_headers_and_checksum(
-  url, specs: {}, hash_needed: false,
-  use_homebrew_curl: false, user_agent: :default, referer: nil
-)
-  file = Tempfile.new.tap(&:close)
-
-  # Convert specs to options. This is mostly key-value options,
-  # unless the value is a boolean in which case treat as as flag.
-  specs = specs.flat_map do |option, argument|
-    next [] if argument == false # No flag.
-
-    args = ["--#{option.to_s.tr("_", "-")}"]
-    args << argument if argument != true # It's a flag.
-    args
-  end
-
-  max_time = hash_needed ? 600 : 25
-  output, _, status = curl_output(
-    *specs, "--dump-header", "-", "--output", file.path, "--location", url,
-    use_homebrew_curl:,
-    connect_timeout:   15,
-    max_time:,
-    retry_max_time:    max_time,
-    user_agent:,
-    referer:
-  )
-
-  parsed_output = parse_curl_output(output)
-  responses = parsed_output[:responses]
-
-  final_url = curl_response_last_location(responses)
-  headers = if responses.last.present?
-    status_code = responses.last[:status_code]
-    responses.last[:headers]
-  else
-    {}
-  end
-  etag = headers["etag"][ETAG_VALUE_REGEX, 1] if headers["etag"].present?
-  content_length = headers["content-length"]
-
-  if status.success?
-    open_args = {}
-    # Try to get encoding from Content-Type header
-    # TODO: add guessing encoding by <meta http-equiv="Content-Type" ...> tag
-    if (content_type = headers["content-type"]) &&
-       (match = content_type.match(/;\s*charset\s*=\s*([^\s]+)/)) &&
-       (charset = match[1])
-      begin
-        open_args[:encoding] = Encoding.find(charset)
-      rescue ArgumentError
-        # Unknown charset in Content-Type header
-      end
-    end
-    file_contents = File.read(T.must(file.path), **open_args)
-    file_hash = Digest::SHA256.hexdigest(file_contents) if hash_needed
-  end
-
-  {
-    url:,
-    final_url:,
-    exit_status:    status.exitstatus,
-    status_code:,
-    headers:,
-    etag:,
-    content_length:,
-    file:           file_contents,
-    file_hash:,
-    responses:,
-  }
-ensure
-  T.must(file).unlink
-end
-
-
- -
-

- - .curl_output(*args, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-224
-225
-226
-
-
# File 'utils/curl.rb', line 224
-
-def curl_output(*args, **options)
-  curl_with_workarounds(*args, print_stderr: false, show_output: true, **options)
-end
-
-
- -
-

- - .curl_pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'utils/curl.rb', line 49
-
-def curl_path
-  @curl_path ||= Utils.popen_read(curl_executable, "--homebrew=print-path").chomp.presence
-end
-
-
- -
-

- - .curl_response_follow_redirections(responses, base_url) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the final URL by following location headers in cURL responses.

- - -
-
-
-

Parameters:

-
    - -
  • - - responses - - - (Array<Hash{Symbol => T.untyped}>) - - - - — -

    An array of hashes containing response -status information and headers from #parse_curl_response.

    -
    - -
  • - -
  • - - base_url - - - (String) - - - - — -

    The URL to use as a base.

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    The final absolute URL after redirections.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-
-
# File 'utils/curl.rb', line 579
-
-def curl_response_follow_redirections(responses, base_url)
-  responses.each do |response|
-    next if response[:headers].blank?
-
-    location = response[:headers]["location"]
-    next if location.blank?
-
-    base_url = URI.join(base_url, location).to_s
-  end
-
-  base_url
-end
-
-
- -
-

- - .curl_response_last_location(responses, absolutize: false, base_url: nil) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns the URL from the last location header found in cURL responses, -if any.

- - -
-
-
-

Parameters:

-
    - -
  • - - responses - - - (Array<Hash{Symbol => T.untyped}>) - - - - — -

    An array of hashes containing response -status information and headers from #parse_curl_response.

    -
    - -
  • - -
  • - - absolutize - - - (Boolean) - - - (defaults to: false) - - - — -

    Whether to make the location URL absolute.

    -
    - -
  • - -
  • - - base_url - - - (String, nil) - - - (defaults to: nil) - - - — -

    The URL to use as a base for making the -location URL absolute.

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - - — -

    The URL from the last-occurring location header -in the responses or nil (if no location headers found).

    -
    - -
  • - -
- -
- - - - -
-
-
-
-554
-555
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-
-
# File 'utils/curl.rb', line 554
-
-def curl_response_last_location(responses, absolutize: false, base_url: nil)
-  responses.reverse_each do |response|
-    next if response[:headers].blank?
-
-    location = response[:headers]["location"]
-    next if location.blank?
-
-    absolute_url = URI.join(base_url, location).to_s if absolutize && base_url.present?
-    return absolute_url || location
-  end
-
-  nil
-end
-
-
- -
-

- - .curl_supports_fail_with_body?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-486
-487
-488
-489
-490
-491
-
-
# File 'utils/curl.rb', line 486
-
-def curl_supports_fail_with_body?
-  @curl_supports_fail_with_body ||= Hash.new do |h, key|
-    h[key] = Version.new(curl_output("-V").stdout[/curl (\d+(\.\d+)+)/, 1]) >= Version.new("7.76.0")
-  end
-  @curl_supports_fail_with_body[curl_path]
-end
-
-
- -
-

- - .curl_supports_tls13?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-493
-494
-495
-496
-497
-498
-
-
# File 'utils/curl.rb', line 493
-
-def curl_supports_tls13?
-  @curl_supports_tls13 ||= Hash.new do |h, key|
-    h[key] = quiet_system(curl_executable, "--tlsv1.3", "--head", "https://brew.sh/")
-  end
-  @curl_supports_tls13[curl_path]
-end
-
-
- -
-

- - .curl_with_workarounds(*args, secrets: nil, print_stdout: nil, print_stderr: nil, debug: nil, verbose: nil, env: {}, timeout: nil, use_homebrew_curl: false, **options) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

-
    - -
  • - - - (Timeout::Error) - - - -
  • - -
- -
- - - - -
-
-
-
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-
-
# File 'utils/curl.rb', line 135
-
-def curl_with_workarounds(
-  *args,
-  secrets: nil, print_stdout: nil, print_stderr: nil, debug: nil,
-  verbose: nil, env: {}, timeout: nil, use_homebrew_curl: false, **options
-)
-  end_time = Time.now + timeout if timeout
-
-  command_options = {
-    secrets:,
-    print_stdout:,
-    print_stderr:,
-    debug:,
-    verbose:,
-  }.compact
-
-  result = system_command curl_executable(use_homebrew_curl:),
-                          args:    curl_args(*args, **options),
-                          env:,
-                          timeout: Utils::Timer.remaining(end_time),
-                          **command_options
-
-  return result if result.success? || args.include?("--http1.1")
-
-  raise Timeout::Error, result.stderr.lines.last.chomp if timeout && result.status.exitstatus == 28
-
-  # Error in the HTTP2 framing layer
-  if result.exit_status == 16
-    return curl_with_workarounds(
-      *args, "--http1.1",
-      timeout: Utils::Timer.remaining(end_time), **command_options, **options
-    )
-  end
-
-  # This is a workaround for https://github.com/curl/curl/issues/1618.
-  if result.exit_status == 56 # Unexpected EOF
-    out = curl_output("-V").stdout
-
-    # If `curl` doesn't support HTTP2, the exception is unrelated to this bug.
-    return result unless out.include?("HTTP2")
-
-    # The bug is fixed in `curl` >= 7.60.0.
-    curl_version = out[/curl (\d+(\.\d+)+)/, 1]
-    return result if Gem::Version.new(curl_version) >= Gem::Version.new("7.60.0")
-
-    return curl_with_workarounds(*args, "--http1.1", **command_options, **options)
-  end
-
-  result
-end
-
-
- -
-

- - .http_status_ok?(status) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-500
-501
-502
-
-
# File 'utils/curl.rb', line 500
-
-def http_status_ok?(status)
-  (100..299).cover?(status.to_i)
-end
-
-
- -
-

- - .parse_curl_output(output, max_iterations: 25) ⇒ Hash{Symbol => T.untyped} - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Separates the output text from curl into an array of HTTP responses and -the final response body (i.e. content). Response hashes contain the -:status_code, :status_text and :headers.

- - -
-
-
-

Parameters:

-
    - -
  • - - output - - - (String) - - - - — -

    The output text from curl containing HTTP -responses, body content, or both.

    -
    - -
  • - -
  • - - max_iterations - - - (Integer) - - - (defaults to: 25) - - - — -

    The maximum number of iterations for the -while loop that parses HTTP response text. This should correspond to -the maximum number of requests in the output. If curl's --max-redirs -option is used, max_iterations should be max-redirs + 1, to -account for any final response after the redirections.

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Hash{Symbol => T.untyped}) - - - - — -

    A hash containing an array of response hashes and the body -content, if found.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-517
-518
-519
-520
-521
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-535
-536
-
-
# File 'utils/curl.rb', line 517
-
-def parse_curl_output(output, max_iterations: 25)
-  responses = []
-
-  iterations = 0
-  output = output.lstrip
-  while output.match?(%r{\AHTTP/[\d.]+ \d+}) && output.include?(HTTP_RESPONSE_BODY_SEPARATOR)
-    iterations += 1
-    raise "Too many redirects (max = #{max_iterations})" if iterations > max_iterations
-
-    response_text, _, output = output.partition(HTTP_RESPONSE_BODY_SEPARATOR)
-    output = output.lstrip
-    next if response_text.blank?
-
-    response_text.chomp!
-    response = parse_curl_response(response_text)
-    responses << response if response.present?
-  end
-
-  { responses:, body: output }
-end
-
-
- -
-

- - .url_protected_by_cloudflare?(response) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if a URL is protected by CloudFlare (e.g. badlion.net and jaxx.io).

- - -
-
-
-

Parameters:

-
    - -
  • - - response - - - (Hash{Symbol => T.untyped}) - - - - — -

    A response hash from #parse_curl_response.

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    Whether a response contains headers indicating that -the URL is protected by Cloudflare.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-263
-264
-265
-266
-267
-268
-
-
# File 'utils/curl.rb', line 263
-
-def url_protected_by_cloudflare?(response)
-  return false if response[:headers].blank?
-  return false unless [403, 503].include?(response[:status_code].to_i)
-
-  [*response[:headers]["server"]].any? { |server| server.match?(/^cloudflare/i) }
-end
-
-
- -
-

- - .url_protected_by_incapsula?(response) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if a URL is protected by Incapsula (e.g. corsair.com).

- - -
-
-
-

Parameters:

-
    - -
  • - - response - - - (Hash{Symbol => T.untyped}) - - - - — -

    A response hash from #parse_curl_response.

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    Whether a response contains headers indicating that -the URL is protected by Incapsula.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-275
-276
-277
-278
-279
-280
-281
-
-
# File 'utils/curl.rb', line 275
-
-def url_protected_by_incapsula?(response)
-  return false if response[:headers].blank?
-  return false if response[:status_code].to_i != 403
-
-  set_cookie_header = Array(response[:headers]["set-cookie"])
-  set_cookie_header.compact.any? { |cookie| cookie.match?(/^(visid_incap|incap_ses)_/i) }
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Git.html b/docs/Utils/Git.html deleted file mode 100644 index 8da832676..000000000 --- a/docs/Utils/Git.html +++ /dev/null @@ -1,1379 +0,0 @@ - - - - - - - Module: Utils::Git - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Git - - - Private -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
utils/git.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for querying Git information.

- - -
-
-
- - -

See Also:

- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .available?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'utils/git.rb', line 13
-
-def self.available?
-  version.present?
-end
-
-
- -
-

- - .cherry_pick!(repo, *args, resolve: false, verbose: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Special case of git cherry-pick that permits non-verbose output and -optional resolution on merge conflict.

- - -
-
-
- - -
- - - - -
-
-
-
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-
-
# File 'utils/git.rb', line 137
-
-def self.cherry_pick!(repo, *args, resolve: false, verbose: false)
-  cmd = [git, "-C", repo, "cherry-pick"] + args
-  output = Utils.popen_read(*cmd, err: :out)
-  if $CHILD_STATUS.success?
-    puts output if verbose
-    output
-  else
-    system git, "-C", repo, "cherry-pick", "--abort" unless resolve
-    raise ErrorDuringExecution.new(cmd, status: $CHILD_STATUS, output: [[:stdout, output]])
-  end
-end
-
-
- -
-

- - .clear_available_cacheObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-46
-47
-
-
# File 'utils/git.rb', line 43
-
-def self.clear_available_cache
-  remove_instance_variable(:@version) if defined?(@version)
-  remove_instance_variable(:@path) if defined?(@path)
-  remove_instance_variable(:@git) if defined?(@git)
-end
-
-
- -
-

- - .ensure_installed!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-
-
# File 'utils/git.rb', line 96
-
-def self.ensure_installed!
-  return if available?
-
-  # we cannot install brewed git if homebrew/core is unavailable.
-  if CoreTap.instance.installed?
-    begin
-      # Otherwise `git` will be installed from source in tests that need it. This is slow
-      # and will also likely fail due to `OS::Linux` and `OS::Mac` being undefined.
-      raise "Refusing to install Git on a generic OS." if ENV["HOMEBREW_TEST_GENERIC_OS"]
-
-      ensure_formula_installed!("git")
-      clear_available_cache
-    rescue
-      raise "Git is unavailable"
-    end
-  end
-
-  raise "Git is unavailable" unless available?
-end
-
-
- -
-

- - .file_at_commit(repo, file, commit) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-90
-91
-92
-93
-94
-
-
# File 'utils/git.rb', line 90
-
-def self.file_at_commit(repo, file, commit)
-  relative_file = Pathname(file)
-  relative_file = relative_file.relative_path_from(repo) if relative_file.absolute?
-  Utils.popen_read(git, "-C", repo, "show", "#{commit}:#{relative_file}")
-end
-
-
- -
-

- - .gitObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-
-
# File 'utils/git.rb', line 31
-
-def self.git
-  return @git if defined?(@git)
-
-  @git = HOMEBREW_SHIMS_PATH/"shared/git"
-end
-
-
- -
-

- - .last_revision_commit_of_file(repo, file, before_commit: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'utils/git.rb', line 49
-
-def self.last_revision_commit_of_file(repo, file, before_commit: nil)
-  args = if before_commit.nil?
-    ["--skip=1"]
-  else
-    [before_commit.split("..").first]
-  end
-
-  Utils.popen_read(git, "-C", repo, "log", "--format=%h", "--abbrev=7", "--max-count=1", *args, "--", file).chomp
-end
-
-
- -
-

- - .last_revision_commit_of_files(repo, files, before_commit: nil) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'utils/git.rb', line 59
-
-def self.last_revision_commit_of_files(repo, files, before_commit: nil)
-  args = if before_commit.nil?
-    ["--skip=1"]
-  else
-    [before_commit.split("..").first]
-  end
-
-  # git log output format:
-  #   <commit_hash>
-  #   <file_path1>
-  #   <file_path2>
-  #   ...
-  # return [<commit_hash>, [file_path1, file_path2, ...]]
-  rev, *paths = Utils.popen_read(
-    git, "-C", repo, "log",
-    "--pretty=format:%h", "--abbrev=7", "--max-count=1",
-    "--diff-filter=d", "--name-only", *args, "--", *files
-  ).lines.map(&:chomp).reject(&:empty?)
-  [rev, paths]
-end
-
-
- -
-

- - .last_revision_of_file(repo, file, before_commit: nil) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-85
-86
-87
-88
-
-
# File 'utils/git.rb', line 84
-
-def self.last_revision_of_file(repo, file, before_commit: nil)
-  relative_file = Pathname(file).relative_path_from(repo)
-  commit_hash = last_revision_commit_of_file(repo, relative_file, before_commit:)
-  file_at_commit(repo, file, commit_hash)
-end
-
-
- -
-

- - .pathObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-
-
# File 'utils/git.rb', line 24
-
-def self.path
-  return unless available?
-  return @path if defined?(@path)
-
-  @path = Utils.popen_read(git, "--homebrew=print-path").chomp.presence
-end
-
-
- -
-

- - .remote_exists?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-
-
# File 'utils/git.rb', line 37
-
-def self.remote_exists?(url)
-  return true unless available?
-
-  quiet_system "git", "ls-remote", url
-end
-
-
- -
-

- - .set_name_email!(author: true, committer: true) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-
-
# File 'utils/git.rb', line 116
-
-def self.set_name_email!(author: true, committer: true)
-  if Homebrew::EnvConfig.git_name
-    ENV["GIT_AUTHOR_NAME"] = Homebrew::EnvConfig.git_name if author
-    ENV["GIT_COMMITTER_NAME"] = Homebrew::EnvConfig.git_name if committer
-  end
-
-  return unless Homebrew::EnvConfig.git_email
-
-  ENV["GIT_AUTHOR_EMAIL"] = Homebrew::EnvConfig.git_email if author
-  ENV["GIT_COMMITTER_EMAIL"] = Homebrew::EnvConfig.git_email if committer
-end
-
-
- -
-

- - .setup_gpg!Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-128
-129
-130
-131
-132
-133
-
-
# File 'utils/git.rb', line 128
-
-def self.setup_gpg!
-  gnupg_bin = HOMEBREW_PREFIX/"opt/gnupg/bin"
-  return unless gnupg_bin.directory?
-
-  ENV["PATH"] = PATH.new(ENV.fetch("PATH")).prepend(gnupg_bin).to_s
-end
-
-
- -
-

- - .supports_partial_clone_sparse_checkout?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-149
-150
-151
-152
-153
-
-
# File 'utils/git.rb', line 149
-
-def self.supports_partial_clone_sparse_checkout?
-  # There is some support for partial clones prior to 2.20, but we avoid using it
-  # due to performance issues
-  Version.new(version) >= Version.new("2.20.0")
-end
-
-
- -
-

- - .versionObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-
-
# File 'utils/git.rb', line 17
-
-def self.version
-  return @version if defined?(@version)
-
-  stdout, _, status = system_command(git, args: ["--version"], verbose: false, print_stderr: false)
-  @version = status.success? ? stdout.chomp[/git version (\d+(?:\.\d+)*)/, 1] : nil
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Gzip.html b/docs/Utils/Gzip.html deleted file mode 100644 index 0deb6feab..000000000 --- a/docs/Utils/Gzip.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - - Module: Utils::Gzip - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Gzip - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/gzip.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for creating gzip files.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .compress(*paths, reproducible: true, mtime: ENV["SOURCE_DATE_EPOCH"].to_i) ⇒ Array<Pathname> - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - paths - - - (String, Pathname) - - - -
  • - -
  • - - reproducible - - - (Boolean) - - - (defaults to: true) - - -
  • - -
  • - - mtime - - - (Integer, Time) - - - (defaults to: ENV["SOURCE_DATE_EPOCH"].to_i) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-
-
# File 'utils/gzip.rb', line 54
-
-def self.compress(*paths, reproducible: true, mtime: ENV["SOURCE_DATE_EPOCH"].to_i)
-  if reproducible
-    paths.map do |path|
-      compress_with_options(path, mtime:)
-    end
-  else
-    paths.map do |path|
-      safe_system "gzip", path
-      Pathname.new("#{path}.gz")
-    end
-  end
-end
-
-
- -
-

- - .compress_with_options(path, mtime: ENV["SOURCE_DATE_EPOCH"].to_i, orig_name: File.basename(path), output: "#{path}.gz") ⇒ Pathname - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String, Pathname) - - - -
  • - -
  • - - mtime - - - (Integer, Time) - - - (defaults to: ENV["SOURCE_DATE_EPOCH"].to_i) - - -
  • - -
  • - - orig_name - - - (String) - - - (defaults to: File.basename(path)) - - -
  • - -
  • - - output - - - (String, Pathname) - - - (defaults to: "#{path}.gz") - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'utils/gzip.rb', line 19
-
-def self.compress_with_options(path, mtime: ENV["SOURCE_DATE_EPOCH"].to_i, orig_name: File.basename(path),
-                               output: "#{path}.gz")
-  # Ideally, we would just set mtime = 0 if SOURCE_DATE_EPOCH is absent, but Ruby's
-  # Zlib::GzipWriter does not properly handle the case of setting mtime = 0:
-  # https://bugs.ruby-lang.org/issues/16285
-  #
-  # This was fixed in https://github.com/ruby/zlib/pull/10. Remove workaround
-  # once we are using zlib gem version 1.1.0 or newer.
-  if mtime.to_i.zero?
-    odebug "Setting `mtime = 1` to avoid zlib gem bug when `mtime == 0`."
-    mtime = 1
-  end
-
-  File.open(path, "rb") do |fp|
-    odebug "Creating gzip file at #{output}"
-    gz = Zlib::GzipWriter.open(output)
-    gz.mtime = mtime
-    gz.orig_name = orig_name
-    gz.write(fp.read(GZIP_BUFFER_SIZE)) until fp.eof?
-  ensure
-    # GzipWriter should be closed in case of error as well
-    gz.close
-  end
-
-  FileUtils.rm_f path
-  Pathname.new(output)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Inreplace.html b/docs/Utils/Inreplace.html deleted file mode 100644 index 8d2565ad3..000000000 --- a/docs/Utils/Inreplace.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - Module: Utils::Inreplace - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Inreplace - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/inreplace.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for replacing text in files in-place.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Error - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .inreplace(paths, before = nil, after = nil, audit_result: true, &block) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Sometimes we have to change a bit before we install. Mostly we -prefer a patch, but if you need the prefix of -this formula in the patch you have to resort to inreplace, -because in the patch you don't have access to any variables -defined by the formula, as only HOMEBREW_PREFIX is available -in the embedded patch.

- -

Examples

- -

inreplace supports regular expressions:

- -
inreplace "somefile.cfg", /look[for]what?/, "replace by #{bin}/tool"
-
- -

inreplace supports blocks:

- -
inreplace "Makefile" do |s|
-  s.gsub! "/usr/local", HOMEBREW_PREFIX.to_s
-end
-
- - -
-
-
-

Parameters:

- - -

Raises:

- - -

See Also:

- - -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-
-
# File 'utils/inreplace.rb', line 53
-
-def self.inreplace(paths, before = nil, after = nil, audit_result: true, &block)
-  paths = Array(paths)
-  after &&= after.to_s
-  before = before.to_s if before.is_a?(Pathname)
-
-  errors = {}
-
-  errors["`paths` (first) parameter"] = ["`paths` was empty"] if paths.all?(&:blank?)
-
-  paths.each do |path|
-    str = File.binread(path)
-    s = StringInreplaceExtension.new(str)
-
-    if before.nil? && after.nil?
-      raise ArgumentError, "Must supply a block or before/after params" unless block
-
-      yield s
-    else
-      s.gsub!(T.must(before), T.must(after), audit_result)
-    end
-
-    errors[path] = s.errors unless s.errors.empty?
-
-    Pathname(path).atomic_write(s.inreplace_string)
-  end
-
-  raise Utils::Inreplace::Error, errors if errors.present?
-end
-
-
- -
-

- - .inreplace_pairs(path, replacement_pairs, read_only_run: false, silent: false) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Raises:

- - -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-
-
# File 'utils/inreplace.rb', line 82
-
-def self.inreplace_pairs(path, replacement_pairs, read_only_run: false, silent: false)
-  str = File.binread(path)
-  contents = StringInreplaceExtension.new(str)
-  replacement_pairs.each do |old, new|
-    ohai "replace #{old.inspect} with #{new.inspect}" unless silent
-    unless old
-      contents.errors << "No old value for new value #{new}! Did you pass the wrong arguments?"
-      next
-    end
-
-    contents.gsub!(old, new)
-  end
-  raise Utils::Inreplace::Error, path => contents.errors if contents.errors.present?
-
-  Pathname(path).atomic_write(contents.inreplace_string) unless read_only_run
-  contents.inreplace_string
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Inreplace/Error.html b/docs/Utils/Inreplace/Error.html deleted file mode 100644 index 876eecde3..000000000 --- a/docs/Utils/Inreplace/Error.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - Exception: Utils::Inreplace::Error - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Utils::Inreplace::Error - - - Private -

-
- -
-
Inherits:
-
- RuntimeError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/inreplace.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Error during text replacement.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(errors) ⇒ Error - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of Error.

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-
-
# File 'utils/inreplace.rb', line 11
-
-def initialize(errors)
-  formatted_errors = errors.reduce(+"inreplace failed\n") do |s, (path, errs)|
-    s << "#{path}:\n" << errs.map { |e| "  #{e}\n" }.join
-  end
-  super formatted_errors.freeze
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Link.html b/docs/Utils/Link.html deleted file mode 100644 index 3f2a461cd..000000000 --- a/docs/Utils/Link.html +++ /dev/null @@ -1,468 +0,0 @@ - - - - - - - Module: Utils::Link - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Link - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/link.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for creating symlinks.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-63
-64
-65
-66
-67
-
-
# File 'utils/link.rb', line 63
-
-def self.link_completions(path, command)
-  link_src_dst_dirs(path/"completions/bash", HOMEBREW_PREFIX/"etc/bash_completion.d", command)
-  link_src_dst_dirs(path/"completions/zsh", HOMEBREW_PREFIX/"share/zsh/site-functions", command)
-  link_src_dst_dirs(path/"completions/fish", HOMEBREW_PREFIX/"share/fish/vendor_completions.d", command)
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-75
-76
-77
-
-
# File 'utils/link.rb', line 75
-
-def self.link_docs(path, command)
-  link_src_dst_dirs(path/"docs", HOMEBREW_PREFIX/"share/doc/homebrew", command, link_dir: true)
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-55
-56
-57
-
-
# File 'utils/link.rb', line 55
-
-def self.link_manpages(path, command)
-  link_src_dst_dirs(path/"manpages", HOMEBREW_PREFIX/"share/man/man1", command)
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-
-
# File 'utils/link.rb', line 69
-
-def self.unlink_completions(path)
-  unlink_src_dst_dirs(path/"completions/bash", HOMEBREW_PREFIX/"etc/bash_completion.d")
-  unlink_src_dst_dirs(path/"completions/zsh", HOMEBREW_PREFIX/"share/zsh/site-functions")
-  unlink_src_dst_dirs(path/"completions/fish", HOMEBREW_PREFIX/"share/fish/vendor_completions.d")
-end
-
-
- -
-
-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'utils/link.rb', line 59
-
-def self.unlink_manpages(path)
-  unlink_src_dst_dirs(path/"manpages", HOMEBREW_PREFIX/"share/man/man1")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Path.html b/docs/Utils/Path.html deleted file mode 100644 index 15656309f..000000000 --- a/docs/Utils/Path.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - Module: Utils::Path - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Path - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/path.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .child_of?(parent, child) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-
-
# File 'utils/path.rb', line 7
-
-def self.child_of?(parent, child)
-  parent_pathname = Pathname(parent).expand_path
-  child_pathname = Pathname(child).expand_path
-  child_pathname.ascend { |p| return true if p == parent_pathname }
-  false
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Service.html b/docs/Utils/Service.html deleted file mode 100644 index 20265e67c..000000000 --- a/docs/Utils/Service.html +++ /dev/null @@ -1,681 +0,0 @@ - - - - - - - Module: Utils::Service - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Service - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - - - -
-
Defined in:
-
utils/service.rb,
- utils/service.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helpers for brew services related code.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .installed?(formula) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if a service file is installed in the expected location.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-22
-
-
# File 'utils/service.rb', line 19
-
-def self.installed?(formula)
-  (launchctl? && formula.launchd_service_path.exist?) ||
-    (systemctl? && formula.systemd_service_path.exist?)
-end
-
-
- -
-

- - .launchctlPathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to launchctl binary.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-
-
# File 'utils/service.rb', line 26
-
-def self.launchctl
-  return @launchctl if defined? @launchctl
-  return if ENV["HOMEBREW_TEST_GENERIC_OS"]
-
-  @launchctl = which("launchctl")
-end
-
-
- -
-

- - .launchctl?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'utils/service.rb', line 43
-
-def self.launchctl?
-  !launchctl.nil?
-end
-
-
- -
-

- - .running?(formula) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Check if a service is running for a specified formula.

- - -
-
-
-

Parameters:

-
    - -
  • - - formula - - - (Formula) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-14
-15
-
-
# File 'utils/service.rb', line 9
-
-def self.running?(formula)
-  if launchctl?
-    quiet_system(launchctl, "list", formula.plist_name)
-  elsif systemctl?
-    quiet_system(systemctl, "is-active", "--quiet", formula.service_name)
-  end
-end
-
-
- -
-

- - .systemctlPathname? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Path to systemctl binary.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-
-
# File 'utils/service.rb', line 35
-
-def self.systemctl
-  return @systemctl if defined? @systemctl
-  return if ENV["HOMEBREW_TEST_GENERIC_OS"]
-
-  @systemctl = which("systemctl")
-end
-
-
- -
-

- - .systemctl?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'utils/service.rb', line 48
-
-def self.systemctl?
-  !systemctl.nil?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Shebang.html b/docs/Utils/Shebang.html deleted file mode 100644 index 6d442b5c2..000000000 --- a/docs/Utils/Shebang.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - Module: Utils::Shebang - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Shebang - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - -
-
Included in:
-
Formula
-
- - - -
-
Defined in:
-
utils/shebang.rb,
- utils/shebang.rbi
-
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for manipulating shebang lines.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: RewriteInfo - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .rewrite_shebang(rewrite_info, *paths) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Rewrite shebang for the given paths using the given rewrite_info.

- -

Example

- -
rewrite_shebang detected_python_shebang, bin/"script.py"
-
- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-
-
# File 'utils/shebang.rb', line 31
-
-def rewrite_shebang(rewrite_info, *paths)
-  paths.each do |f|
-    f = Pathname(f)
-    next unless f.file?
-    next unless rewrite_info.regex.match?(f.read(rewrite_info.max_length))
-
-    Utils::Inreplace.inreplace f.to_s, rewrite_info.regex, "#!#{rewrite_info.replacement}"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Shebang/RewriteInfo.html b/docs/Utils/Shebang/RewriteInfo.html deleted file mode 100644 index 3bcdea019..000000000 --- a/docs/Utils/Shebang/RewriteInfo.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - Class: Utils::Shebang::RewriteInfo - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Utils::Shebang::RewriteInfo - - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
utils/shebang.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Specification on how to rewrite a given shebang.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(regex, max_length, replacement) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - regex - - - (Regexp) - - - -
  • - -
  • - - max_length - - - (Integer) - - - -
  • - -
  • - - replacement - - - (String, Pathname) - - - -
  • - -
- - -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-
-
# File 'utils/shebang.rb', line 14
-
-def initialize(regex, max_length, replacement)
-  @regex = regex
-  @max_length = max_length
-  @replacement = replacement
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #max_lengthObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'utils/shebang.rb', line 11
-
-def max_length
-  @max_length
-end
-
-
- - - -
-

- - #regexObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'utils/shebang.rb', line 11
-
-def regex
-  @regex
-end
-
-
- - - -
-

- - #replacementObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'utils/shebang.rb', line 11
-
-def replacement
-  @replacement
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Shell.html b/docs/Utils/Shell.html deleted file mode 100644 index 6b450c952..000000000 --- a/docs/Utils/Shell.html +++ /dev/null @@ -1,1269 +0,0 @@ - - - - - - - Module: Utils::Shell - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Shell - - - Private -

-
- - - - - - -
-
Includes:
-
Kernel
-
- - - - -
-
Included in:
-
Formula
-
- - - -
-
Defined in:
-
utils/shell.rb,
- utils/shell.rbi
-
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
SHELL_PROFILE_MAP = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  bash: "~/.profile",
-  csh:  "~/.cshrc",
-  fish: "~/.config/fish/config.fish",
-  ksh:  "~/.kshrc",
-  mksh: "~/.kshrc",
-  rc:   "~/.rcrc",
-  sh:   "~/.profile",
-  tcsh: "~/.tcshrc",
-  zsh:  "~/.zshrc",
-}.freeze
- -
UNSAFE_SHELL_CHAR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%r{([^A-Za-z0-9_\-.,:/@~+\n])}
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from Kernel

-

#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path

- - -
-

Class Method Details

- - -
-

- - .csh_quote(str) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - str - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-
-
# File 'utils/shell.rb', line 112
-
-def csh_quote(str)
-  # Ruby's implementation of `shell_escape`.
-  str = str.to_s
-  return "''" if str.empty?
-
-  str = str.dup
-  # Anything that isn't a known safe character is padded.
-  str.gsub!(UNSAFE_SHELL_CHAR, "\\\\" + "\\1") # rubocop:disable Style/StringConcatenation
-  # Newlines have to be specially quoted in `csh`.
-  str.gsub!("\n", "'\\\n'")
-  str
-end
-
-
- -
-

- - .export_value(key, value, shell = preferred) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Quote values. Quoting keys is overkill.

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - -
  • - -
  • - - value - - - (String) - - - -
  • - -
  • - - shell - - - (Symbol, nil) - - - (defaults to: preferred) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'utils/shell.rb', line 36
-
-def export_value(key, value, shell = preferred)
-  case shell
-  when :bash, :ksh, :mksh, :sh, :zsh
-    "export #{key}=\"#{sh_quote(value)}\""
-  when :fish
-    # fish quoting is mostly Bourne compatible except that
-    # a single quote can be included in a single-quoted string via \'
-    # and a literal \ can be included via \\
-    "set -gx #{key} \"#{sh_quote(value)}\""
-  when :rc
-    "#{key}=(#{sh_quote(value)})"
-  when :csh, :tcsh
-    "setenv #{key} #{csh_quote(value)};"
-  end
-end
-
-
- -
-

- - .from_path(path) ⇒ Symbol? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Take a path and heuristically convert it to a shell name, -return nil if there's no match.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Symbol, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-
-
# File 'utils/shell.rb', line 11
-
-def from_path(path)
-  # we only care about the basename
-  shell_name = File.basename(path)
-  # handle possible version suffix like `zsh-5.2`
-  shell_name.sub!(/-.*\z/m, "")
-  shell_name.to_sym if %w[bash csh fish ksh mksh rc sh tcsh zsh].include?(shell_name)
-end
-
-
- -
-

- - .parentSymbol? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'utils/shell.rb', line 30
-
-def parent
-  from_path(`ps -p #{Process.ppid} -o ucomm=`.strip)
-end
-
-
- -
-

- - .preferredSymbol? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'utils/shell.rb', line 25
-
-def preferred
-  from_path(preferred_path)
-end
-
-
- -
-

- - .preferred_path(default: "") ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - default - - - (String) - - - (defaults to: "") - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'utils/shell.rb', line 20
-
-def preferred_path(default: "")
-  ENV.fetch("SHELL", default)
-end
-
-
- -
-

- - .prepend_path_in_profile(path) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'utils/shell.rb', line 84
-
-def prepend_path_in_profile(path)
-  case preferred
-  when :bash, :ksh, :mksh, :sh, :zsh, nil
-    "echo 'export PATH=\"#{sh_quote(path)}:$PATH\"' >> #{profile}"
-  when :rc
-    "echo 'path=(#{sh_quote(path)} $path)' >> #{profile}"
-  when :csh, :tcsh
-    "echo 'setenv PATH #{csh_quote(path)}:$PATH' >> #{profile}"
-  when :fish
-    "fish_add_path #{sh_quote(path)}"
-  end
-end
-
-
- -
-

- - .profileString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Return the shell profile file based on user's preferred shell.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-
-
# File 'utils/shell.rb', line 54
-
-def profile
-  case preferred
-  when :bash
-    bash_profile = "#{Dir.home}/.bash_profile"
-    return bash_profile if File.exist? bash_profile
-  when :rc
-    rc_profile = "#{Dir.home}/.rcrc"
-    return rc_profile if File.exist? rc_profile
-  when :zsh
-    return "#{ENV["HOMEBREW_ZDOTDIR"]}/.zshrc" if ENV["HOMEBREW_ZDOTDIR"].present?
-  end
-
-  SHELL_PROFILE_MAP.fetch(preferred, "~/.profile")
-end
-
-
- -
-

- - .set_variable_in_profile(variable, value) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - variable - - - (String) - - - -
  • - -
  • - - value - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-
-
# File 'utils/shell.rb', line 70
-
-def set_variable_in_profile(variable, value)
-  case preferred
-  when :bash, :ksh, :sh, :zsh, nil
-    "echo 'export #{variable}=#{sh_quote(value)}' >> #{profile}"
-  when :rc
-    "echo '#{variable}=(#{sh_quote(value)})' >> #{profile}"
-  when :csh, :tcsh
-    "echo 'setenv #{variable} #{csh_quote(value)}' >> #{profile}"
-  when :fish
-    "echo 'set -gx #{variable} #{sh_quote(value)}' >> #{profile}"
-  end
-end
-
-
- -
-

- - .sh_quote(str) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - str - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
-
# File 'utils/shell.rb', line 126
-
-def sh_quote(str)
-  # Ruby's implementation of `shell_escape`.
-  str = str.to_s
-  return "''" if str.empty?
-
-  str = str.dup
-  # Anything that isn't a known safe character is padded.
-  str.gsub!(UNSAFE_SHELL_CHAR, "\\\\" + "\\1") # rubocop:disable Style/StringConcatenation
-  str.gsub!("\n", "'\n'")
-  str
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Svn.html b/docs/Utils/Svn.html deleted file mode 100644 index f353e9575..000000000 --- a/docs/Utils/Svn.html +++ /dev/null @@ -1,573 +0,0 @@ - - - - - - - Module: Utils::Svn - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Svn - - - Private -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
utils/svn.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for querying SVN information.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .available?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'utils/svn.rb', line 13
-
-def available?
-  version.present?
-end
-
-
- -
-

- - .clear_version_cacheObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'utils/svn.rb', line 47
-
-def clear_version_cache
-  remove_instance_variable(:@version) if defined?(@version)
-end
-
-
- -
-

- - .invalid_cert_flagsArray - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'utils/svn.rb', line 38
-
-def invalid_cert_flags
-  opoo "Ignoring Subversion certificate errors!"
-  args = ["--non-interactive", "--trust-server-cert"]
-  if Version.new(version || "-1") >= Version.new("1.9")
-    args << "--trust-server-cert-failures=expired,not-yet-valid"
-  end
-  args
-end
-
-
- -
-

- - .remote_exists?(url) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'utils/svn.rb', line 26
-
-def remote_exists?(url)
-  return true unless available?
-
-  args = ["ls", url, "--depth", "empty"]
-  _, stderr, status = system_command("svn", args:, print_stderr: false)
-  return status.success? unless stderr.include?("certificate verification failed")
-
-  # OK to unconditionally trust here because we're just checking if a URL exists.
-  system_command("svn", args: args.concat(invalid_cert_flags), print_stderr: false).success?
-end
-
-
- -
-

- - .versionString? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-
-
# File 'utils/svn.rb', line 18
-
-def version
-  return @version if defined?(@version)
-
-  stdout, _, status = system_command(HOMEBREW_SHIMS_PATH/"shared/svn", args: ["--version"], print_stderr: false)
-  @version = status.success? ? stdout.chomp[/svn, version (\d+(?:\.\d+)*)/, 1] : nil
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Tar.html b/docs/Utils/Tar.html deleted file mode 100644 index 5ae24c636..000000000 --- a/docs/Utils/Tar.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - - Module: Utils::Tar - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Tar - - - Private -

-
- - - - -
-
Extended by:
-
SystemCommand::Mixin
-
- - - - - - - - -
-
Defined in:
-
utils/tar.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper functions for interacting with tar files.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
TAR_FILE_EXTENSIONS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[.tar .tb2 .tbz .tbz2 .tgz .tlz .txz .tZ].freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

system_command, system_command!

- - -
-

Class Method Details

- - -
-

- - .available?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'utils/tar.rb', line 14
-
-def available?
-  executable.present?
-end
-
-
- -
-

- - .clear_executable_cacheObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-
-
# File 'utils/tar.rb', line 36
-
-def clear_executable_cache
-  remove_instance_variable(:@executable) if defined?(@executable)
-end
-
-
- -
-

- - .executableObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-24
-
-
# File 'utils/tar.rb', line 18
-
-def executable
-  return @executable if defined?(@executable)
-
-  gnu_tar_gtar_path = HOMEBREW_PREFIX/"opt/gnu-tar/bin/gtar"
-  gnu_tar_gtar = gnu_tar_gtar_path if gnu_tar_gtar_path.executable?
-  @executable = which("gtar") || gnu_tar_gtar || which("tar")
-end
-
-
- -
-

- - .validate_file(path) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'utils/tar.rb', line 26
-
-def validate_file(path)
-  return unless available?
-
-  path = Pathname.new(path)
-  return unless TAR_FILE_EXTENSIONS.include? path.extname
-
-  stdout, _, status = system_command(executable, args: ["--list", "--file", path], print_stderr: false)
-  odie "#{path} is not a valid tar file!" if !status.success? || stdout.blank?
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/Timer.html b/docs/Utils/Timer.html deleted file mode 100644 index 7e2900ee5..000000000 --- a/docs/Utils/Timer.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - Module: Utils::Timer - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::Timer - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/timer.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .remaining(time) ⇒ Float, ... - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - time - - - (Time, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Float, Integer, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-
-
# File 'utils/timer.rb', line 7
-
-def self.remaining(time)
-  return unless time
-
-  [0, time - Time.now].max
-end
-
-
- -
-

- - .remaining!(time) ⇒ Float, ... - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - time - - - (Time, nil) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Float, Integer, nil) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (Timeout::Error) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-
-
# File 'utils/timer.rb', line 14
-
-def self.remaining!(time)
-  r = remaining(time)
-  raise Timeout::Error if r && r <= 0
-
-  r
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/TopologicalHash.html b/docs/Utils/TopologicalHash.html deleted file mode 100644 index 2977aefb7..000000000 --- a/docs/Utils/TopologicalHash.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - Class: Utils::TopologicalHash - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Utils::TopologicalHash - - - Private -

-
- -
-
Inherits:
-
- Hash - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
TSort
-
- - - - - - -
-
Defined in:
-
utils/topological_hash.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

Topologically sortable hash map.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - - -

Methods inherited from Hash

-

#assert_valid_keys, #blank?, #compact_blank, #deep_dup, #deep_merge, #deep_merge!, #deep_stringify_keys, #deep_stringify_keys!, #deep_symbolize_keys, #deep_symbolize_keys!, #deep_transform_keys, #deep_transform_keys!, #deep_transform_values, #deep_transform_values!, #present?

- - -
-

Class Method Details

- - -
-

- - .graph_package_dependencies(packages, accumulator = TopologicalHash.new) ⇒ TopologicalHash - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

- - -

Returns:

- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'utils/topological_hash.rb', line 17
-
-def self.graph_package_dependencies(packages, accumulator = TopologicalHash.new)
-  packages = Array(packages)
-
-  packages.each do |cask_or_formula|
-    next if accumulator.key?(cask_or_formula)
-
-    if cask_or_formula.is_a?(Cask::Cask)
-      formula_deps = cask_or_formula.depends_on
-                                    .formula
-                                    .map { |f| Formula[f] }
-      cask_deps = cask_or_formula.depends_on
-                                 .cask
-                                 .map { |c| Cask::CaskLoader.load(c, config: nil) }
-    else
-      formula_deps = cask_or_formula.deps
-                                    .reject(&:build?)
-                                    .reject(&:test?)
-                                    .map(&:to_formula)
-      cask_deps = cask_or_formula.requirements
-                                 .filter_map(&:cask)
-                                 .map { |c| Cask::CaskLoader.load(c, config: nil) }
-    end
-
-    accumulator[cask_or_formula] = formula_deps + cask_deps
-
-    graph_package_dependencies(formula_deps, accumulator)
-    graph_package_dependencies(cask_deps, accumulator)
-  end
-
-  accumulator
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Utils/UID.html b/docs/Utils/UID.html deleted file mode 100644 index a5f47ce96..000000000 --- a/docs/Utils/UID.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - Module: Utils::UID - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Utils::UID - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
utils/uid.rb
-
- -
- -
-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .drop_euid(&_block) ⇒ T.type_parameter(:U) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - _block - - - (T.proc.returns(T.type_parameter(:U))) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (T.type_parameter(:U)) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-
-
# File 'utils/uid.rb', line 7
-
-def self.drop_euid(&_block)
-  return yield if Process.euid == Process.uid
-
-  original_euid = Process.euid
-  begin
-    Process::Sys.seteuid(Process.uid)
-    yield
-  ensure
-    Process::Sys.seteuid(original_euid)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/VCSDownloadStrategy.html b/docs/VCSDownloadStrategy.html deleted file mode 100644 index e3640de42..000000000 --- a/docs/VCSDownloadStrategy.html +++ /dev/null @@ -1,717 +0,0 @@ - - - - - - - Class: VCSDownloadStrategy - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: VCSDownloadStrategy - Abstract - - Private -

-
- -
-
Inherits:
-
- AbstractDownloadStrategy - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
download_strategy.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

Abstract superclass for all download strategies downloading from a version control system.

-
-
- - -
-
-
- - -
- - -

- Constant Summary - collapse -

- -
- -
REF_TYPES = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
[:tag, :branch, :revisions, :revision].freeze
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from AbstractDownloadStrategy

-

#cache, #cached_location, #url

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from AbstractDownloadStrategy

-

#basename, #clear_cache, #quiet!, #quiet?, #shutup!, #source_modified_time, #stage

- - - - - - - - - - -

Methods included from SystemCommand::Mixin

-

#system_command, #system_command!

- - - - - - - - - -

Methods included from Context

-

current, current=, #debug?, #quiet?, #verbose?, #with_context

- - -
-

Constructor Details

- -
-

- - #initialize(url, name, version, **meta) ⇒ VCSDownloadStrategy - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of VCSDownloadStrategy.

- - -
-
-
- - -
- - - - -
-
-
-
-186
-187
-188
-189
-190
-191
-
-
# File 'download_strategy.rb', line 186
-
-def initialize(url, name, version, **meta)
-  super
-  @ref_type, @ref = extract_ref(meta)
-  @revision = meta[:revision]
-  @cached_location = @cache/Utils.safe_filename("#{name}--#{cache_tag}")
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #commit_outdated?(commit) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-227
-228
-229
-230
-
-
# File 'download_strategy.rb', line 227
-
-def commit_outdated?(commit)
-  @last_commit ||= fetch_last_commit
-  commit != @last_commit
-end
-
-
- -
-

- - #fetch(timeout: nil) ⇒ Object - - - - - -

-
-

Download and cache the repository at AbstractDownloadStrategy#cached_location.

- - -
-
-
- - -
- - - - -
-
-
-
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-
-
# File 'download_strategy.rb', line 196
-
-def fetch(timeout: nil)
-  end_time = Time.now + timeout if timeout
-
-  ohai "Cloning #{url}"
-
-  if cached_location.exist? && repo_valid?
-    puts "Updating #{cached_location}"
-    update(timeout: end_time)
-  elsif cached_location.exist?
-    puts "Removing invalid repository from cache"
-    clear_cache
-    clone_repo(timeout: end_time)
-  else
-    clone_repo(timeout: end_time)
-  end
-
-  version.update_commit(last_commit) if head?
-
-  return if @ref_type != :tag || @revision.blank? || current_revision.blank? || current_revision == @revision
-
-  raise <<~EOS
-    #{@ref} tag should be #{@revision}
-    but is actually #{current_revision}
-  EOS
-end
-
-
- -
-

- - #fetch_last_commitObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-222
-223
-224
-225
-
-
# File 'download_strategy.rb', line 222
-
-def fetch_last_commit
-  fetch
-  last_commit
-end
-
-
- -
-

- - #head?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-232
-233
-234
-
-
# File 'download_strategy.rb', line 232
-
-def head?
-  version.respond_to?(:head?) && version.head?
-end
-
-
- -
-

- - #last_commitString - - - - - -

-
-

Return the most recent modified timestamp.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-240
-241
-242
-
-
# File 'download_strategy.rb', line 240
-
-def last_commit
-  source_modified_time.to_i.to_s
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Version.html b/docs/Version.html deleted file mode 100644 index fb6b90a6a..000000000 --- a/docs/Version.html +++ /dev/null @@ -1,2131 +0,0 @@ - - - - - - - Class: Version - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version - - - Private -

-
- -
-
Inherits:
-
- Object - - - show all - -
-
- - - - - - -
-
Includes:
-
Comparable
-
- - - - - - -
-
Defined in:
-
version.rb,
- version/parser.rb
-
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-

Direct Known Subclasses

-

MacOSVersion

-
-

Defined Under Namespace

-

- - - - - Classes: AlphaToken, BetaToken, CompositeToken, NumericToken, Parser, PatchToken, PostToken, PreToken, RCToken, RegexParser, StemParser, StringToken, Token, UrlParser - - -

- - -

- Constant Summary - collapse -

- -
- -
NULL_TOKEN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Represents the absence of a token.

- - -
-
-
- - -
-
-
T.let(NullToken.new.freeze, NullToken)
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(val, detected_from_url: false) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - val - - - (String, Version) - - - -
  • - -
  • - - detected_from_url - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-492
-493
-494
-495
-496
-497
-498
-
-
# File 'version.rb', line 492
-
-def initialize(val, detected_from_url: false)
-  version = val.to_str
-  raise ArgumentError, "Version must not be empty" if version.blank?
-
-  @version = T.let(version, String)
-  @detected_from_url = detected_from_url
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .detect(url, **specs) ⇒ Version - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String, Pathname) - - - -
  • - -
  • - - specs - - - (T.untyped) - - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-343
-344
-345
-
-
# File 'version.rb', line 343
-
-def self.detect(url, **specs)
-  parse(specs.fetch(:tag, url), detected_from_url: true)
-end
-
-
- -
-

- - .formula_optionally_versioned_regex(name, full: true) ⇒ Regexp - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String, Symbol) - - - -
  • - -
  • - - full - - - (Boolean) - - - (defaults to: true) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Regexp) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'version.rb', line 11
-
-def self.formula_optionally_versioned_regex(name, full: true)
-  /#{"^" if full}#{Regexp.escape(name)}(@\d[\d.]*)?#{"$" if full}/
-end
-
-
- -
-

- - .parse(spec, detected_from_url: false) ⇒ Version - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - spec - - - (String, Pathname) - - - -
  • - -
  • - - detected_from_url - - - (Boolean) - - - (defaults to: false) - - -
  • - -
- -

Returns:

- - -
- - - - -
-
-
-
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-
-
# File 'version.rb', line 348
-
-def self.parse(spec, detected_from_url: false)
-  spec = CGI.unescape(spec.to_s) if detected_from_url
-
-  spec = Pathname(spec)
-
-  VERSION_PARSERS.each do |parser|
-    version = parser.parse(spec)
-    return new(version, detected_from_url:) if version.present?
-  end
-
-  NULL
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #commitString? - - - - - -

-
-

Return the commit for a HEAD version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-520
-521
-522
-
-
# File 'version.rb', line 520
-
-def commit
-  version&.match(HEAD_VERSION_REGEX)&.[](:commit)
-end
-
-
- -
-

- - #compare(comparator, other) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - comparator - - - (String) - - - -
  • - -
  • - - other - - - (Version) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-
-
# File 'version.rb', line 542
-
-def compare(comparator, other)
-  case comparator
-  when ">=" then self >= other
-  when ">" then self > other
-  when "<" then self < other
-  when "<=" then self <= other
-  when "==" then self == other
-  when "!=" then self != other
-  else raise ArgumentError, "Unknown comparator: #{comparator}"
-  end
-end
-
-
- -
-

- - #detected_from_url?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-501
-502
-503
-
-
# File 'version.rb', line 501
-
-def detected_from_url?
-  @detected_from_url
-end
-
-
- -
-

- - #freezeT.self_type - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-750
-751
-752
-753
-
-
# File 'version.rb', line 750
-
-def freeze
-  tokens # Determine and store tokens before freezing
-  super
-end
-
-
- -
-

- - #head?Boolean - - - - - -

-
-

Check if this is a HEAD version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-512
-513
-514
-
-
# File 'version.rb', line 512
-
-def head?
-  version&.match?(HEAD_VERSION_REGEX) || false
-end
-
-
- -
-

- - #majorToken? - - - - - -

-
-

The major version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Token, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-647
-648
-649
-650
-651
-
-
# File 'version.rb', line 647
-
-def major
-  return NULL_TOKEN if null?
-
-  tokens.first
-end
-
-
- -
-

- - #major_minorT.self_type - - - - - -

-
-

The major and minor version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-677
-678
-679
-680
-681
-682
-
-
# File 'version.rb', line 677
-
-def major_minor
-  return self if null?
-
-  major_minor = T.must(tokens[0..1])
-  major_minor.empty? ? NULL : self.class.new(major_minor.join("."))
-end
-
-
- -
-

- - #major_minor_patchT.self_type - - - - - -

-
-

The major, minor and patch version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (T.self_type) - - - -
  • - -
- -
- - - - -
-
-
-
-688
-689
-690
-691
-692
-693
-
-
# File 'version.rb', line 688
-
-def major_minor_patch
-  return self if null?
-
-  major_minor_patch = T.must(tokens[0..2])
-  major_minor_patch.empty? ? NULL : self.class.new(major_minor_patch.join("."))
-end
-
-
- -
-

- - #minorToken? - - - - - -

-
-

The minor version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Token, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-657
-658
-659
-660
-661
-
-
# File 'version.rb', line 657
-
-def minor
-  return NULL_TOKEN if null?
-
-  tokens.second
-end
-
-
- -
-

- - #null?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-537
-538
-539
-
-
# File 'version.rb', line 537
-
-def null?
-  version.nil?
-end
-
-
- -
-

- - #patchToken? - - - - - -

-
-

The patch version.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Token, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-667
-668
-669
-670
-671
-
-
# File 'version.rb', line 667
-
-def patch
-  return NULL_TOKEN if null?
-
-  tokens.third
-end
-
-
- -
-

- - #respond_to?(method, include_all = T.unsafe(nil)) ⇒ Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - method - - - (Symbol, String) - - - -
  • - -
  • - - include_all - - - (Boolean) - - - (defaults to: T.unsafe(nil)) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-736
-737
-738
-739
-740
-
-
# File 'version.rb', line 736
-
-def respond_to?(method, include_all = T.unsafe(nil))
-  return !null? if ["to_str", :to_str].include?(method)
-
-  super
-end
-
-
- -
-

- - #to_fFloat - - - - - -

-
-

Convert the version to a floating-point number.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-704
-705
-706
-707
-708
-
-
# File 'version.rb', line 704
-
-def to_f
-  return Float::NAN if null?
-
-  version.to_f
-end
-
-
- -
-

- - #to_iInteger - - - - - -

-
-

Convert the version to an integer.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-714
-715
-716
-
-
# File 'version.rb', line 714
-
-def to_i
-  version.to_i
-end
-
-
- -
-

- - #to_json(*options) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-731
-732
-733
-
-
# File 'version.rb', line 731
-
-def to_json(*options)
-  version.to_json(*options)
-end
-
-
- -
-

- - #to_strString - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
-

Raises:

-
    - -
  • - - - (NoMethodError) - - - -
  • - -
- -
- - - - -
-
-
-
-720
-721
-722
-723
-724
-
-
# File 'version.rb', line 720
-
-def to_str
-  raise NoMethodError, "undefined method `to_str' for #{self.class}:NULL" if null?
-
-  T.must(version).to_str
-end
-
-
- -
-

- - #update_commit(commit) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

This method returns an undefined value.

Update the commit for a HEAD version.

- - -
-
-
-

Parameters:

-
    - -
  • - - commit - - - (String, nil) - - - -
  • - -
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-526
-527
-528
-529
-530
-531
-532
-533
-534
-
-
# File 'version.rb', line 526
-
-def update_commit(commit)
-  raise ArgumentError, "Cannot update commit for non-HEAD version." unless head?
-
-  @version = if commit
-    "HEAD-#{commit}"
-  else
-    "HEAD"
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/AlphaToken.html b/docs/Version/AlphaToken.html deleted file mode 100644 index 993a7651e..000000000 --- a/docs/Version/AlphaToken.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Version::AlphaToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::AlphaToken - - - Private -

-
- -
-
Inherits:
-
- CompositeToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A token representing the part of a version designating it as an alpha release.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/alpha[0-9]*|a[0-9]+/i
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from StringToken

-

#value

- - - -

Attributes inherited from Token

-

#value

- - - - - - - - - -

Method Summary

- -

Methods inherited from CompositeToken

-

#rev

- - - - - - - - - -

Methods inherited from StringToken

-

#initialize

- - - - - - - - - -

Methods inherited from Token

-

#blank?, create, from, #initialize, #null?, #numeric?, #to_f, #to_i, #to_str

- - -
-

Constructor Details

- -

This class inherits a constructor from Version::StringToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/BetaToken.html b/docs/Version/BetaToken.html deleted file mode 100644 index dd44003de..000000000 --- a/docs/Version/BetaToken.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Version::BetaToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::BetaToken - - - Private -

-
- -
-
Inherits:
-
- CompositeToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A token representing the part of a version designating it as a beta release.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/beta[0-9]*|b[0-9]+/i
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from StringToken

-

#value

- - - -

Attributes inherited from Token

-

#value

- - - - - - - - - -

Method Summary

- -

Methods inherited from CompositeToken

-

#rev

- - - - - - - - - -

Methods inherited from StringToken

-

#initialize

- - - - - - - - - -

Methods inherited from Token

-

#blank?, create, from, #initialize, #null?, #numeric?, #to_f, #to_i, #to_str

- - -
-

Constructor Details

- -

This class inherits a constructor from Version::StringToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/CompositeToken.html b/docs/Version/CompositeToken.html deleted file mode 100644 index ef4ccc686..000000000 --- a/docs/Version/CompositeToken.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - Class: Version::CompositeToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::CompositeToken - - - Private -

-
- -
-
Inherits:
-
- StringToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A token consisting of an alphabetic and a numeric part.

- - -
-
-
- - -
-

Direct Known Subclasses

-

AlphaToken, BetaToken, PatchToken, PostToken, PreToken, RCToken

-
- - - -

Constant Summary

- -

Constants inherited - from StringToken

-

StringToken::PATTERN

- - - - -

Instance Attribute Summary

- -

Attributes inherited from StringToken

-

#value

- - - -

Attributes inherited from Token

-

#value

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from StringToken

-

#initialize

- - - - - - - - - -

Methods inherited from Token

-

#blank?, create, from, #initialize, #null?, #numeric?, #to_f, #to_i, #to_str

- - -
-

Constructor Details

- -

This class inherits a constructor from Version::StringToken

- -
- - -
-

Instance Method Details

- - -
-

- - #revInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-205
-206
-207
-
-
# File 'version.rb', line 205
-
-def rev
-  value[/[0-9]+/].to_i
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/NumericToken.html b/docs/Version/NumericToken.html deleted file mode 100644 index f08f8979a..000000000 --- a/docs/Version/NumericToken.html +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - Class: Version::NumericToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::NumericToken - - - Private -

-
- -
-
Inherits:
-
- Token - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A token consisting of only numbers.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/[0-9]+/i
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Token

-

#blank?, create, from, #null?, #to_f, #to_i, #to_str

- - -
-

Constructor Details

- -
-

- - #initialize(value) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (String, Integer) - - - -
  • - -
- - -
- - - - -
-
-
-
-178
-179
-180
-
-
# File 'version.rb', line 178
-
-def initialize(value)
-  super(value.to_i)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #valueInteger (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-175
-176
-177
-
-
# File 'version.rb', line 175
-
-def value
-  @value
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #numeric?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-197
-198
-199
-
-
# File 'version.rb', line 197
-
-def numeric?
-  true
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/Parser.html b/docs/Version/Parser.html deleted file mode 100644 index b5afaea45..000000000 --- a/docs/Version/Parser.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - Class: Version::Parser - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::Parser - Abstract - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - - - - - - -
-
Defined in:
-
version/parser.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

It cannot be directly instantiated. Subclasses must implement the abstract methods below.

-
-
- - -
-
-
- - -
-

Direct Known Subclasses

-

RegexParser

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - -
-

Instance Method Details

- - -
-

- - #parse(spec) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
- - -
-
-
-

Parameters:

-
    - -
  • - - spec - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-
-
# File 'version/parser.rb', line 10
-
-def parse(spec); end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/PatchToken.html b/docs/Version/PatchToken.html deleted file mode 100644 index dc74fc5cd..000000000 --- a/docs/Version/PatchToken.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Version::PatchToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::PatchToken - - - Private -

-
- -
-
Inherits:
-
- CompositeToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A token representing the part of a version designating it as a patch release.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/p[0-9]*/i
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from StringToken

-

#value

- - - -

Attributes inherited from Token

-

#value

- - - - - - - - - -

Method Summary

- -

Methods inherited from CompositeToken

-

#rev

- - - - - - - - - -

Methods inherited from StringToken

-

#initialize

- - - - - - - - - -

Methods inherited from Token

-

#blank?, create, from, #initialize, #null?, #numeric?, #to_f, #to_i, #to_str

- - -
-

Constructor Details

- -

This class inherits a constructor from Version::StringToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/PostToken.html b/docs/Version/PostToken.html deleted file mode 100644 index 2b7acb141..000000000 --- a/docs/Version/PostToken.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Version::PostToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::PostToken - - - Private -

-
- -
-
Inherits:
-
- CompositeToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A token representing the part of a version designating it as a post release.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/.post[0-9]+/i
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from StringToken

-

#value

- - - -

Attributes inherited from Token

-

#value

- - - - - - - - - -

Method Summary

- -

Methods inherited from CompositeToken

-

#rev

- - - - - - - - - -

Methods inherited from StringToken

-

#initialize

- - - - - - - - - -

Methods inherited from Token

-

#blank?, create, from, #initialize, #null?, #numeric?, #to_f, #to_i, #to_str

- - -
-

Constructor Details

- -

This class inherits a constructor from Version::StringToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/PreToken.html b/docs/Version/PreToken.html deleted file mode 100644 index 2ebc7288c..000000000 --- a/docs/Version/PreToken.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Version::PreToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::PreToken - - - Private -

-
- -
-
Inherits:
-
- CompositeToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A token representing the part of a version designating it as a pre-release.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/pre[0-9]*/i
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from StringToken

-

#value

- - - -

Attributes inherited from Token

-

#value

- - - - - - - - - -

Method Summary

- -

Methods inherited from CompositeToken

-

#rev

- - - - - - - - - -

Methods inherited from StringToken

-

#initialize

- - - - - - - - - -

Methods inherited from Token

-

#blank?, create, from, #initialize, #null?, #numeric?, #to_f, #to_i, #to_str

- - -
-

Constructor Details

- -

This class inherits a constructor from Version::StringToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/RCToken.html b/docs/Version/RCToken.html deleted file mode 100644 index 21fc4315c..000000000 --- a/docs/Version/RCToken.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Version::RCToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::RCToken - - - Private -

-
- -
-
Inherits:
-
- CompositeToken - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A token representing the part of a version designating it as a release candidate.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/rc[0-9]*/i
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from StringToken

-

#value

- - - -

Attributes inherited from Token

-

#value

- - - - - - - - - -

Method Summary

- -

Methods inherited from CompositeToken

-

#rev

- - - - - - - - - -

Methods inherited from StringToken

-

#initialize

- - - - - - - - - -

Methods inherited from Token

-

#blank?, create, from, #initialize, #null?, #numeric?, #to_f, #to_i, #to_str

- - -
-

Constructor Details

- -

This class inherits a constructor from Version::StringToken

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/RegexParser.html b/docs/Version/RegexParser.html deleted file mode 100644 index 941a70c4e..000000000 --- a/docs/Version/RegexParser.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - Class: Version::RegexParser - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::RegexParser - Abstract - - Private -

-
- -
-
Inherits:
-
- Parser - - - show all - -
-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - - - - - - -
-
Defined in:
-
version/parser.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

It cannot be directly instantiated. Subclasses must implement the abstract methods below.

-
-
- - -
-
-
- - -
-

Direct Known Subclasses

-

StemParser, UrlParser

-
- - - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(regex, &block) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - regex - - - (Regexp) - - - -
  • - -
  • - - block - - - (T.proc.params(arg0: String).returns(String), nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-
-
# File 'version/parser.rb', line 18
-
-def initialize(regex, &block)
-  super()
-  @regex = regex
-  @block = block
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .process_spec(spec) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-
- This method is abstract. -
-
- - -
-
-
-

Parameters:

-
    - -
  • - - spec - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-
-
# File 'version/parser.rb', line 37
-
-def self.process_spec(spec); end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #parse(spec) ⇒ String? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - spec - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'version/parser.rb', line 25
-
-def parse(spec)
-  match = @regex.match(self.class.process_spec(spec))
-  return if match.blank?
-
-  version = match.captures.first
-  return if version.blank?
-  return @block.call(version) if @block.present?
-
-  version
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/StemParser.html b/docs/Version/StemParser.html deleted file mode 100644 index 13a721f3f..000000000 --- a/docs/Version/StemParser.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - Class: Version::StemParser - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::StemParser - - - Private -

-
- -
-
Inherits:
-
- RegexParser - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version/parser.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
SOURCEFORGE_DOWNLOAD_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%r{(?:sourceforge\.net|sf\.net)/.*/download$}
- -
NO_FILE_EXTENSION_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/\.[^a-zA-Z]+$/
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RegexParser

-

#initialize, #parse

- - - - - - - - - - -

Methods inherited from Parser

-

#parse

- -
-

Constructor Details

- -

This class inherits a constructor from Version::RegexParser

- -
- - -
-

Class Method Details

- - -
-

- - .process_spec(spec) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - spec - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'version/parser.rb', line 52
-
-def self.process_spec(spec)
-  return spec.basename.to_s if spec.directory?
-
-  spec_s = spec.to_s
-  return spec.dirname.stem if spec_s.match?(SOURCEFORGE_DOWNLOAD_REGEX)
-  return spec.basename.to_s if spec_s.match?(NO_FILE_EXTENSION_REGEX)
-
-  spec.stem
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/StringToken.html b/docs/Version/StringToken.html deleted file mode 100644 index 9bfc5b311..000000000 --- a/docs/Version/StringToken.html +++ /dev/null @@ -1,375 +0,0 @@ - - - - - - - Class: Version::StringToken - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::StringToken - - - Private -

-
- -
-
Inherits:
-
- Token - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A token string.

- - -
-
-
- - -
-

Direct Known Subclasses

-

CompositeToken

-
- - -

- Constant Summary - collapse -

- -
- -
PATTERN = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
/[a-z]+/i
- -
- - - - - -

Instance Attribute Summary collapse

-
    - - -
  • - - - #value ⇒ String - - - - - - - - readonly - - - - - - - private - -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Token

-

#blank?, create, from, #null?, #numeric?, #to_f, #to_i, #to_str

- - -
-

Constructor Details

- -
-

- - #initialize(value) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-153
-154
-155
-
-
# File 'version.rb', line 153
-
-def initialize(value)
-  super(value.to_s)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #valueString (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-150
-151
-152
-
-
# File 'version.rb', line 150
-
-def value
-  @value
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/Token.html b/docs/Version/Token.html deleted file mode 100644 index bb221bcef..000000000 --- a/docs/Version/Token.html +++ /dev/null @@ -1,1050 +0,0 @@ - - - - - - - Class: Version::Token - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::Token - Abstract - - Private -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - -
-
Extended by:
-
T::Helpers
-
- - - -
-
Includes:
-
Comparable
-
- - - - - - -
-
Defined in:
-
version.rb
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-
- This class is abstract. -

It cannot be directly instantiated. Subclasses must implement the abstract methods below.

-
-
-

A part of a Version.

- - -
-
-
- - -
-

Direct Known Subclasses

-

NumericToken, StringToken

-
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Constructor Details

- -
-

- - #initialize(value) ⇒ void - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - value - - - (String, Integer, nil) - - - -
  • - -
- - -
- - - - -
-
-
-
-52
-53
-54
-
-
# File 'version.rb', line 52
-
-def initialize(value)
-  @value = T.let(value, T.untyped)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #valueString, ... (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String, Integer, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'version.rb', line 49
-
-def value
-  @value
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .create(val) ⇒ Token - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - val - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Token) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'version.rb', line 23
-
-def self.create(val)
-  case val
-  when /\A#{AlphaToken::PATTERN}\z/o   then AlphaToken
-  when /\A#{BetaToken::PATTERN}\z/o    then BetaToken
-  when /\A#{RCToken::PATTERN}\z/o      then RCToken
-  when /\A#{PreToken::PATTERN}\z/o     then PreToken
-  when /\A#{PatchToken::PATTERN}\z/o   then PatchToken
-  when /\A#{PostToken::PATTERN}\z/o    then PostToken
-  when /\A#{NumericToken::PATTERN}\z/o then NumericToken
-  when /\A#{StringToken::PATTERN}\z/o  then StringToken
-  else raise "Cannot find a matching token pattern"
-  end.new(val)
-end
-
-
- -
-

- - .from(val) ⇒ Token? - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - val - - - (T.untyped) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Token, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-
-
# File 'version.rb', line 38
-
-def self.from(val)
-  return NULL_TOKEN if val.nil? || (val.respond_to?(:null?) && val.null?)
-
-  case val
-  when Token   then val
-  when String  then Token.create(val)
-  when Integer then Token.create(val.to_s)
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #blank?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-98
-
-
# File 'version.rb', line 98
-
-def blank? = null?
-
-
- -
-

- - #null?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-93
-94
-95
-
-
# File 'version.rb', line 93
-
-def null?
-  false
-end
-
-
- -
-

- - #numeric?Boolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-88
-89
-90
-
-
# File 'version.rb', line 88
-
-def numeric?
-  false
-end
-
-
- -
-

- - #to_fFloat - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-
-
# File 'version.rb', line 70
-
-def to_f
-  value.to_f
-end
-
-
- -
-

- - #to_iInteger - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-76
-77
-
-
# File 'version.rb', line 75
-
-def to_i
-  value.to_i
-end
-
-
- -
-

- - #to_strString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-80
-81
-82
-
-
# File 'version.rb', line 80
-
-def to_str
-  value.to_s
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Version/UrlParser.html b/docs/Version/UrlParser.html deleted file mode 100644 index a7de73617..000000000 --- a/docs/Version/UrlParser.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - Class: Version::UrlParser - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: Version::UrlParser - - - Private -

-
- -
-
Inherits:
-
- RegexParser - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
version/parser.rb
-
- -
- -
-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from RegexParser

-

#initialize, #parse

- - - - - - - - - - -

Methods inherited from Parser

-

#parse

- -
-

Constructor Details

- -

This class inherits a constructor from Version::RegexParser

- -
- - -
-

Class Method Details

- - -
-

- - .process_spec(spec) ⇒ String - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
-

Parameters:

-
    - -
  • - - spec - - - (Pathname) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'version/parser.rb', line 42
-
-def self.process_spec(spec)
-  spec.to_s
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Warnings.html b/docs/Warnings.html deleted file mode 100644 index d818e49f0..000000000 --- a/docs/Warnings.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - Module: Warnings - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Module: Warnings - - - Private -

-
- - - - - - - - - - - -
-
Defined in:
-
warnings.rb
-
- -
- -

Overview

-
-

- This module is part of a private API. - This module may only be used in the Homebrew/brew repository. - Third parties should avoid using this module if possible, as it may be removed or changed without warning. -

-

Helper module for handling warnings.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
COMMON_WARNINGS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
{
-  parser_syntax: [
-    %r{warning: parser/current is loading parser/ruby\d+, which recognizes},
-    /warning: \d+\.\d+\.\d+-compliant syntax, but you are running \d+\.\d+\.\d+\./,
-    # FIXME: https://github.com/errata-ai/vale/issues/818
-    # <!-- vale off -->
-    %r{warning: please see https://github\.com/whitequark/parser#compatibility-with-ruby-mri\.},
-    # <!-- vale on -->
-  ],
-  default_gems:  [
-    /warning: .+\.rb was loaded from the standard library, .+ default gems since Ruby \d+\.\d+\.\d+\./,
-  ],
-}.freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .ignore(*warnings) ⇒ Object - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-
-
# File 'warnings.rb', line 22
-
-def self.ignore(*warnings)
-  warnings.map! do |warning|
-    next warning if !warning.is_a?(Symbol) || !COMMON_WARNINGS.key?(warning)
-
-    COMMON_WARNINGS[warning]
-  end
-
-  warnings.flatten.each do |warning|
-    Warning.ignore warning
-  end
-  return unless block_given?
-
-  result = yield
-  Warning.clear
-  result
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/XcodeRequirement.html b/docs/XcodeRequirement.html deleted file mode 100644 index 0703b3662..000000000 --- a/docs/XcodeRequirement.html +++ /dev/null @@ -1,640 +0,0 @@ - - - - - - - Class: XcodeRequirement - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Class: XcodeRequirement - - - Private -

-
- -
-
Inherits:
-
- Requirement - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
requirements/xcode_requirement.rb,
- extend/os/linux/requirements/xcode_requirement.rb
-
-
- -
- -

Overview

-
-

- This class is part of a private API. - This class may only be used in the Homebrew/brew repository. - Third parties should avoid using this class if possible, as it may be removed or changed without warning. -

-

A requirement on Xcode.

- - -
-
-
- - -
- - -

Constant Summary

- -

Constants included - from Dependable

-

Dependable::RESERVED_TAGS

- - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from Requirement

-

#cask, #download, #name

- - - -

Attributes included from Dependable

-

#tags

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Requirement

-

cask, download, #env, env, #env_proc, expand, fatal, #fatal?, #mktemp, #modify_build_environment, #option_names, prune, prune?, #satisfied?, #satisfied_result_parent, satisfy

- - - - - - - - - -

Methods included from BuildEnvironment::DSL

-

#env, #inherited

- - - - - - - - - -

Methods included from Cachable

-

#cache, #clear_cache

- - - - - - - - - -

Methods included from Attrable

-

#attr_predicate, #attr_rw

- - - - - - - - - -

Methods included from Dependable

-

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

-
-

Constructor Details

- -
-

- - #initialize(tags = []) ⇒ XcodeRequirement - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

-

Returns a new instance of XcodeRequirement.

- - -
-
-
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-
-
# File 'requirements/xcode_requirement.rb', line 17
-
-def initialize(tags = [])
-  @version = tags.shift if tags.first.to_s.match?(/(\d\.)+\d/)
-  super
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #versionObject (readonly) - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'requirements/xcode_requirement.rb', line 10
-
-def version
-  @version
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #display_sObject - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
- - - - -
-
-
-
-56
-57
-58
-59
-60
-
-
# File 'requirements/xcode_requirement.rb', line 56
-
-def display_s
-  return "#{name.capitalize} (on macOS)" unless @version
-
-  "#{name.capitalize} >= #{@version} (on macOS)"
-end
-
-
- -
-

- - #messageString - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-
-
# File 'requirements/xcode_requirement.rb', line 31
-
-def message
-  version = " #{@version}" if @version
-  message = <<~EOS
-    A full installation of Xcode.app#{version} is required to compile
-    this software. Installing just the Command Line Tools is not sufficient.
-  EOS
-  if @version && Version.new(MacOS::Xcode.latest_version) < Version.new(@version)
-    message + <<~EOS
-
-      Xcode#{version} cannot be installed on macOS #{MacOS.version}.
-      You must upgrade your version of macOS.
-    EOS
-  else
-    message + <<~EOS
-
-      Xcode can be installed from the App Store.
-    EOS
-  end
-end
-
-
- -
-

- - #xcode_installed_versionBoolean - - - - - -

-
-

- This method is part of a private API. - This method may only be used in the Homebrew/brew repository. - Third parties should avoid using this method if possible, as it may be removed or changed without warning. -

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'extend/os/linux/requirements/xcode_requirement.rb', line 8
-
-def xcode_installed_version
-  true
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/_index.html b/docs/_index.html deleted file mode 100644 index 9ca19b9a5..000000000 --- a/docs/_index.html +++ /dev/null @@ -1,6017 +0,0 @@ - - - - - - - Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Homebrew Ruby API

-
-

Alphabetic Index

- -

File Listing

- - -
-

Namespace Listing A-Z

- - - - - - - - -
- - -
    -
  • A
  • -
      - -
    • - API - - (Homebrew) - -
    • - -
    • - API - - (GitHub) - -
    • - -
    • - APIHashable - -
    • - -
    • - AST - - (Utils) - -
    • - -
    • - AST - - (RuboCop::Cask) - -
    • - -
    • - AST - - (RuboCop) - -
    • - -
    • - AbstractArtifact - - (Cask::Artifact) - -
    • - -
    • - AbstractCaskErrorWithToken - - (Cask) - -
    • - -
    • - AbstractCommand - - (Homebrew) - -
    • - -
    • - AbstractContentLoader - - (Cask::CaskLoader) - -
    • - -
    • - AbstractCoreTap - -
    • - -
    • - AbstractDownloadStrategy - -
    • - -
    • - AbstractFileDownloadStrategy - -
    • - -
    • - AbstractFlightBlock - - (Cask::Artifact) - -
    • - -
    • - AbstractUninstall - - (Cask::Artifact) - -
    • - -
    • - Actions - - (GitHub) - -
    • - -
    • - Air - - (UnpackStrategy) - -
    • - -
    • - AlphaToken - - (Version) - -
    • - -
    • - AlreadyLinkedError - - (Keg) - -
    • - -
    • - Analytics - - (Homebrew::Cmd) - -
    • - -
    • - Analytics - - (Homebrew::API) - -
    • - -
    • - Analytics - - (Utils) - -
    • - -
    • - Annotation - - (GitHub::Actions) - -
    • - -
    • - Apache - - (Homebrew::Livecheck::Strategy) - -
    • - -
    • - App - - (Cask::Artifact) - -
    • - -
    • - ArchRequirement - -
    • - -
    • - Args - - (Homebrew::CLI) - -
    • - -
    • - Args - - (Tapioca::Compilers) - -
    • - -
    • - Args - - (Homebrew::Cmd::Env) - -
    • - -
    • - Args - - (Homebrew::Cmd::Log) - -
    • - -
    • - Args - - (Homebrew::Cmd::Pin) - -
    • - -
    • - Args - - (Homebrew::Cmd::Deps) - -
    • - -
    • - Args - - (Homebrew::Cmd::Desc) - -
    • - -
    • - Args - - (Homebrew::Cmd::Docs) - -
    • - -
    • - Args - - (Homebrew::Cmd::Home) - -
    • - -
    • - Args - - (Homebrew::Cmd::Info) - -
    • - -
    • - Args - - (Homebrew::Cmd::Link) - -
    • - -
    • - Args - - (Homebrew::Cmd::List) - -
    • - -
    • - Args - - (Homebrew::Cmd::Uses) - -
    • - -
    • - Args - - (Homebrew::Cmd::Cache) - -
    • - -
    • - Args - - (Homebrew::Cmd::Unpin) - -
    • - -
    • - Args - - (Homebrew::Cmd::Untap) - -
    • - -
    • - Args - - (Homebrew::Cmd::Cellar) - -
    • - -
    • - Args - - (Homebrew::Cmd::Config) - -
    • - -
    • - Args - - (Homebrew::Cmd::Doctor) - -
    • - -
    • - Args - - (Homebrew::Cmd::Leaves) - -
    • - -
    • - Args - - (Homebrew::Cmd::Prefix) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Sh) - -
    • - -
    • - Args - - (Homebrew::Cmd::Command) - -
    • - -
    • - Args - - (Homebrew::Cmd::Migrate) - -
    • - -
    • - Args - - (Homebrew::Cmd::Missing) - -
    • - -
    • - Args - - (Homebrew::Cmd::TapCmd) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Cat) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Irb) - -
    • - -
    • - Args - - (Homebrew::Cmd::Caskroom) - -
    • - -
    • - Args - - (Homebrew::Cmd::HelpCmd) - -
    • - -
    • - Args - - (Homebrew::Cmd::Outdated) - -
    • - -
    • - Args - - (Homebrew::Cmd::TapInfo) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Bump) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Edit) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Prof) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Ruby) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Test) - -
    • - -
    • - Args - - (Homebrew::Cmd::Analytics) - -
    • - -
    • - Args - - (Homebrew::Cmd::Developer) - -
    • - -
    • - Args - - (Homebrew::Cmd::FetchCmd) - -
    • - -
    • - Args - - (Homebrew::Cmd::GistLogs) - -
    • - -
    • - Args - - (Homebrew::Cmd::Reinstall) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Audit) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Tests) - -
    • - -
    • - Args - - (Homebrew::Cmd::Autoremove) - -
    • - -
    • - Args - - (Homebrew::Cmd::PyenvSync) - -
    • - -
    • - Args - - (Homebrew::Cmd::RbenvSync) - -
    • - -
    • - Args - - (Homebrew::Cmd::Repository) - -
    • - -
    • - Args - - (Homebrew::Cmd::SearchCmd) - -
    • - -
    • - Args - - (Homebrew::Cmd::UnlinkCmd) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Bottle) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Create) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Unpack) - -
    • - -
    • - Args - - (Homebrew::Cmd::CleanupCmd) - -
    • - -
    • - Args - - (Homebrew::Cmd::InstallCmd) - -
    • - -
    • - Args - - (Homebrew::Cmd::NodenvSync) - -
    • - -
    • - Args - - (Homebrew::Cmd::OptionsCmd) - -
    • - -
    • - Args - - (Homebrew::Cmd::Postinstall) - -
    • - -
    • - Args - - (Homebrew::Cmd::ReadallCmd) - -
    • - -
    • - Args - - (Homebrew::Cmd::UpgradeCmd) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Extract) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Linkage) - -
    • - -
    • - Args - - (Homebrew::DevCmd::PrPull) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Release) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Rubydoc) - -
    • - -
    • - Args - - (Homebrew::DevCmd::TapNew) - -
    • - -
    • - Args - - (Homebrew::Cmd::CommandsCmd) - -
    • - -
    • - Args - - (Homebrew::Cmd::UninstallCmd) - -
    • - -
    • - Args - - (Homebrew::Cmd::UpdateReport) - -
    • - -
    • - Args - - (Homebrew::DevCmd::PrUpload) - -
    • - -
    • - Args - - (Homebrew::DevCmd::StyleCmd) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Typecheck) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Unbottled) - -
    • - -
    • - Args - - (Homebrew::DevCmd::PrPublish) - -
    • - -
    • - Args - - (Homebrew::Cmd::CompletionsCmd) - -
    • - -
    • - Args - - (Homebrew::DevCmd::FormulaCmd) - -
    • - -
    • - Args - - (Homebrew::DevCmd::UpdateTest) - -
    • - -
    • - Args - - (Homebrew::DevCmd::VendorGems) - -
    • - -
    • - Args - - (Homebrew::DevCmd::BumpCaskPr) - -
    • - -
    • - Args - - (Homebrew::DevCmd::PrAutomerge) - -
    • - -
    • - Args - - (Homebrew::DevCmd::BumpRevision) - -
    • - -
    • - Args - - (Homebrew::DevCmd::Contributions) - -
    • - -
    • - Args - - (Homebrew::DevCmd::LivecheckCmd) - -
    • - -
    • - Args - - (Homebrew::DevCmd::BumpFormulaPr) - -
    • - -
    • - Args - - (Homebrew::DevCmd::UpdateSponsors) - -
    • - -
    • - Args - - (Homebrew::DevCmd::GenerateCaskApi) - -
    • - -
    • - Args - - (Homebrew::DevCmd::UpdateMaintainers) - -
    • - -
    • - Args - - (Homebrew::DevCmd::UpdateLicenseData) - -
    • - -
    • - Args - - (Homebrew::DevCmd::GenerateFormulaApi) - -
    • - -
    • - Args - - (Homebrew::DevCmd::InstallBundlerGems) - -
    • - -
    • - Args - - (Homebrew::DevCmd::DispatchBuildBottle) - -
    • - -
    • - Args - - (Homebrew::DevCmd::BumpUnversionedCasks) - -
    • - -
    • - Args - - (Homebrew::DevCmd::DetermineTestRunners) - -
    • - -
    • - Args - - (Homebrew::DevCmd::UpdatePythonResources) - -
    • - -
    • - Args - - (Homebrew::DevCmd::GenerateManCompletions) - -
    • - -
    • - Array - -
    • - -
    • - ArrayAlphabetization - - (RuboCop::Cop::Cask) - -
    • - -
    • - Artifact - - (Cask::Artifact) - -
    • - -
    • - Artifact - - (Cask) - -
    • - -
    • - ArtifactSet - - (Cask) - -
    • - -
    • - AssertStatements - - (RuboCop::Cop::FormulaAudit) - -
    • - -
    • - Assertions - - (Homebrew) - -
    • - -
    • - Attestation - - (Homebrew) - -
    • - -
    • - Attr - -
    • - -
    • - Attrable - -
    • - -
    • - AudioUnitPlugin - - (Cask::Artifact) - -
    • - -
    • - Audit - - (Cask) - -
    • - -
    • - Audit - - (Homebrew::DevCmd) - -
    • - -
    • - Auditor - - (Cask) - -
    • - -
    • - AuthenticationFailedError - - (GitHub::API) - -
    • - -
    • - Autoremove - - (Homebrew::Cmd) - -
    • - -
    -
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
    -
  • J
  • -
      - -
    • - Jar - - (UnpackStrategy) - -
    • - -
    • - Java - - (Language) - -
    • - -
    • - Json - - (Homebrew::Livecheck::Strategy) - -
    • - -
    -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
  • X
  • -
      - -
    • - Xar - - (UnpackStrategy) - -
    • - -
    • - Xcode - - (OS::Mac) - -
    • - -
    • - XcodeRequirement - -
    • - -
    • - XcodeSDKLocator - - (OS::Mac) - -
    • - -
    • - Xml - - (Homebrew::Livecheck::Strategy) - -
    • - -
    • - Xorg - - (Homebrew::Livecheck::Strategy) - -
    • - -
    • - Xz - - (UnpackStrategy) - -
    • - -
    -
- - -
    -
  • Y
  • -
      - -
    • - Yaml - - (Homebrew::Livecheck::Strategy) - -
    • - -
    -
- - -
    -
  • Z
  • -
      - -
    • - Zap - - (Cask::Artifact) - -
    • - -
    • - Zip - - (UnpackStrategy) - -
    • - -
    • - Zstd - - (UnpackStrategy) - -
    • - -
    -
- -
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/class_list.html b/docs/class_list.html deleted file mode 100644 index c1deda68f..000000000 --- a/docs/class_list.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - Class List - - - -
-
-

Class List

- - - -
- - -
- - diff --git a/docs/css/common.css b/docs/css/common.css deleted file mode 100644 index cf25c4523..000000000 --- a/docs/css/common.css +++ /dev/null @@ -1 +0,0 @@ -/* Override this file with custom rules */ \ No newline at end of file diff --git a/docs/css/full_list.css b/docs/css/full_list.css deleted file mode 100644 index fa3598242..000000000 --- a/docs/css/full_list.css +++ /dev/null @@ -1,58 +0,0 @@ -body { - margin: 0; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - height: 101%; - overflow-x: hidden; - background: #fafafa; -} - -h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } -.clear { clear: both; } -.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } -#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } -#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } -#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } -#full_list ul { padding: 0; } -#full_list li { padding: 0; margin: 0; list-style: none; } -#full_list li .item { padding: 5px 5px 5px 12px; } -#noresults { padding: 7px 12px; background: #fff; } -#content.insearch #noresults { margin-left: 7px; } -li.collapsed ul { display: none; } -li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } -li { color: #888; cursor: pointer; } -li.deprecated { text-decoration: line-through; font-style: italic; } -li.odd { background: #f0f0f0; } -li.even { background: #fafafa; } -.item:hover { background: #ddd; } -li small:before { content: "("; } -li small:after { content: ")"; } -li small.search_info { display: none; } -a, a:visited { text-decoration: none; color: #05a; } -li.clicked > .item { background: #05a; color: #ccc; } -li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } -li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } -li.collapsed.clicked a.toggle { background-position: top right; } -#search input { border: 1px solid #bbb; border-radius: 3px; } -#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } -#full_list_nav a, #nav a:visited { color: #358; } -#full_list_nav a:hover { background: transparent; color: #5af; } -#full_list_nav span:after { content: ' | '; } -#full_list_nav span:last-child:after { content: ''; } - -#content h1 { margin-top: 0; } -li { white-space: nowrap; cursor: normal; } -li small { display: block; font-size: 0.8em; } -li small:before { content: ""; } -li small:after { content: ""; } -li small.search_info { display: none; } -#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } -#content.insearch #search { background-position: center right; } -#search input { width: 110px; } - -#full_list.insearch ul { display: block; } -#full_list.insearch .item { display: none; } -#full_list.insearch .found { display: block; padding-left: 11px !important; } -#full_list.insearch li a.toggle { display: none; } -#full_list.insearch li small.search_info { display: block; } diff --git a/docs/css/style.css b/docs/css/style.css deleted file mode 100644 index eb0dbc86f..000000000 --- a/docs/css/style.css +++ /dev/null @@ -1,497 +0,0 @@ -html { - width: 100%; - height: 100%; -} -body { - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - width: 100%; - margin: 0; - padding: 0; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; -} - -#nav { - position: relative; - width: 100%; - height: 100%; - border: 0; - border-right: 1px dotted #eee; - overflow: auto; -} -.nav_wrap { - margin: 0; - padding: 0; - width: 20%; - height: 100%; - position: relative; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; - flex-shrink: 0; - -webkit-flex-shrink: 0; - -ms-flex: 1 0; -} -#resizer { - position: absolute; - right: -5px; - top: 0; - width: 10px; - height: 100%; - cursor: col-resize; - z-index: 9999; -} -#main { - flex: 5 1; - -webkit-flex: 5 1; - -ms-flex: 5 1; - outline: none; - position: relative; - background: #fff; - padding: 1.2em; - padding-top: 0.2em; - box-sizing: border-box; -} - -@media (max-width: 920px) { - .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } - #resizer { display: none; } - #nav { - z-index: 9999; - background: #fff; - display: none; - position: absolute; - top: 40px; - right: 12px; - width: 500px; - max-width: 80%; - height: 80%; - overflow-y: scroll; - border: 1px solid #999; - border-collapse: collapse; - box-shadow: -7px 5px 25px #aaa; - border-radius: 2px; - } -} - -@media (min-width: 920px) { - body { height: 100%; overflow: hidden; } - #main { height: 100%; overflow: auto; } - #search { display: none; } -} - -#main img { max-width: 100%; } -h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } -h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } -h1.title { margin-bottom: 10px; } -h1.alphaindex { margin-top: 0; font-size: 22px; } -h2 { - padding: 0; - padding-bottom: 3px; - border-bottom: 1px #aaa solid; - font-size: 1.4em; - margin: 1.8em 0 0.5em; - position: relative; -} -h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } -h2 small a { - display: block; - height: 20px; - border: 1px solid #aaa; - border-bottom: 0; - border-top-left-radius: 5px; - background: #f8f8f8; - position: relative; - padding: 2px 7px; -} -.clear { clear: both; } -.inline { display: inline; } -.inline p:first-child { display: inline; } -.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } -.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { - color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } -.docstring h1 { font-size: 1.2em; } -.docstring h2 { font-size: 1.1em; } -.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } -.summary_desc .object_link a, .docstring .object_link a { - font-family: monospace; font-size: 1.05em; - color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.rdoc-term { padding-right: 25px; font-weight: bold; } -.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } -.summary_desc pre.code .object_link a, .docstring pre.code .object_link a { - padding: 0px; background: inherit; color: inherit; border-radius: inherit; -} - -/* style for */ -#filecontents table, .docstring table { border-collapse: collapse; } -#filecontents table th, #filecontents table td, -.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } -#filecontents table tr:nth-child(odd), -.docstring table tr:nth-child(odd) { background: #eee; } -#filecontents table tr:nth-child(even), -.docstring table tr:nth-child(even) { background: #fff; } -#filecontents table th, .docstring table th { background: #fff; } - -/* style for
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/docs/method_list.html b/docs/method_list.html deleted file mode 100644 index abcc49f45..000000000 --- a/docs/method_list.html +++ /dev/null @@ -1,40219 +0,0 @@ - - - - - - - - - - - - - - - - - - Method List - - - -
-
-

Method List

- - - -
- - -
- - diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html deleted file mode 100644 index ddd8dba0a..000000000 --- a/docs/top-level-namespace.html +++ /dev/null @@ -1,1237 +0,0 @@ - - - - - - - Top Level Namespace - - — Homebrew Ruby API - - - - - - - - - - - - - - - - - - - -
- - -

Top Level Namespace - - - -

-
- - - - - - - - - - - -
- -

Defined Under Namespace

-

- - - Modules: APIHashable, Attrable, Cachable, Cask, Commands, CompilerConstants, Context, Debrew, Dependable, DependenciesHelpers, DeprecateDisable, DiskUsageExtension, ELFShim, Enumerable, EnvActivation, Formatter, FormulaCellarChecks, FormulaClassUnavailableErrorModule, FormulaUnreadableErrorModule, Formulary, GitHub, Hardware, Homebrew, IRB, Ignorable, InstallRenamed, InstalledDependents, Kernel, Language, MacOSVersionErrorCompat, MachOShim, Metafiles, OS, ObserverPathnameExtension, OnSystem, Patch, PyPI, Readall, Repology, RuboCop, SPDX, SharedAudits, SharedEnvExtension, Singleton, Stdenv, Superenv, SystemConfig, Tapioca, Tty, UnpackStrategy, Utils, Warnings - - - - Classes: AbstractCoreTap, AbstractDownloadStrategy, AbstractFileDownloadStrategy, ArchRequirement, Array, Attr, BazaarDownloadStrategy, Bottle, BottleFormulaUnavailableError, BottleSpecification, Build, BuildEnvironment, BuildError, BuildFlagsError, BuildOptions, CVSDownloadStrategy, CacheStore, CacheStoreDatabase, CannotInstallFormulaError, CaskDependent, CaskDescriptionCacheStore, CaskLock, Caveats, Checksum, ChecksumMismatchError, ChecksumMissingError, ChildProcessError, Cleaner, CodesignRequirement, CompilerFailure, CompilerSelectionError, CompilerSelector, CoreCaskTap, CoreTap, CurlApacheMirrorDownloadStrategy, CurlDownloadStrategy, CurlDownloadStrategyError, CurlGitHubPackagesDownloadStrategy, CurlPostDownloadStrategy, CxxStdlib, CyclicDependencyError, DATAPatch, Dependencies, Dependency, DependencyCollector, DeprecatedOption, DescriptionCacheStore, Descriptions, DevelopmentTools, DownloadError, DownloadStrategyDetector, Downloadable, DuplicateResourceError, ENV, EmbeddedPatch, ErrorDuringExecution, ExternalPatch, FalseClass, File, Formula, FormulaAmbiguousPythonError, FormulaClassUnavailableError, FormulaConflict, FormulaConflictError, FormulaInfo, FormulaInstallationAlreadyAttemptedError, FormulaInstaller, FormulaLock, FormulaOrCaskUnavailableError, FormulaOrCaskUnspecifiedError, FormulaPin, FormulaSpecificationError, FormulaUnavailableError, FormulaUnknownPythonError, FormulaUnreadableError, FormulaUnspecifiedError, FormulaValidationError, FormulaVersions, FossilDownloadStrategy, GitDownloadStrategy, GitHubArtifactDownloadStrategy, GitHubGitDownloadStrategy, GitHubPackages, GitHubReleases, GitHubRunner, GitHubRunnerMatrix, GitRepository, Hash, HeadSoftwareSpec, HomebrewCurlDownloadStrategy, HomebrewCurlDownloadStrategyError, IO, Keg, KegOnlyReason, KegUnspecifiedError, LazyObject, LinkageCacheStore, LinkageChecker, LinuxRequirement, LinuxRunnerSpec, Livecheck, LocalBottleDownloadStrategy, Locale, LockFile, MacOSRequirement, MacOSRunnerSpec, MacOSVersion, Mechanize, MercurialDownloadStrategy, Messages, Method, MethodDeprecatedError, Migrator, MissingApplyError, Mktemp, Module, MultipleVersionsInstalledError, NilClass, NoSuchKegError, NoUnzipCurlDownloadStrategy, NotAKegError, Numeric, Object, OperationInProgressError, Option, Options, PATH, Pathname, PkgVersion, PourBottleCheck, Reporter, ReporterHub, Requirement, Requirements, Resource, ResourceMissingError, ResourceStageContext, SBOM, Sandbox, ShebangDetectionError, SoftwareSpec, String, StringInreplaceExtension, StringPatch, SubversionDownloadStrategy, Symbol, SystemCommand, Tab, Tap, TapAlreadyTappedError, TapConfig, TapCoreRemoteMismatchError, TapFormulaAmbiguityError, TapFormulaClassUnavailableError, TapFormulaOrCaskUnavailableError, TapFormulaUnavailableError, TapFormulaUnreadableError, TapNoCustomRemoteError, TapRemoteMismatchError, TapUnavailableError, TestRunnerFormula, Time, TrueClass, URL, UnbottledError, UnboundMethod, UnsatisfiedRequirements, UnsupportedInstallationMethod, UsageError, User, UsesFromMacOSDependency, VCSDownloadStrategy, Version, XcodeRequirement - - -

- - -

- Constant Summary - collapse -

- -
- -
TEST_TIMEOUT_SECONDS = - -
-
5 * 60
- -
HOMEBREW_API_DEFAULT_DOMAIN = - -
-
ENV.fetch("HOMEBREW_API_DEFAULT_DOMAIN").freeze
- -
HOMEBREW_BOTTLE_DEFAULT_DOMAIN = - -
-
ENV.fetch("HOMEBREW_BOTTLE_DEFAULT_DOMAIN").freeze
- -
HOMEBREW_BREW_DEFAULT_GIT_REMOTE = - -
-
ENV.fetch("HOMEBREW_BREW_DEFAULT_GIT_REMOTE").freeze
- -
HOMEBREW_CORE_DEFAULT_GIT_REMOTE = - -
-
ENV.fetch("HOMEBREW_CORE_DEFAULT_GIT_REMOTE").freeze
- -
HOMEBREW_DEFAULT_CACHE = - -
-
ENV.fetch("HOMEBREW_DEFAULT_CACHE").freeze
- -
HOMEBREW_DEFAULT_LOGS = - -
-
ENV.fetch("HOMEBREW_DEFAULT_LOGS").freeze
- -
HOMEBREW_DEFAULT_TEMP = - -
-
ENV.fetch("HOMEBREW_DEFAULT_TEMP").freeze
- -
HOMEBREW_REQUIRED_RUBY_VERSION = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
ARGV.first.freeze
- -
HOMEBREW_PRODUCT = - -
-
ENV.fetch("HOMEBREW_PRODUCT").freeze
- -
HOMEBREW_VERSION = - -
-
ENV.fetch("HOMEBREW_VERSION").freeze
- -
HOMEBREW_WWW = - -
-
"https://brew.sh"
- -
HOMEBREW_API_WWW = - -
-
"https://formulae.brew.sh"
- -
HOMEBREW_DOCS_WWW = - -
-
"https://docs.brew.sh"
- -
HOMEBREW_SYSTEM = - -
-
ENV.fetch("HOMEBREW_SYSTEM").freeze
- -
HOMEBREW_PROCESSOR = - -
-
ENV.fetch("HOMEBREW_PROCESSOR").freeze
- -
HOMEBREW_PHYSICAL_PROCESSOR = - -
-
ENV.fetch("HOMEBREW_PHYSICAL_PROCESSOR").freeze
- -
HOMEBREW_BREWED_CURL_PATH = - -
-
Pathname(ENV.fetch("HOMEBREW_BREWED_CURL_PATH")).freeze
- -
HOMEBREW_USER_AGENT_CURL = - -
-
ENV.fetch("HOMEBREW_USER_AGENT_CURL").freeze
- -
HOMEBREW_USER_AGENT_RUBY = - -
-
"#{ENV.fetch("HOMEBREW_USER_AGENT")} ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}".freeze
- -
HOMEBREW_USER_AGENT_FAKE_SAFARI = - -
-
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 " \
-"(KHTML, like Gecko) Version/17.0 Safari/605.1.15"
- -
HOMEBREW_GITHUB_PACKAGES_AUTH = - -
-
ENV.fetch("HOMEBREW_GITHUB_PACKAGES_AUTH").freeze
- -
HOMEBREW_DEFAULT_PREFIX = - -
-
ENV.fetch("HOMEBREW_GENERIC_DEFAULT_PREFIX").freeze
- -
HOMEBREW_DEFAULT_REPOSITORY = - -
-
ENV.fetch("HOMEBREW_GENERIC_DEFAULT_REPOSITORY").freeze
- -
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX = - -
-
ENV.fetch("HOMEBREW_MACOS_ARM_DEFAULT_PREFIX").freeze
- -
HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY = - -
-
ENV.fetch("HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY").freeze
- -
HOMEBREW_LINUX_DEFAULT_PREFIX = - -
-
ENV.fetch("HOMEBREW_LINUX_DEFAULT_PREFIX").freeze
- -
HOMEBREW_LINUX_DEFAULT_REPOSITORY = - -
-
ENV.fetch("HOMEBREW_LINUX_DEFAULT_REPOSITORY").freeze
- -
HOMEBREW_PREFIX_PLACEHOLDER = - -
-
"$HOMEBREW_PREFIX"
- -
HOMEBREW_CELLAR_PLACEHOLDER = - -
-
"$HOMEBREW_CELLAR"
- -
HOMEBREW_HOME_PLACEHOLDER = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Needs a leading slash to avoid File.expand.path complaining about non-absolute home.

- - -
-
-
- - -
-
-
"/$HOME"
- -
HOMEBREW_CASK_APPDIR_PLACEHOLDER = - -
-
"$APPDIR"
- -
HOMEBREW_MACOS_NEWEST_UNSUPPORTED = - -
-
ENV.fetch("HOMEBREW_MACOS_NEWEST_UNSUPPORTED").freeze
- -
HOMEBREW_MACOS_OLDEST_SUPPORTED = - -
-
ENV.fetch("HOMEBREW_MACOS_OLDEST_SUPPORTED").freeze
- -
HOMEBREW_MACOS_OLDEST_ALLOWED = - -
-
ENV.fetch("HOMEBREW_MACOS_OLDEST_ALLOWED").freeze
- -
HOMEBREW_PULL_API_REGEX = - -
-
%r{https://api\.github\.com/repos/([\w-]+)/([\w-]+)?/pulls/(\d+)}
- -
HOMEBREW_PULL_OR_COMMIT_URL_REGEX = - -
-
%r[https://github\.com/([\w-]+)/([\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})]
- -
HOMEBREW_BOTTLES_EXTNAME_REGEX = - -
-
/\.([a-z0-9_]+)\.bottle\.(?:(\d+)\.)?tar\.gz$/
- -
ORIGINAL_PATHS = - -
-
PATH.new(ENV.fetch("HOMEBREW_PATH")).filter_map do |p|
-  Pathname.new(p).expand_path
-rescue
-  nil
-end.freeze
- -
SOURCE_PATH = - -
-
(HOMEBREW_LIBRARY_PATH/"manpages").freeze
- -
TARGET_MAN_PATH = - -
-
(HOMEBREW_REPOSITORY/"manpages").freeze
- -
TARGET_DOC_PATH = - -
-
(HOMEBREW_REPOSITORY/"docs").freeze
- -
BUG_REPORTS_URL = - -
-
"https://github.com/Homebrew/homebrew-cask#reporting-bugs"
- -
GZIP_BUFFER_SIZE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Apple's gzip also uses zlib so use the same buffer size here. -https://github.com/apple-oss-distributions/file_cmds/blob/file_cmds-400/gzip/gzip.c#L147

- - -
-
-
- - -
-
-
T.let(64 * 1024, Integer)
- -
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,    type: :method_call }],
-  [{ name: :version,   type: :method_call }],
-  [{ name: :sha256,    type: :method_call }],
-  [{ name: :license, type: :method_call }],
-  [{ name: :revision, type: :method_call }],
-  [{ name: :version_scheme, type: :method_call }],
-  [{ name: :head,      type: :method_call }],
-  [{ name: :stable,    type: :block_call }],
-  [{ name: :livecheck, type: :block_call }],
-  [{ name: :bottle,    type: :block_call }],
-  [{ name: :pour_bottle?, type: :block_call }],
-  [{ name: :head,      type: :block_call }],
-  [{ name: :bottle,    type: :method_call }],
-  [{ name: :keg_only,  type: :method_call }],
-  [{ name: :option,    type: :method_call }],
-  [{ name: :deprecated_option, type: :method_call }],
-  [{ name: :disable!, type: :method_call }],
-  [{ name: :deprecate!, type: :method_call }],
-  [{ name: :depends_on, type: :method_call }],
-  [{ name: :uses_from_macos, type: :method_call }],
-  [{ name: :on_macos, type: :block_call }],
-  *MacOSVersion::SYMBOLS.keys.map do |os_name|
-    [{ name: :"on_#{os_name}", type: :block_call }]
-  end,
-  [{ name: :on_system, type: :block_call }],
-  [{ name: :on_linux, type: :block_call }],
-  [{ name: :on_arm, type: :block_call }],
-  [{ name: :on_intel, type: :block_call }],
-  [{ name: :conflicts_with, type: :method_call }],
-  [{ name: :skip_clean, type: :method_call }],
-  [{ name: :cxxstdlib_check, type: :method_call }],
-  [{ name: :link_overwrite, type: :method_call }],
-  [{ name: :fails_with, type: :method_call }, { name: :fails_with, type: :block_call }],
-  [{ name: :go_resource, type: :block_call }, { name: :resource, type: :block_call }],
-  [{ name: :patch, type: :method_call }, { name: :patch, type: :block_call }],
-  [{ name: :needs, type: :method_call }],
-  [{ name: :allow_network_access!, type: :method_call }],
-  [{ name: :deny_network_access!, type: :method_call }],
-  [{ name: :install, type: :method_definition }],
-  [{ name: :post_install, type: :method_definition }],
-  [{ name: :caveats, type: :method_definition }],
-  [{ name: :plist_options, type: :method_call }, { name: :plist, type: :method_definition }],
-  [{ name: :test, type: :block_call }],
-].freeze, T::Array[[{ name: Symbol, type: Symbol }]])
- -
OFFICIAL_CASK_TAPS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

- - -
-
-
- - -
-
-
%w[
-  cask
-].freeze
- -
OFFICIAL_CMD_TAPS = - -
-
{
-  "homebrew/aliases"           => ["alias", "unalias"],
-  "homebrew/bundle"            => ["bundle"],
-  "homebrew/command-not-found" => ["command-not-found-init", "which-formula", "which-update"],
-  "homebrew/test-bot"          => ["test-bot"],
-  "homebrew/services"          => ["services"],
-}.freeze
- -
DEPRECATED_OFFICIAL_TAPS = - -
-
%w[
-  apache
-  binary
-  cask-drivers
-  cask-eid
-  cask-fonts
-  cask-versions
-  completions
-  devel-only
-  dupes
-  emacs
-  fuse
-  games
-  gui
-  head-only
-  livecheck
-  nginx
-  php
-  python
-  science
-  tex
-  versions
-  x11
-].freeze
- -
HOMEBREW_TAP_FORMULA_NAME_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match a formula name.

- - -
-
-
- - -
-
-
T.let(/(?<name>[\w+\-.@]+)/, Regexp)
- -
HOMEBREW_TAP_FORMULA_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match taps' formulae, e.g. someuser/sometap/someformula.

- - -
-
-
- - -
-
-
T.let(
-  %r{\A(?<user>[^/]+)/(?<repo>[^/]+)/#{HOMEBREW_TAP_FORMULA_NAME_REGEX.source}\Z},
-  Regexp,
-)
- -
HOMEBREW_DEFAULT_TAP_FORMULA_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match default formula taps' formulae, e.g. homebrew/core/someformula or someformula.

- - -
-
-
- - -
-
-
T.let(
-  %r{\A(?:[Hh]omebrew/(?:homebrew-)?core/)?(?<name>#{HOMEBREW_TAP_FORMULA_NAME_REGEX.source})\Z},
-  Regexp,
-)
- -
HOMEBREW_TAP_CASK_TOKEN_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match a cask token.

- - -
-
-
- - -
-
-
T.let(/(?<token>[a-z0-9\-_]+(?:@[a-z0-9\-_.]+)?)/, Regexp)
- -
HOMEBREW_TAP_CASK_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match taps' casks, e.g. someuser/sometap/somecask.

- - -
-
-
- - -
-
-
T.let(
-  %r{\A(?<user>[^/]+)/(?<repo>[^/]+)/#{HOMEBREW_TAP_CASK_TOKEN_REGEX.source}\Z},
-  Regexp,
-)
- -
HOMEBREW_DEFAULT_TAP_CASK_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match default cask taps' casks, e.g. homebrew/cask/somecask or somecask.

- - -
-
-
- - -
-
-
T.let(
-  %r{\A(?:[Hh]omebrew/(?:homebrew-)?cask/)?#{HOMEBREW_TAP_CASK_TOKEN_REGEX.source}\Z},
-  Regexp,
-)
- -
HOMEBREW_TAP_DIR_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match taps' directory paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap.

- - -
-
-
- - -
-
-
T.let(
-  %r{#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Taps/(?<user>[^/]+)/(?<repo>[^/]+)},
-  Regexp,
-)
- -
HOMEBREW_TAP_PATH_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match taps' formula paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap/someformula.

- - -
-
-
- - -
-
-
T.let(Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{(?:/.*)?\Z}.source).freeze, Regexp)
- -
HOMEBREW_CASK_TAP_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match official cask taps, e.g homebrew/cask.

- - -
-
-
- - -
-
-
T.let(
-  %r{(?:([Cc]askroom)/(cask)|([Hh]omebrew)/(?:homebrew-)?(cask|cask-[\w-]+))},
-  Regexp,
-)
- -
HOMEBREW_CASK_TAP_CASK_REGEX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Match official taps' casks, e.g. homebrew/cask/somecask.

- - -
-
-
- - -
-
-
T.let(
-  %r{\A#{HOMEBREW_CASK_TAP_REGEX.source}/#{HOMEBREW_TAP_CASK_TOKEN_REGEX.source}\Z},
-  Regexp,
-)
- -
HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX = - -
-
T.let(/\A(home|linux)brew-/, Regexp)
- -
HOMEBREW_BREW_FILE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Path to bin/brew main executable in HOMEBREW_PREFIX

- - -
-
-
- - -
-
-
Pathname(ENV.fetch("HOMEBREW_BREW_FILE")).freeze
- -
HOMEBREW_PREFIX = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where we link under

- - -
-
-
- - -
-
-
Pathname(ENV.fetch("HOMEBREW_PREFIX")).freeze
- -
HOMEBREW_REPOSITORY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where .git is found

- - -
-
-
- - -
-
-
Pathname(ENV.fetch("HOMEBREW_REPOSITORY")).freeze
- -
HOMEBREW_LIBRARY = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where we store most of Homebrew, taps and various metadata

- - -
-
-
- - -
-
-
Pathname(ENV.fetch("HOMEBREW_LIBRARY")).freeze
- -
HOMEBREW_SHIMS_PATH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where shim scripts for various build and SCM tools are stored

- - -
-
-
- - -
-
-
(HOMEBREW_LIBRARY/"Homebrew/shims").freeze
- -
HOMEBREW_DATA_PATH = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where external data that has been incorporated into Homebrew is stored

- - -
-
-
- - -
-
-
(HOMEBREW_LIBRARY/"Homebrew/data").freeze
- -
HOMEBREW_LINKED_KEGS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where we store symlinks to currently linked kegs

- - -
-
-
- - -
-
-
(HOMEBREW_PREFIX/"var/homebrew/linked").freeze
- -
HOMEBREW_PINNED_KEGS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where we store symlinks to currently version-pinned kegs

- - -
-
-
- - -
-
-
(HOMEBREW_PREFIX/"var/homebrew/pinned").freeze
- -
HOMEBREW_LOCKS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where we store lock files

- - -
-
-
- - -
-
-
(HOMEBREW_PREFIX/"var/homebrew/locks").freeze
- -
HOMEBREW_CELLAR = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where we store built products

- - -
-
-
- - -
-
-
Pathname(ENV.fetch("HOMEBREW_CELLAR")).freeze
- -
HOMEBREW_CASKROOM = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where we store Casks

- - -
-
-
- - -
-
-
Pathname(ENV.fetch("HOMEBREW_CASKROOM")).freeze
- -
HOMEBREW_CACHE = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where downloads (bottles, source tarballs, etc.) are cached

- - -
-
-
- - -
-
-
Pathname(ENV.fetch("HOMEBREW_CACHE")).freeze
- -
HOMEBREW_CACHE_FORMULA = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where formulae installed via URL are cached

- - -
-
-
- - -
-
-
(HOMEBREW_CACHE/"Formula").freeze
- -
HOMEBREW_LOGS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Where build, postinstall and test logs of formulae are written to

- - -
-
-
- - -
-
-
Pathname(ENV.fetch("HOMEBREW_LOGS")).expand_path.freeze
- -
HOMEBREW_MAINTAINER_JSON = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Path to the list of Homebrew maintainers as a JSON file

- - -
-
-
- - -
-
-
(HOMEBREW_REPOSITORY/".github/maintainers.json").freeze
- -
HOMEBREW_TEMP = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

Must use /tmp instead of TMPDIR because long paths break Unix domain sockets

- - -
-
-
- - -
-
-
Pathname(ENV.fetch("HOMEBREW_TEMP")).then do |tmp|
-  tmp.mkpath unless tmp.exist?
-  tmp.realpath
-end.freeze
- -
HOMEBREW_RUBY_EXEC_ARGS = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

The Ruby path and args to use for forked Ruby calls

- - -
-
-
- - -
-
-
[
-  RUBY_PATH,
-  ENV.fetch("HOMEBREW_RUBY_WARNINGS"),
-  ENV.fetch("HOMEBREW_RUBY_DISABLE_OPTIONS"),
-].freeze
- -
HOMEBREW_LIBRARY_PATH = - -
-
Pathname(dir).parent.realpath.freeze
- -
RUBY_PATH = - -
-
Pathname.new(RbConfig.ruby).freeze
- -
RUBY_BIN = - -
-
RUBY_PATH.dirname.freeze
- -
UPGRADE_REINSTALL_SKIP_DIRECTIVES = - -
-
[:quit, :signal].freeze
- -
LINUXBREW_CORE_MIGRATION_LIST = -
-
-

- This constant is part of a private API. - This constant may only be used in the Homebrew/brew repository. - Third parties should avoid using this constant if possible, as it may be removed or changed without warning. -

-

List of formulae that had a revision in linuxbrew-core -that was different than in homebrew-core -We will use this list to modify the version_scheme -during the migration from linuxbrew-core to homebrew-core.

- - -
-
-
- - -
-
-
%w[
-  afuse
-  apng2gif
-  apr-util
-  archivemount
-  argon2
-  arpack
-  asciinema
-  atdtool
-  augustus
-  avfs
-  bandcamp-dl
-  cairo
-  ccls
-  codemod
-  cquery
-  credstash
-  csvtomd
-  cvs
-  cxxtest
-  datetime-fortran
-  ddd
-  diceware
-  docbook2x
-  docker-squash
-  doitlive
-  double-conversion
-  exif
-  expect
-  fades
-  fastme
-  fbi-servefiles
-  foma
-  fontconfig
-  freeglut
-  ftgl
-  gcc@5
-  gettext
-  gflags
-  ghc@8.6
-  ghc@8.8
-  git-remote-hg
-  gitfs
-  gitless
-  gitup
-  glade
-  glew
-  glui
-  goolabs
-  gperftools
-  grip
-  gtkmm
-  hdf5@1.8
-  htop
-  intltool
-  io
-  jed
-  jinja2-cli
-  legit
-  libebml
-  libexif
-  libffi
-  libgetdata
-  libhttpseverywhere
-  libproxy
-  libtool
-  libxslt
-  literate-git
-  llvm@11
-  llvm@7
-  llvm@8
-  llvm@9
-  lua
-  lua@5.1
-  lua@5.3
-  magic-wormhole
-  mecab
-  mosh
-  mps-youtube
-  ncview
-  notifiers
-  openmotif
-  osmfilter
-  pachi
-  packmol
-  passpie
-  pius
-  pkg-config
-  plotutils
-  plplot
-  postgresql@9.4
-  postgresql@9.5
-  pssh
-  pup
-  pyvim
-  ratfor
-  remarshal
-  reprepro
-  rtv
-  s3cmd
-  scalapack
-  securefs
-  softhsm
-  statik
-  stormssh
-  superlu
-  tasksh
-  termtosvg
-  tinyxml
-  vsts-cli
-  xclip
-  xerces-c
-  xmlto
-  xmltoman
-  xmount
-  xxhash
-  zabbix-cli
-].freeze
- -
- - - - - - - - - - -
- - - -
- - \ No newline at end of file From c44c77e14fd739dfa3d1181122c4f5b44f7f264d Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Wed, 12 Jun 2024 20:18:47 +0000 Subject: [PATCH 2/2] Update scheduled workflow to use pages v4 --- .github/workflows/scheduled.yml | 85 +++++++++++++++++++++++++-------- 1 file changed, 64 insertions(+), 21 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 40c37c1e3..f80c13401 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -2,23 +2,24 @@ name: Scheduled regeneration on: push: - paths: - - .github/workflows/scheduled.yml + branches: + - master + pull_request: schedule: # Once every hour - cron: "30 * * * *" + workflow_dispatch: concurrency: - group: scheduled + group: scheduled-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true -permissions: - contents: write - jobs: generate: if: startsWith( github.repository, 'Homebrew/' ) - runs-on: ubuntu-22.04 + name: Generate and build documentation site + runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Set up Git repository uses: actions/checkout@v4 @@ -33,26 +34,68 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1 with: - ruby-version: "3.1" bundler-cache: true - - name: Configure Git user - uses: Homebrew/actions/git-user-config@master - with: - username: BrewTestBot - - name: Generate site run: | ln -s $(brew --repo) brew bundle exec rake yard build - - name: Commit changes + - name: Upload pages artifact + uses: actions/upload-pages-artifact@v3 + + deploy: + needs: generate + if: ${{ github.ref_name == 'master' }} + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + outputs: + deploy_url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + + deploy-issue: + name: Open/close deploy issue + needs: [generate, deploy] + if: ${{ always() && github.ref_name == 'master' }} + env: + GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} + REPO: ${{ github.repository }} + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Find existing deploy failure issue run: | - git reset origin/master - git add docs - if ! git diff --no-patch --exit-code HEAD -- docs; then - git commit -m "docs: updates from Homebrew/brew" docs - fi + EXISTING_ISSUE=$(gh issue list --repo "$REPO" --author BrewTestBot --label 'deploy failure' | awk '{print $1}') + echo "EXISTING_ISSUE=$EXISTING_ISSUE" >> $GITHUB_ENV + echo "WORKFLOW_URL=https://github.com/Homebrew/rubydoc.brew.sh/actions/runs/$RUN_ID" >> $GITHUB_ENV + env: + RUN_ID: ${{ github.run_id }} - - name: Push commits - uses: Homebrew/actions/git-try-push@master + - name: Report deploy failure + if: ${{ contains(needs.*.result, 'failure') }} + run: | + ISSUE_TITLE="rubydoc.brew.sh deployment failed!" + ISSUE_BODY="The most recent [rubydoc.brew.sh deployment failed]($WORKFLOW_URL)." + if [ -n "$EXISTING_ISSUE" ]; then + gh issue edit "$EXISTING_ISSUE" --repo "$REPO" --body "$(echo -e "$ISSUE_BODY")" + else + gh issue create --repo "$REPO" --title "$ISSUE_TITLE" --label "deploy failure" --body "$(echo -e "$ISSUE_BODY")" + fi + + - name: Report deploy success + if: ${{ needs.deploy.result == 'success' }} + run: | + COMMENT_BODY="The most recent [rubydoc.brew.sh deployment succeeded]($WORKFLOW_URL). Closing issue." + if [ -n "$EXISTING_ISSUE" ]; then + gh issue comment "$EXISTING_ISSUE" --repo "$REPO" --body "$(echo -e "$COMMENT_BODY")" + gh issue close "$EXISTING_ISSUE" --repo "$REPO" + fi \ No newline at end of file