Sha256: da5347aa3fbe719862f43287386d9019acef6fa28d8583052bc3276824fb6167
Contents?: true
Size: 1.09 KB
Versions: 9
Compression:
Stored size: 1.09 KB
Contents
module TinyMCE module Rails class AssetManifest attr_reader :file def self.load(manifest_path) PropshaftManifest.try(manifest_path) || JsonManifest.try(manifest_path, ".sprockets-manifest*.json") || JsonManifest.try(manifest_path, "manifest*.json") || JsonManifest.try(manifest_path) || YamlManifest.try(manifest_path) || NullManifest.new end def each(pattern) assets.each_key do |asset| if asset =~ pattern && !index_asset?(asset) yield asset end end end def asset_path(logical_path) if digested = assets[logical_path] yield digested, logical_path if block_given? end end def to_s dump end protected def index_asset?(asset) asset =~ /\/index[^\/]*\.\w+$/ end end require_relative "asset_manifest/json_manifest" require_relative "asset_manifest/null_manifest" require_relative "asset_manifest/propshaft_manifest" require_relative "asset_manifest/yaml_manifest" end end
Version data entries
9 entries across 9 versions & 2 rubygems