Add "build_dependencies" key to JSON output (#340)

This gives the JSON output the same type of information as
`recommended_dependencies` or `optional_dependencies`, but for those
marked `:build` in the formula.
This commit is contained in:
Elliot Saba 2016-06-11 17:03:08 -07:00 committed by Martin Afanasjew
parent 6367508454
commit e9cc2a5d88

View File

@ -1256,6 +1256,7 @@ class Formula
"dependencies" => deps.map(&:name).uniq,
"recommended_dependencies" => deps.select(&:recommended?).map(&:name).uniq,
"optional_dependencies" => deps.select(&:optional?).map(&:name).uniq,
"build_dependencies" => deps.select(&:build?).map(&:name).uniq,
"conflicts_with" => conflicts.map(&:name),
"caveats" => caveats
}