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_repo, #name, #path, #repo, #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?, #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_cask_tap, #default_remote, each, fetch, #fix_remote_configuration, #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, install_default_cask_tap_if_necessary, 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, #repo_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.



1112
1113
1114
1115
1116
# File 'tap.rb', line 1112

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)


1099
1100
1101
# File 'tap.rb', line 1099

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.



1104
1105
1106
1107
1108
1109
# File 'tap.rb', line 1104

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:

Returns:



1119
1120
1121
# File 'tap.rb', line 1119

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)


1124
1125
1126
1127
1128
# File 'tap.rb', line 1124

def should_report_analytics?
  return super if Homebrew::EnvConfig.no_install_from_api?

  true
end