diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 4cb507759f..7a0d0ad1cc 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added Rake target clear_logs that'll truncate all the *.log files in log/ to zero #1079 [Lucas Carlson] + * Added lazy typing for generate, such that ./script/generate cn == ./script/generate controller and the likes #1051 [k@v2studio.com] * Fixed that ownership is brought over in pg_dump during tests for PostgreSQL #1060 [pburleson@gmail.com] diff --git a/railties/fresh_rakefile b/railties/fresh_rakefile index b6991bf076..b563af722b 100755 --- a/railties/fresh_rakefile +++ b/railties/fresh_rakefile @@ -178,3 +178,11 @@ task :purge_test_database => :environment do raise "Unknown database adapter '#{abcs["test"]["adapter"]}'" end end + +desc "Clears all *.log files in log/" +task :clear_logs => :environment do + FileList["log/*.log"].each do |log_file| + f = File.open(log_file, "w") + f.close + end +end \ No newline at end of file