Sha256: f192ae92eda0132d299a4003db839fcef24d86900dc4dd6fb6201a046e614de5
Contents?: true
Size: 519 Bytes
Versions: 6
Compression:
Stored size: 519 Bytes
Contents
# encoding: utf-8 require 'classy_assets' module Rack class ClassyAssets < Sinatra::Base ::ClassyAssets::Configuration.sprockets.mime_types.each do |ext, content_type| get "/#{::ClassyAssets::Configuration.asset_prefix}/*#{ext}" do |asset| filename = "#{asset}#{ext}" filename.gsub!(/-(\h{32})#{ext}$/, ext) if ::ClassyAssets::Configuration.asset_digest content_type content_type ::ClassyAssets::Configuration.sprockets[filename] || halt(404) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems