Sha256: cbf7d291d84b50367296d8fc7f71de0fa95a8db1b555e6776107542b9782cc0f

Contents?: true

Size: 408 Bytes

Versions: 16

Compression:

Stored size: 408 Bytes

Contents

# encoding: utf-8

require 'classy_assets'
require 'rack/builder'

module Rack
  class ClassyAssets
    def initialize(app)
      @app = app
    end

    def call(env)
      if env['PATH_INFO'] =~ /\/#{::ClassyAssets.config.asset_prefix}\//
        Rack::URLMap.new("/#{::ClassyAssets.config.asset_prefix}" => ::ClassyAssets.sprockets).call(env)
      else
        @app.call(env)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
classy_assets-0.10.0 lib/rack/classy_assets.rb
classy_assets-0.9.4 lib/rack/classy_assets.rb
classy_assets-0.9.3 lib/rack/classy_assets.rb
classy_assets-0.9.2 lib/rack/classy_assets.rb
classy_assets-0.9.1 lib/rack/classy_assets.rb
classy_assets-0.9.0 lib/rack/classy_assets.rb
classy_assets-0.8.2 lib/rack/classy_assets.rb
classy_assets-0.8.1 lib/rack/classy_assets.rb
classy_assets-0.8.0 lib/rack/classy_assets.rb
classy_assets-0.7.2 lib/rack/classy_assets.rb
classy_assets-0.7.1 lib/rack/classy_assets.rb
classy_assets-0.7.0 lib/rack/classy_assets.rb
classy_assets-0.6.3 lib/rack/classy_assets.rb
classy_assets-0.6.2 lib/rack/classy_assets.rb
classy_assets-0.6.1 lib/rack/classy_assets.rb
classy_assets-0.6.0 lib/rack/classy_assets.rb