Class: CoreTap
- Inherits:
-
AbstractCoreTap
- Object
- Tap
- AbstractCoreTap
- CoreTap
- Defined in:
- tap.rb
Overview
A specialized Tap class for the core formulae.
Constant Summary
Constants inherited from Tap
Tap::HOMEBREW_TAP_AUDIT_EXCEPTIONS_DIR, Tap::HOMEBREW_TAP_CASK_RENAMES_FILE, Tap::HOMEBREW_TAP_FORMULA_RENAMES_FILE, Tap::HOMEBREW_TAP_JSON_FILES, Tap::HOMEBREW_TAP_MIGRATIONS_FILE, Tap::HOMEBREW_TAP_PYPI_FORMULA_MAPPINGS, Tap::HOMEBREW_TAP_STYLE_EXCEPTIONS_DIR, Tap::TAP_DIRECTORY, Tap::TAP_MIGRATIONS_STALE_SECONDS
Instance Attribute Summary
Attributes inherited from Tap
#full_name, #git_repo, #name, #path, #repo, #user
Instance Method Summary collapse
-
#ensure_installed! ⇒ void
-
#install(quiet: false, clone_target: nil, force_auto_update: nil, custom_remote: false, verify: false, force: false) ⇒ Object
CoreTap never allows shallow clones (on request from GitHub).
-
#new_formula_path(name) ⇒ Pathname
-
#remote ⇒ String
Methods inherited from AbstractCoreTap
Methods inherited from Tap
#==, #audit_exception, #cask_dir, #cask_files, cask_files_by_name, #cask_renames, #cask_tokens, #clear_cache, cmd_directories, #command_dir, #command_files, #config, #contents, #custom_remote?, default_cask_tap, #default_remote, each, fetch, #fix_remote_configuration, formula_files_by_name, #formula_oldnames, from_path, #git?, #git_branch, #git_head, #git_last_commit, install_default_cask_tap_if_necessary, #installed?, #issues_url, #link_completions_and_manpages, names, #new_cask_path, #official?, #potential_formula_dirs, #private?, #relative_cask_path, #remote_repo, #repo_var, #shallow?, #to_hash, #to_s, untapped_official_taps
Methods included from Cachable
Instance Method Details
#ensure_installed! ⇒ void
This method returns an undefined value.
968 969 970 971 972 |
# File 'tap.rb', line 968 def ensure_installed! return if ENV["HOMEBREW_TESTS"] super end |
#install(quiet: false, clone_target: nil, force_auto_update: nil, custom_remote: false, verify: false, force: false) ⇒ Object
CoreTap never allows shallow clones (on request from GitHub).
982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 |
# File 'tap.rb', line 982 def install(quiet: false, clone_target: nil, force_auto_update: 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: quiet, clone_target: remote, force_auto_update: force_auto_update, custom_remote: custom_remote, force: force) end |
#new_formula_path(name) ⇒ Pathname
1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 |
# File 'tap.rb', line 1028 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 |