Sha256: ff4a2d56cdebfa5634d1bb2782e2f11ad398551d1040caa35bf645617252ba3e
Contents?: true
Size: 511 Bytes
Versions: 13
Compression:
Stored size: 511 Bytes
Contents
module Locomotive::Steam module Middlewares class DynamicAssets REGEXP = /^\/(javascripts|stylesheets)\/(.*)$/o attr_reader :app, :assets def initialize(app, options) @app = app @assets = Locomotive::Steam::SprocketsEnvironment.new(options[:root], options) end def call(env) if env['PATH_INFO'] =~ REGEXP env['PATH_INFO'] = $2 assets.call(env) else app.call(env) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems