tap: add formula_renames
- Tap#formula_renames is a method used for getting information about renames in tap formulae.
This commit is contained in:
parent
77ee9bd446
commit
d88750652a
@ -1,3 +1,5 @@
|
||||
require "utils/json"
|
||||
|
||||
# a {Tap} is used to extend the formulae provided by Homebrew core.
|
||||
# Usually, it's synced with a remote git repository. And it's likely
|
||||
# a Github repository with the name of `user/homebrew-repo`. In such
|
||||
@ -137,6 +139,15 @@ class Tap
|
||||
}
|
||||
end
|
||||
|
||||
# Hash with tap formula renames
|
||||
def formula_renames
|
||||
@formula_renames ||= if (rename_file = path/"formula_renames.json").file?
|
||||
Utils::JSON.load(rename_file.read)
|
||||
else
|
||||
{}
|
||||
end
|
||||
end
|
||||
|
||||
def self.each
|
||||
return unless TAP_DIRECTORY.directory?
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user