Module: Hbc

Includes:
Locations, Scopes, Utils
Defined in:
Library/Homebrew/cask/lib/hbc/dsl/caveats.rb,
Library/Homebrew/cask/lib/hbc.rb,
Library/Homebrew/cask/lib/hbc/cli.rb,
Library/Homebrew/cask/lib/hbc/dsl.rb,
Library/Homebrew/cask/lib/hbc/pkg.rb,
Library/Homebrew/cask/lib/hbc/url.rb,
Library/Homebrew/cask/lib/hbc/cask.rb,
Library/Homebrew/cask/lib/hbc/audit.rb,
Library/Homebrew/cask/lib/hbc/cache.rb,
Library/Homebrew/cask/lib/hbc/utils.rb,
Library/Homebrew/cask/lib/hbc/config.rb,
Library/Homebrew/cask/lib/hbc/scopes.rb,
Library/Homebrew/cask/lib/hbc/staged.rb,
Library/Homebrew/cask/lib/hbc/verify.rb,
Library/Homebrew/cask/lib/hbc/auditor.rb,
Library/Homebrew/cask/lib/hbc/cli/cat.rb,
Library/Homebrew/cask/lib/hbc/cli/zap.rb,
Library/Homebrew/cask/lib/hbc/dsl/gpg.rb,
Library/Homebrew/cask/lib/hbc/version.rb,
Library/Homebrew/cask/lib/hbc/artifact.rb,
Library/Homebrew/cask/lib/hbc/caskroom.rb,
Library/Homebrew/cask/lib/hbc/cli/edit.rb,
Library/Homebrew/cask/lib/hbc/cli/home.rb,
Library/Homebrew/cask/lib/hbc/cli/info.rb,
Library/Homebrew/cask/lib/hbc/cli/list.rb,
Library/Homebrew/cask/lib/hbc/download.rb,
Library/Homebrew/cask/lib/hbc/dsl/base.rb,
Library/Homebrew/cask/lib/hbc/metadata.rb,
Library/Homebrew/cask/lib/hbc/checkable.rb,
Library/Homebrew/cask/lib/hbc/cli/audit.rb,
Library/Homebrew/cask/lib/hbc/cli/fetch.rb,
Library/Homebrew/cask/lib/hbc/cli/style.rb,
Library/Homebrew/cask/lib/hbc/container.rb,
Library/Homebrew/cask/lib/hbc/installer.rb,
Library/Homebrew/cask/lib/hbc/locations.rb,
Library/Homebrew/cask/lib/hbc/cli/create.rb,
Library/Homebrew/cask/lib/hbc/cli/doctor.rb,
Library/Homebrew/cask/lib/hbc/cli/search.rb,
Library/Homebrew/cask/lib/hbc/exceptions.rb,
Library/Homebrew/cask/lib/hbc/verify/gpg.rb,
Library/Homebrew/cask/lib/hbc/cask_loader.rb,
Library/Homebrew/cask/lib/hbc/cli/cleanup.rb,
Library/Homebrew/cask/lib/hbc/cli/install.rb,
Library/Homebrew/cask/lib/hbc/cli/options.rb,
Library/Homebrew/cask/lib/hbc/cli/upgrade.rb,
Library/Homebrew/cask/lib/hbc/dsl/appcast.rb,
Library/Homebrew/cask/lib/hbc/dsl/version.rb,
Library/Homebrew/cask/lib/hbc/artifact/app.rb,
Library/Homebrew/cask/lib/hbc/artifact/pkg.rb,
Library/Homebrew/cask/lib/hbc/artifact/zap.rb,
Library/Homebrew/cask/lib/hbc/cli/outdated.rb,
Library/Homebrew/cask/lib/hbc/container/xz.rb,
Library/Homebrew/cask/lib/hbc/artifact/font.rb,
Library/Homebrew/cask/lib/hbc/cli/--version.rb,
Library/Homebrew/cask/lib/hbc/cli/reinstall.rb,
Library/Homebrew/cask/lib/hbc/cli/uninstall.rb,
Library/Homebrew/cask/lib/hbc/container/air.rb,
Library/Homebrew/cask/lib/hbc/container/cab.rb,
Library/Homebrew/cask/lib/hbc/container/dmg.rb,
Library/Homebrew/cask/lib/hbc/container/gpg.rb,
Library/Homebrew/cask/lib/hbc/container/otf.rb,
Library/Homebrew/cask/lib/hbc/container/pkg.rb,
Library/Homebrew/cask/lib/hbc/container/rar.rb,
Library/Homebrew/cask/lib/hbc/container/sit.rb,
Library/Homebrew/cask/lib/hbc/container/tar.rb,
Library/Homebrew/cask/lib/hbc/container/ttf.rb,
Library/Homebrew/cask/lib/hbc/container/xar.rb,
Library/Homebrew/cask/lib/hbc/container/zip.rb,
Library/Homebrew/cask/lib/hbc/dsl/container.rb,
Library/Homebrew/cask/lib/hbc/dsl/preflight.rb,
Library/Homebrew/cask/lib/hbc/artifact/moved.rb,
Library/Homebrew/cask/lib/hbc/artifact/suite.rb,
Library/Homebrew/cask/lib/hbc/container/base.rb,
Library/Homebrew/cask/lib/hbc/container/gzip.rb,
Library/Homebrew/cask/lib/hbc/container/lzma.rb,
Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb,
Library/Homebrew/cask/lib/hbc/dsl/postflight.rb,
Library/Homebrew/cask/lib/hbc/system_command.rb,
Library/Homebrew/cask/lib/hbc/artifact/binary.rb,
Library/Homebrew/cask/lib/hbc/container/bzip2.rb,
Library/Homebrew/cask/lib/hbc/container/naked.rb,
Library/Homebrew/cask/lib/hbc/qualified_token.rb,
Library/Homebrew/cask/lib/hbc/verify/checksum.rb,
Library/Homebrew/cask/lib/hbc/artifact/service.rb,
Library/Homebrew/cask/lib/hbc/dsl/stanza_proxy.rb,
Library/Homebrew/cask/lib/hbc/topological_hash.rb,
Library/Homebrew/cask/lib/hbc/artifact/artifact.rb,
Library/Homebrew/cask/lib/hbc/artifact/prefpane.rb,
Library/Homebrew/cask/lib/hbc/artifact/qlplugin.rb,
Library/Homebrew/cask/lib/hbc/cask_dependencies.rb,
Library/Homebrew/cask/lib/hbc/cli/internal_dump.rb,
Library/Homebrew/cask/lib/hbc/cli/internal_help.rb,
Library/Homebrew/cask/lib/hbc/download_strategy.rb,
Library/Homebrew/cask/lib/hbc/artifact/installer.rb,
Library/Homebrew/cask/lib/hbc/artifact/relocated.rb,
Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb,
Library/Homebrew/cask/lib/hbc/artifact/uninstall.rb,
Library/Homebrew/cask/lib/hbc/container/criteria.rb,
Library/Homebrew/cask/lib/hbc/dsl/conflicts_with.rb,
Library/Homebrew/cask/lib/hbc/artifact/dictionary.rb,
Library/Homebrew/cask/lib/hbc/artifact/stage_only.rb,
Library/Homebrew/cask/lib/hbc/artifact/vst_plugin.rb,
Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb,
Library/Homebrew/cask/lib/hbc/container/directory.rb,
Library/Homebrew/cask/lib/hbc/container/seven_zip.rb,
Library/Homebrew/cask/lib/hbc/artifact/colorpicker.rb,
Library/Homebrew/cask/lib/hbc/artifact/vst3_plugin.rb,
Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb,
Library/Homebrew/cask/lib/hbc/container/executable.rb,
Library/Homebrew/cask/lib/hbc/artifact/input_method.rb,
Library/Homebrew/cask/lib/hbc/artifact/screen_saver.rb,
Library/Homebrew/cask/lib/hbc/container/generic_unar.rb,
Library/Homebrew/cask/lib/hbc/dsl/uninstall_preflight.rb,
Library/Homebrew/cask/lib/hbc/artifact/internet_plugin.rb,
Library/Homebrew/cask/lib/hbc/artifact/preflight_block.rb,
Library/Homebrew/cask/lib/hbc/container/svn_repository.rb,
Library/Homebrew/cask/lib/hbc/dsl/uninstall_postflight.rb,
Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb,
Library/Homebrew/cask/lib/hbc/artifact/postflight_block.rb,
Library/Homebrew/cask/lib/hbc/artifact/abstract_artifact.rb,
Library/Homebrew/cask/lib/hbc/artifact/audio_unit_plugin.rb,
Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb,
Library/Homebrew/cask/lib/hbc/cli/abstract_internal_command.rb,
Library/Homebrew/cask/lib/hbc/artifact/abstract_flight_block.rb,
Library/Homebrew/cask/lib/hbc/cli/internal_appcast_checkpoint.rb,
Library/Homebrew/cask/lib/hbc/cli/internal_audit_modified_casks.rb

