formula#to_hash: record requirements

Closes Homebrew/homebrew#40451.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-06-06 19:56:46 +08:00
parent c6e1090c43
commit f8efea0cf3

View File

@ -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 }
}