Sha256: 6cafb7dc935c933b5938c2eecb97011cef0a8296076cc519b7dfeee6ccf525e6
Contents?: true
Size: 428 Bytes
Versions: 11
Compression:
Stored size: 428 Bytes
Contents
module WebValve class FakeServiceWrapper # lazily resolve the app constant to leverage rails class reloading def initialize(service_config) @service_config = service_config end def call(env) env['PATH_INFO'] = env['PATH_INFO'].gsub(/\A#{@service_config.path_prefix}/, '') app.call(env) end private def app @service_config.service_class_name.constantize end end end
Version data entries
11 entries across 11 versions & 1 rubygems