summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helpers.rb')
-rw-r--r--lib/helpers.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/helpers.rb b/lib/helpers.rb
index 34ed17f..9a2f0f1 100644
--- a/lib/helpers.rb
+++ b/lib/helpers.rb
@@ -31,6 +31,10 @@ helpers do
text.gsub('<code>', '<pre>').gsub('</code>', '</pre>').gsub(/ +/, ' ').chomp
end
+ def date_format(d)
+ d.strftime('%B %d, %Y')
+ end
+
# Returns the comparator in the format needed for the XML
def xml_comp(val)
COMP_MAP[val]
@@ -47,13 +51,13 @@ helpers do
maker.channel.link = "https://security.gentoo.org/glsa"
maker.channel.description = "This feed contains new Gentoo Linux Security Advisories. Contact security@gentoo.org with questions."
maker.channel.title = "Gentoo Linux Security Advisories"
- maker.channel.updated = Time.now.to_s
+ maker.channel.updated = items.first.revised.to_s
items.each do |input_item|
maker.items.new_item do |item|
item.link = BASE_URL + 'glsa/' + input_item.id
item.title = "GLSA %s: %s" % [input_item.id, input_item.title]
- item.updated = Time.now.to_s
+ item.updated = input_item.revised.to_s
end
end
end.to_s