Class: PassiveQueue::Engine
- Inherits:
-
Object
- Object
- PassiveQueue::Engine
- Defined in:
- lib/passive_queue/engine.rb,
lib/passive_queue/web.rb
Overview
Rack engine that mounts the PassiveQueue web dashboard in Rails applications
Class Method Summary collapse
-
.call(env) ⇒ Array
Rack call method that delegates to the Web application.
Class Method Details
.call(env) ⇒ Array
Rack call method that delegates to the Web application
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/passive_queue/engine.rb', line 11 def self.call(env) # Strip the mount path to get relative path path_info = env['PATH_INFO'] script_name = env['SCRIPT_NAME'] # Create new env with adjusted paths for the Web app web_env = env.dup web_env['PATH_INFO'] = path_info web_env['SCRIPT_NAME'] = script_name Web.new.call(web_env) end |