[Collab-qa-commits] r1446 - ddpo-by-mail
Raphael Geissert
atomo64-guest at alioth.debian.org
Fri May 1 01:33:03 UTC 2009
Author: atomo64-guest
Date: 2009-05-01 01:33:02 +0000 (Fri, 01 May 2009)
New Revision: 1446
Modified:
ddpo-by-mail/ddpo-config.rb
ddpo-by-mail/reminder-mail.rb
Log:
Automagically create the archives/ dir and store the emails in there
Modified: ddpo-by-mail/ddpo-config.rb
===================================================================
--- ddpo-by-mail/ddpo-config.rb 2009-05-01 00:48:36 UTC (rev 1445)
+++ ddpo-by-mail/ddpo-config.rb 2009-05-01 01:33:02 UTC (rev 1446)
@@ -81,6 +81,10 @@
FROZEN = false
CLOSE_TO_FREEZE = false
+require "date"
+d = Date::today
+MAIL_DIR = "archives/" + d.year.to_s + d.month.to_s + d.day.to_s
+
# Release Goals
# FIXME missing tags: ipv6 i18n-debconf lfs nfs-v4 goal-enriched-chroot ddtp dep-init ftbfs-gcc
RGTAGS = {
Modified: ddpo-by-mail/reminder-mail.rb
===================================================================
--- ddpo-by-mail/reminder-mail.rb 2009-05-01 00:48:36 UTC (rev 1445)
+++ ddpo-by-mail/reminder-mail.rb 2009-05-01 01:33:02 UTC (rev 1446)
@@ -140,6 +140,11 @@
end
end
+if not File.exists?(MAIL_DIR)
+ require "fileutils"
+ FileUtils::mkdir MAIL_DIR
+end
+
# prevent typos by using constants, so that it breask :)
T_INCLUDE = "include"
T_HEADER = "header"
@@ -345,7 +350,7 @@
DDPOMail, run by #{OWNER}
EOF
- File::open("mail_#{email}.txt", 'w') do |f|
+ File::open(MAIL_DIR + "/mail_#{email}.txt", 'w') do |f|
f.puts gtext
end
end
More information about the Collab-qa-commits
mailing list