Display more crashs in the Atom feed than on the webpage
There is a better way to sniff content type, but it's only available in newer mojolicious versions
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en-US">
<id>tag:crash,2012,<%= url_for('index')->to_abs =%></id>
<link type="text/html" rel="alternate" href="<%= url_for()->to_abs =%>"/>
<link type="application/atom+xml" rel="self" href="<%= url_for('current', format => 'atom')->to_abs =%>"/>
<title>Recent Crashs</title>
<updated><%= @$files[0]->{date}->strftime("%FT%TZ") =%></updated>
% foreach my $file(@$files) {
<entry>
<id>tag:crash,2014:uuid::<%= $file->{uuid} =%></id>
<link type="text/html" rel="alternate" href="<%= url_for('report', uuid => $file->{uuid})->to_abs =%>"/>
<title><%= $file->{product} =%>: <%= $file->{signature} =%></title>
<updated><%= $file->{date}->strftime("%FT%TZ") =%></updated>
<published><%= $file->{date}->strftime("%FT%TZ") =%></published>
<author>
<name></name>
</author>
<content type="html">
%= xml_escape_block begin
%= t h3 => $file->{date}->strftime("%F %T")
%= t h3 => $file->{product} . " version " . $file->{version}
% end
</content>
</entry>
% }
</feed>