Overview

We abuse Homebrew's download strategies considerably here.

  • Our downloader instances only invoke the fetch and clear_cache methods, ignoring stage

  • Our overridden fetch methods are expected to return a value: the successfully downloaded file.

Defined Under Namespace

Modules: Artifact, Cache, CaskLoader, Caskroom, Checkable, Locations, Metadata, QualifiedToken, Scopes, Staged, Utils, Verify Classes: AbstractCaskErrorWithToken, AbstractDownloadStrategy, Audit, Auditor, CLI, Cask, CaskAlreadyCreatedError, CaskAlreadyInstalledError, CaskCommandFailedError, CaskConflictError, CaskCyclicDependencyError, CaskDependencies, CaskError, CaskInvalidError, CaskNoShasumError, CaskNotInstalledError, CaskSelfReferencingDependencyError, CaskSha256Error, CaskSha256MismatchError, CaskSha256MissingError, CaskTokenMismatchError, CaskUnavailableError, CaskUnspecifiedError, CaskX11DependencyError, Config, Container, CurlDownloadStrategy, CurlPostDownloadStrategy, DSL, Download, HbVCSDownloadStrategy, Installer, Pkg, SubversionDownloadStrategy, SystemCommand, TopologicalHash, URL

Class Method Summary collapse

Methods included from Utils

clear_git_available_cache, clear_svn_version_cache, ensure_git_installed!, git_available?, git_path, git_remote_exists, git_version, popen, popen_read, popen_write, safe_fork, svn_available?, svn_remote_exists

Methods included from Scopes

included

Methods included from Locations

included

Class Method Details

.full_versionObject



2
3
4
5
6
7
8
9
# File 'Library/Homebrew/cask/lib/hbc/version.rb', line 2

def self.full_version
  @full_version ||= begin
    <<~EOS
      Homebrew-Cask #{HOMEBREW_VERSION}
      caskroom/homebrew-cask #{Hbc.default_tap.version_string}
    EOS
  end
end

.initObject



38
39
40
41
# File 'Library/Homebrew/cask/lib/hbc.rb', line 38

def self.init
  Cache.ensure_cache_exists
  Caskroom.ensure_caskroom_exists
end