Add HEAD information to JSON API
This commit is contained in:
parent
8edf681175
commit
33681f90e3
@ -2139,6 +2139,13 @@ class Formula
|
||||
hsh["bottle"]["stable"] = bottle_hash if bottle_defined?
|
||||
end
|
||||
|
||||
if head
|
||||
hsh["urls"]["head"] = {
|
||||
"url" => head.url,
|
||||
"branch" => head.specs[:branch],
|
||||
}
|
||||
end
|
||||
|
||||
hsh["options"] = options.map do |opt|
|
||||
{ "option" => opt.flag, "description" => opt.description }
|
||||
end
|
||||
|
||||
@ -163,6 +163,10 @@ module Formulary
|
||||
end
|
||||
end
|
||||
|
||||
if (urls_head = json_formula["urls"]["head"]).present?
|
||||
head urls_head["url"], branch: urls_head["branch"]
|
||||
end
|
||||
|
||||
if (bottles_stable = json_formula["bottle"]["stable"]).present?
|
||||
bottle do
|
||||
root_url bottles_stable["root_url"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user