Sha256: cfc08eb4d3183272062c8fc97ec4488e2053113669b24122d979f09ba1c9b5c9
Contents?: true
Size: 1.19 KB
Versions: 39
Compression:
Stored size: 1.19 KB
Contents
module TinyMCE module Rails class AssetInstaller class Compile delegate :target, :manifest, :logger, :logical_path, :with_asset, :to => :@installer def initialize(installer) @installer = installer end def call symlink_assets end private def symlink_assets manifest.each(/^tinymce\//) do |asset| manifest.asset_path(asset) do |src, dest| symlink_asset(src, dest) end end end def symlink_asset(src, dest) with_asset(src, dest) do |src, dest| create_symlink(src, dest) create_symlink("#{src}.gz", "#{dest}.gz") if File.exists?("#{src}.gz") end end def create_symlink(src, dest) target = File.basename(src) unless File.exists?(dest) && File.symlink?(dest) && File.readlink(dest) == target logger.info "Creating symlink #{dest}" FileUtils.ln_s(target, dest, :force => true) else logger.debug "Skipping symlink #{dest}, already exists" end end end end end end
Version data entries
39 entries across 39 versions & 1 rubygems