Sha256: 5c8d366a1a8caf334301fa0041bc47a7f1a01ddd7c68227efd324ef2b2f50ec0
Contents?: true
Size: 517 Bytes
Versions: 2
Compression:
Stored size: 517 Bytes
Contents
require 'fileutils' desc "Create non-digest versions of all assets" task "assets:precompile" do fingerprint = /\-[0-9a-f]{32}\./ jscolor_assets = ["arrow.gif", "cross.gif", "hs.png", "hv.png"] for file in Dir["public/assets/*"] next if file !~ fingerprint nondigest = file.sub fingerprint, "." next unless jscolor_assets.include? File.basename(nondigest) if !File.exist?(nondigest) or File.mtime(file) > File.mtime(nondigest) FileUtils.cp file, nondigest, verbose: true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jscolor-rails-1.4.4 | lib/tasks/assets-non-digest.rake |
jscolor-rails-1.4.2.1 | lib/tasks/assets-non-digest.rake |