lib/vclog/templates/history.rdoc.rb in vclog-1.8.2 vs lib/vclog/templates/history.rdoc.rb in vclog-1.9.0

- old
+ new

@@ -1,40 +1,36 @@ out = [] out << "= #{title || 'Release History'}" -history.releases.sort.each do |release| - +releases.sort.each do |release| tag = release.tag out << "\n== #{tag.name} / #{tag.date.strftime('%Y-%m-%d')}" out << "\n#{tag.message.strip} (#{tag.author})" - if options.extra && !release.changes.empty? + if !(options.summary or release.changes.empty?) out << "\nChanges:" release.groups.each do |type, changes| out << "\n* #{changes.size} #{changes[0].label }\n" changes.sort{|a,b| b.date <=> a.date}.each do |entry| + msg = entry.to_s(:summary=>!options.detail) - out << " * #{entry.message.strip}" + msg << "\n(##{entry.id})" if options.reference - if options.revision - out.last << "(##{entry.revision})" - end - + out << msg.tabto(6).sub(' ',' * ') end end end out << "" - end out.join("\n") + "\n"