aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorXu Cheng2015-06-06 19:56:46 +0800
committerXu Cheng2015-06-07 20:32:46 +0800
commitf8efea0cf3ffbd5aa3a71a12a177cf0dd7bed130 (patch)
tree35b2b6f16b40787ac827682b8fbfeb45459f8dcd /Library/Homebrew
parentc6e1090c43f769e80c1aa98c2029f1eb466e0da4 (diff)
downloadbrew-f8efea0cf3ffbd5aa3a71a12a177cf0dd7bed130.tar.bz2
formula#to_hash: record requirements
Closes Homebrew/homebrew#40451. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/formula.rb9
1 files changed, 9 insertions, 0 deletions
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 }
}