From d88750652a6a6a04aa44c4ededda720701c31db7 Mon Sep 17 00:00:00 2001 From: Vlad Shablinsky Date: Sun, 9 Aug 2015 14:39:46 +0300 Subject: tap: add formula_renames - Tap#formula_renames is a method used for getting information about renames in tap formulae. --- Library/Homebrew/tap.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 2e12e4844..24b496ebe 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -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? -- cgit v1.2.3