From f8efea0cf3ffbd5aa3a71a12a177cf0dd7bed130 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 6 Jun 2015 19:56:46 +0800 Subject: formula#to_hash: record requirements Closes Homebrew/homebrew#40451. Signed-off-by: Xu Cheng --- Library/Homebrew/formula.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Library/Homebrew') diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 93671ecb4..72c8bdff0 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -749,6 +749,15 @@ class Formula "caveats" => caveats } + hsh["requirements"] = requirements.map do |req| + { + "name" => req.name, + "default_formula" => req.default_formula, + "cask" => req.cask, + "download" => req.download + } + end + hsh["options"] = options.map { |opt| { "option" => opt.flag, "description" => opt.description } } -- cgit v1.2.3