bin/fief in fief-0.0.1 vs bin/fief in fief-0.0.2
- old
+ new
@@ -102,11 +102,14 @@
if opts.dry?
measures = [{ title: 'Open Pull Requests', value: 42 }, { title: 'Open Issues', value: 42 }]
else
measures = m.take(loog)
end
- data << {name: repo, metrics: measures}
+ if data.find { |d| d[:name] == repo }.nil?
+ data << {name: repo, metrics: []}
+ end
+ data.find { |d| d[:name] == repo }[:metrics] += measures
end
end
builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
xml.fief(time: Time.now) do
xml.titles do
@@ -120,9 +123,10 @@
data.each do |r|
xml.repository(id: r[:name]) do
xml.metrics do
r[:metrics].each do |ms|
xml.m(id: ms[:title]) do
+ xml.parent.set_attribute('alert', 'yes') if ms[:alert]
xml.text ms[:value]
end
end
end
end