Sha256: cc6e5720fa673376e96f7113cc01d9f0f4eaa9c25e1231acab5e08fbe1bf6309

Contents?: true

Size: 648 Bytes

Versions: 7

Compression:

Stored size: 648 Bytes

Contents

namespace :ckeditor do
	desc 'Create nondigest versions of some ckeditor assets (e.g. moono skin png)'
	task :create_nondigest_assets do
		fingerprint = /\-[0-9a-f]{32}\./
		for file in Dir['public/assets/ckeditor/contents-*.css', 'public/assets/ckeditor/skins/moono/*.png']
			next unless file =~ fingerprint
			nondigest = file.sub fingerprint, '.' # contents-0d8ffa186a00f5063461bc0ba0d96087.css => contents.css
			FileUtils.cp file, nondigest, verbose: true
		end
	end
end

# auto run ckeditor:create_nondigest_assets after assets:precompile
Rake::Task['assets:precompile'].enhance do
	Rake::Task['ckeditor:create_nondigest_assets'].invoke
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
odania_core-0.0.8 lib/tasks/ckeditor.rake
odania_core-0.0.7 lib/tasks/ckeditor.rake
odania_core-0.0.6 lib/tasks/ckeditor.rake
odania_core-0.0.5 lib/tasks/ckeditor.rake
odania_core-0.0.4 lib/tasks/ckeditor.rake
odania_core-0.0.3 lib/tasks/ckeditor.rake
odania_core-0.0.2 lib/tasks/ckeditor.rake