def call!(env)
      # Setting up request
      @request = ::Rack::Request.new(env)

      # The routes
      case @request.path_info

      # Match /assets?/:type/path
      when /^(\/assets)?\/(js|css)\/(.+)/
        # Extract type and path
        type, path = $2, $3

        # Extract digest key and remove from path
        path.gsub!("-#{@key = $1}", '') if path =~ /-([a-f0-9]{32})\.(css|js)$/

        # Find the item
        item = ::Asset.manifest.find{|i| i.path == path and i.type == type}

        # Return the content or not found
        item ? found(item) : not_found

      # Bounce favicon requests
      when (::Asset.favicon and /^\/favicon\.ico$/)
        not_found

      # Return a standard robots.txt
      when (::Asset.robots and /^\/robots\.txt$/)
        robots

      else
        # No routes found, pass down the middleware stack
        @app.call(env)
      end
    end
def call!(env)
      # Setting up request
      @request = ::Rack::Request.new(env)

      # The routes
      case @request.path_info

      # Match /assets?/:type/path
      when /^(\/assets)?\/(js|css)\/(.+)/
        # Extract type and path
        type, path = $2, $3

        # Extract digest key and remove from path
        path.gsub!("-#{@key = $1}", '') if path =~ /-([a-f0-9]{32})\.(css|js)$/

        # Find the item
        item = ::Asset.manifest.find{|i| i.path == path and i.type == type}

        # Return the content or not found
        item ? found(item) : not_found

      # Bounce favicon requests
      when (::Asset.favicon and /^\/favicon\.ico$/)
        not_found

      # Return a standard robots.txt
      when (::Asset.robots and /^\/robots\.txt$/)
        robots

      else
        # No routes found, pass down the middleware stack
        @app.call(env)
      end
    end
Call