Class: AbstractCoreTap Abstract Private
- Extended by:
- T::Helpers
- Defined in:
- tap/abstract_core_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.
It cannot be directly instantiated. Subclasses must implement the abstract methods below.
An abstract Tap class for the homebrew-core and homebrew-cask.
Direct Known Subclasses
Constant Summary collapse
- 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.
type_member { { fixed: T::Hash[T.any(String, Symbol), T.untyped] } }
- Elem =
This constant is part of a private API. This constant may only be 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(:out) { { fixed: Tap } }
Constants inherited from Tap
Tap::GITHUB_REMOTE_PREFIX_REGEX, Tap::HOMEBREW_TAP_JSON_FILES, Tap::NORMALIZE_REMOTE_HOSTS, Tap::REMOTE_HOST_REGEX, Tap::REMOTE_SCHEME_USERINFO_REGEX
Instance Attribute Summary
Attributes inherited from Tap
#full_name, #full_repository, #git_repository, #name, #path, #repository, #user
Instance Method Summary collapse
- #ensure_installed! ⇒ void private
- #formula_file_to_name(file) ⇒ String private
-
#implicitly_trusted?(remote: self.remote) ⇒ Boolean
private
In API mode the formulae and casks come from the API rather than this tap's Git remote, so the remote is irrelevant to what is loaded.
- #should_report_analytics? ⇒ Boolean private
-
#use_api? ⇒ Boolean
private
Cask CI reads the cask tap checkout while core formulae can still use the API.
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, #apply_redirected_remote!, #audit_exception, #audit_exceptions, #autobump, #canonical_remote?, #cask_dir, #cask_file?, #cask_files, #cask_files_by_name, #cask_renames, #cask_reverse_renames, #cask_tokens, #clear_cache, #command_dir, #command_files, #config, #contents, #core_cask_tap?, #core_tap?, core_taps, #custom_remote?, #default_remote, #disabled_new_usr_local_relocation_formulae, 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_command!, #git_head, #git_last_commit, #initialize, #install, installed, #installed?, #issues_url, #link_completions_and_manpages, #matches_reference?, #new_cask_path, #new_formula_path, normalize_remote, #official?, #official_git_checkout?, #potential_formula_dirs, #prefix_to_versioned_formulae_names, #private?, #reference, #relative_cask_path, #remote, remote_reference?, #remote_repository, remote_to_reference, #repository_var_suffix, #reverse_tap_migrations_renames, same_remote?, #shallow?, #style_exceptions, #synced_versions_formulae, tap_list_references, tap_migration_oldnames, #tap_migrations, #to_hash, #uninstall, untapped_official_taps, #update_remote_from_git_redirect!, #uses_custom_remote?, with_cask_token, with_formula_name, #worktree_source_tap_path_for
Methods included from Enumerable
Methods included from Cacheable
Methods included from Utils::Output::Mixin
#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_once, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_cannot_install, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_incompatible, #pretty_install_status, #pretty_installed, #pretty_removed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning
Methods included from Utils::Path
formula_installed_prefixes, formula_opt_bin_env, formula_opt_bin_path, install_info, loadable_package_path?, tap_package_path, uninstall_info, valid_package_name?
Methods included from Utils::Path::Helpers
#child_of?, #cp_path_sub, #ensure_child_of!, #ensure_writable, #relative_path_from, #resolved_path, #resolved_path_exists?, #rmdir_if_possible, #text_executable?
Methods included from Utils::Path::FormulaHelpers
#formula_any_version_installed?, #formula_opt_bin, #formula_opt_include, #formula_opt_lib, #formula_opt_libexec, #formula_opt_prefix
Constructor Details
This class inherits a constructor from Tap
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.
18 19 20 21 22 23 |
# File 'tap/abstract_core_tap.rb', line 18 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.
41 42 43 |
# File 'tap/abstract_core_tap.rb', line 41 def formula_file_to_name(file) file.basename(".rb").to_s end |
#implicitly_trusted?(remote: self.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.
In API mode the formulae and casks come from the API rather than this tap's Git remote, so the remote is irrelevant to what is loaded.
34 35 36 37 38 |
# File 'tap/abstract_core_tap.rb', line 34 def implicitly_trusted?(remote: self.remote) return true if use_api? super 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.
46 47 48 49 50 |
# File 'tap/abstract_core_tap.rb', line 46 def should_report_analytics? return super unless use_api? true end |
#use_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.
Cask CI reads the cask tap checkout while core formulae can still use the API.
27 28 29 |
# File 'tap/abstract_core_tap.rb', line 27 def use_api? !Homebrew::EnvConfig.no_install_from_api? && !(core_cask_tap? && ENV["HOMEBREW_TEST_BOT_CASKS"].present?) end |