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

Version Path
immosquare-cleaner-0.1.51 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.50 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.49 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.48 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.47 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.46 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.45 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.44 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.43 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.42 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.41 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.40 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.39 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.38 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.32 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.31 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.30 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.29 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.28 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.27 lib/tasks/immosquare_cleaner.rake