Sha256: 8d716d816df4a8952e0076d750d24aca16f9b2f41d1b64db2d7a4664b4bf54ae
Contents?: true
Size: 451 Bytes
Versions: 2
Compression:
Stored size: 451 Bytes
Contents
require 'rack/static' module Locomotive::Steam module Middlewares class StaticAssets < ::Rack::Static alias_method :call_without_threadsafety, :call def call(env) dup._call(env) # thread-safe purpose end def _call(env) mounting_point = env['steam.mounting_point'] @file_server = Rack::File.new(mounting_point.assets_path) call_without_threadsafety(env) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
locomotivecms_steam-0.1.2.pre.beta | lib/locomotive/steam/middlewares/static_assets.rb |
locomotivecms_steam-0.1.1 | lib/locomotive/steam/middlewares/static_assets.rb |