Sha256: 38b5c3ba5bc1a2b281e70a5700f39e34e9034ed56ed05f7378be1463a3ec7119

Contents?: true

Size: 695 Bytes

Versions: 3

Compression:

Stored size: 695 Bytes

Contents

require File.join(File.dirname(__FILE__), 'routing', 'urls')
require File.join(File.dirname(__FILE__), 'application')
module Mack
  class Runner # :nodoc:

    def call(env) # :nodoc:
      Mack::Application.new.call(env)
    end
    
    def deferred?(env) # :nodoc:
      if configatron.mack.use_deferred_routes
        method = env["REQUEST_METHOD"].downcase.to_sym
        routes = Mack::Routes.deferred_routes_list[method]
        routes.each do |route|
          return true if route.match?(:uri => env['PATH_INFO'], :host => env['SERVER_NAME'], :port => env['SERVER_PORT'], :scheme => env['rack.url_scheme'])
        end
      end
      return false
    end
    
  end # Runner
end # Mack

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mack-0.8.2 lib/mack/runner.rb
mack-0.8.3 lib/mack/runner.rb
mack-0.8.3.1 lib/mack/runner.rb