You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
516 B

namespace :assets do
task non_digested: :environment do
assets = Dir.glob(Rails.root.join("public", "assets", "ckeditor", "**", "*"))
regex = /(-{1}[a-z0-9]{32}*\.{1}){1}/
assets.each do |file|
next if File.directory?(file) || file !~ regex
source = file.split("/")
source.push(source.pop.gsub(regex, "."))
non_digested = File.join(source)
FileUtils.cp(file, non_digested)
end
FileUtils.cp("app/assets/javascripts/ckeditor/config.js", "public/assets/ckeditor/")
end
end