From 14a8782e4fdc78a0d45d5215a341a8b4e089827e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 28 Feb 2006 16:34:16 +0000 Subject: Make clearing follow the object:action naming of the rest of the tasks git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/tasks/tmp.rake | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'railties/lib/tasks') diff --git a/railties/lib/tasks/tmp.rake b/railties/lib/tasks/tmp.rake index dcb22f789b..2842e546c8 100644 --- a/railties/lib/tasks/tmp.rake +++ b/railties/lib/tasks/tmp.rake @@ -10,18 +10,24 @@ namespace :tmp do FileUtils.mkdir "tmp/sockets" end - desc "Clears all files in tmp/sessions" - task :clear_sessions do - FileUtils.rm(Dir['tmp/sessions/[^.]*']) + namespace :sessions do + desc "Clears all files in tmp/sessions" + task :clear do + FileUtils.rm(Dir['tmp/sessions/[^.]*']) + end end - desc "Clears all files and directories in tmp/cache" - task :clear_cache do - FileUtils.rm_rf(Dir['tmp/cache/[^.]*']) + namespace :cache do + desc "Clears all files and directories in tmp/cache" + task :clear do + FileUtils.rm_rf(Dir['tmp/cache/[^.]*']) + end end - desc "Clears all ruby_sess.* files in tmp/sessions" - task :clear_sockets do - FileUtils.rm(Dir['tmp/sockets/[^.]*']) + namespace :sockets do + desc "Clears all ruby_sess.* files in tmp/sessions" + task :clear do + FileUtils.rm(Dir['tmp/sockets/[^.]*']) + end end end \ No newline at end of file -- cgit v1.2.3