Sha256: 040a500d6354289bf3abbf1746473d6bc7d003acc6301cd7432dfcf85374b4ae
Contents?: true
Size: 753 Bytes
Versions: 34
Compression:
Stored size: 753 Bytes
Contents
namespace :immosquare_cleaner do ##============================================================## ## Function to clean translation files in rails app ##============================================================## desc "Clean translation files in rails app" task :clean => :environment do file_paths = Dir.glob("#{Rails.root}/**/*").reject do |file_path| test1 = file_path.gsub("#{Rails.root}/", "") File.directory?(file_path) || test1.start_with?("node_modules", "tmp", "public", "log", "app/assets/builds", "app/assets/fonts", "app/assets/images", "vendor") || file_path.end_with?(".lock", ".lockb") end file_paths.each do |file| puts file ImmosquareCleaner.clean(file) end end end
Version data entries
34 entries across 34 versions & 1 rubygems