Skip to content

Instantly share code, notes, and snippets.

@bsylvain
Created August 10, 2013 15:45
Show Gist options
  • Save bsylvain/6200902 to your computer and use it in GitHub Desktop.
Save bsylvain/6200902 to your computer and use it in GitHub Desktop.
Some rake task
require 'fileutils'
desc "Create nondigest versions of all ckeditor digest assets"
task "assets:precompile" do
fingerprint = /\-[0-9a-f]{32}\./
for file in Dir["public/assets/ckeditor/**/*"]
next unless file =~ fingerprint
nondigest = file.sub fingerprint, '.'
FileUtils.cp file, nondigest, verbose: true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment