Sha256: 8cd84d67810c854049a09e3590be54c09725f2a8b44774715616704af79e2e6d

Contents?: true

Size: 1.3 KB

Versions: 9

Compression:

Stored size: 1.3 KB

Contents

#################################################
#################################################
##   _____  _   __ _____    _ _ _              ##
##  /  __ \| | / /|  ___|  | (_) |             ##
##  | /  \/| |/ / | |__  __| |_| |_ ___  _ __  ##
##  | |    |    \ |  __|/ _` | | __/ _ \| '__| ##
##  | \__/\| |\  \| |__| (_| | | || (_) | |    ##
##   \____/\_| \_/\____/\__,_|_|\__\___/|_|    ##
#################################################
#################################################

## Libs ##
require 'fileutils'

#################################################
#################################################

## CKEditor ##
namespace :ckeditor do
  desc 'Create nondigest versions of all ckeditor digest assets'
  task nondigest: :environment do
    fingerprint = /\-[0-9a-f]{32,64}\./
    path = File.join(Rails.root, "public", Ckeditor.base_path, "**", "*") # =>  This is used to allow non-slash requirements etc

    Dir[path].each do |file|
      next unless file =~ fingerprint
      nondigest = file.sub fingerprint, '.'

      if !File.exist?(nondigest) || File.mtime(file) > File.mtime(nondigest)
        FileUtils.cp file, nondigest, verbose: true, preserve: true
      end
    end
  end
end

#################################################
#################################################

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fl-0.3.9 lib/tasks/ckeditor.rake
fl-0.3.8 lib/tasks/ckeditor.rake
fl-0.3.6 lib/tasks/ckeditor.rake
fl-0.3.5 lib/tasks/ckeditor.rake
fl-0.3.4 lib/tasks/ckeditor.rake
fl-0.3.3 lib/tasks/ckeditor.rake
fl-0.3.2 lib/tasks/ckeditor.rake
fl-0.3.1 lib/tasks/ckeditor.rake
fl-0.3.0 lib/tasks/ckeditor.rake