Module: DeprecateDisable Private
- Defined in:
- Library/Homebrew/deprecate_disable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Helper module for handling disable!
and deprecate!
.
Constant Summary collapse
- DEPRECATE_DISABLE_REASONS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ does_not_build: "does not build", no_license: "has no license", repo_archived: "has an archived upstream repository", repo_removed: "has a removed upstream repository", unmaintained: "is not maintained upstream", unsupported: "is not supported upstream", deprecated_upstream: "is deprecated upstream", versioned_formula: "is a versioned formula", }.freeze
Class Method Summary collapse
Class Method Details
.deprecate_disable_info(formula) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'Library/Homebrew/deprecate_disable.rb', line 21 def deprecate_disable_info(formula) return unless formula.deprecated? || formula.disabled? if formula.deprecated? type = :deprecated reason = formula.deprecation_reason else type = :disabled reason = formula.disable_reason end reason = DEPRECATE_DISABLE_REASONS[reason] if DEPRECATE_DISABLE_REASONS.key? reason [type, reason] end |