Sha256: c63872352de26ac81312aa26f2058e95996984579720209123fac7b14aad8e8c
Contents?: true
Size: 565 Bytes
Versions: 5
Compression:
Stored size: 565 Bytes
Contents
namespace :clear do desc 'clear log folder' task :log do path = File.join(Rails.root, 'log', '*') sys 'rm -r ' << path if Dir[path].length > 0 end desc 'clear tmp folder' task :tmp do path = File.join(Rails.root, 'tmp', '*') sys 'rm -r ' << path if Dir[path].length > 0 end desc 'clear public folder' task :public do ['assets', 'caches'].each do |f| path = File.join(Rails.root, 'public', f) sys 'rm -r ' << path if File.exists? path end end desc 'clear all' task :all => [:log, :tmp, :public] end
Version data entries
5 entries across 5 versions & 1 rubygems