Module: Homebrew::Bundle::Skipper Private
- Extended by:
- Utils::Output::Mixin
- Defined in:
- bundle/skipper.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 Attribute Summary collapse
- .failed_taps ⇒ Array<String>? writeonly private
- .skipped_entries ⇒ Hash{Symbol => Array<String>, nil}? writeonly private
Class Method Summary collapse
- .skip?(entry) ⇒ Boolean private
- .tap_failed!(tap_name) ⇒ void private
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_install_status, pretty_installed, pretty_uninstalled, pretty_unmarked, pretty_upgradable, pretty_warning
Class Attribute Details
.failed_taps=(value) ⇒ Array<String>? (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.
47 48 49 |
# File 'bundle/skipper.rb', line 47 def failed_taps=(value) @failed_taps = value end |
.skipped_entries=(value) ⇒ Hash{Symbol => Array<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.
53 54 55 |
# File 'bundle/skipper.rb', line 53 def skipped_entries=(value) @skipped_entries = value end |
Class Method Details
.skip?(entry) ⇒ Boolean
This method is part of a private API. This method may only be 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 |
# File 'bundle/skipper.rb', line 13 def skip?(entry) require "bundle/brew" if (reason = unsupported_reason(entry)) opoo_without_github_actions_annotation "Skipping #{entry.type} #{entry.name} (#{reason})" return true end full_name = entry.[:full_name] return true if @failed_taps&.any? do |tap| prefix = "#{tap}/" entry.name.start_with?(prefix) || (full_name.is_a?(String) && full_name.start_with?(prefix)) end entry_type_skips = Array(skipped_entries[entry.type]) return false if entry_type_skips.empty? # Check the name or ID particularly for Mac App Store entries where they # can have spaces in the names (and the `mas` output format changes on # occasion). entry_ids = [entry.name, entry.[:id]&.to_s].compact return false unless entry_type_skips.intersect?(entry_ids) opoo_without_github_actions_annotation "Skipping #{entry.name}" true end |
.tap_failed!(tap_name) ⇒ 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.
41 42 43 44 |
# File 'bundle/skipper.rb', line 41 def tap_failed!(tap_name) @failed_taps ||= T.let([], T.nilable(T::Array[String])) @failed_taps << tap_name end |