diff options
| author | Xu Cheng | 2015-06-06 19:56:46 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-06-07 20:32:46 +0800 |
| commit | f8efea0cf3ffbd5aa3a71a12a177cf0dd7bed130 (patch) | |
| tree | 35b2b6f16b40787ac827682b8fbfeb45459f8dcd | |
| parent | c6e1090c43f769e80c1aa98c2029f1eb466e0da4 (diff) | |
| download | brew-f8efea0cf3ffbd5aa3a71a12a177cf0dd7bed130.tar.bz2 | |
formula#to_hash: record requirements
Closes Homebrew/homebrew#40451.
Signed-off-by: Xu Cheng <xucheng@me.com>
| -rw-r--r-- | Library/Homebrew/formula.rb | 9 |
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 } } |
