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.26 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.25 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.24 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.23 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.22 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.21 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.20 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.19 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.18 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.17 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.16 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.14 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.13 lib/tasks/immosquare_cleaner.rake
immosquare-cleaner-0.1.12 lib/tasks/immosquare_cleaner.rake