diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-02-28 22:40:19 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-02-28 22:40:19 +0000 |
commit | 8adaf10ecabf3c48b39042044fa58e9933b1f208 (patch) | |
tree | 2e05c993fe1fac27e1b881d96e2c237f38f59fcf /railties/lib/tasks/log.rake | |
parent | 8995483106c60c7b4d73fa20ca6a08d94efdea14 (diff) | |
download | rails-8adaf10ecabf3c48b39042044fa58e9933b1f208.tar.gz rails-8adaf10ecabf3c48b39042044fa58e9933b1f208.tar.bz2 rails-8adaf10ecabf3c48b39042044fa58e9933b1f208.zip |
Match singular naming from directory structure [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3713 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/tasks/log.rake')
-rw-r--r-- | railties/lib/tasks/log.rake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/lib/tasks/log.rake b/railties/lib/tasks/log.rake new file mode 100644 index 0000000000..6e1334692e --- /dev/null +++ b/railties/lib/tasks/log.rake @@ -0,0 +1,9 @@ +namespace :log do + desc "Truncates all *.log files in log/ to zero bytes" + task :clear do + FileList["log/*.log"].each do |log_file| + f = File.open(log_file, "w") + f.close + end + end +end |