From f5142c1c465d61877a0ee51b1c33a1bd1fc7ae4e Mon Sep 17 00:00:00 2001 From: yoshihara Date: Tue, 7 Apr 2015 18:45:30 +0900 Subject: [PATCH] Use Pathname methods instead of system method or File one --- lib/tasks/clean.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/clean.rake b/lib/tasks/clean.rake index 2c3f417..d446b61 100644 --- a/lib/tasks/clean.rake +++ b/lib/tasks/clean.rake @@ -1,6 +1,6 @@ desc "clean all files/directories in tmp/ directory (use carefully)" task :clean do - tmp_directory = File.join(Rails.root, "tmp") - system("rm -rf #{tmp_directory}") - system("mkdir #{tmp_directory}") + tmp_directory = Rails.root.join("tmp") + tmp_directory.rmtree + tmp_directory.mkdir end