tab: include installation date in string representation
This way brew info will include the installation date for each installed version. Closes #196. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
This commit is contained in:
parent
742df8bbf4
commit
1fa48234e5
@ -246,12 +246,15 @@ class Tab < OpenStruct
|
|||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
s = []
|
s = []
|
||||||
case poured_from_bottle
|
if poured_from_bottle
|
||||||
when true then s << "Poured from bottle"
|
s << "Poured from bottle"
|
||||||
when false then s << "Built from source"
|
else
|
||||||
|
s << "Built from source"
|
||||||
|
end
|
||||||
|
if time
|
||||||
|
s << Time.at(time).strftime("on %Y-%m-%d at %H:%M:%S")
|
||||||
end
|
end
|
||||||
unless used_options.empty?
|
unless used_options.empty?
|
||||||
s << "Installed" if s.empty?
|
|
||||||
s << "with:"
|
s << "with:"
|
||||||
s << used_options.to_a.join(" ")
|
s << used_options.to_a.join(" ")
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user