Sha256: 0d1121e9d8bda0482992ad54785a34aa2be2e4e86084f09ae1251a578233afe7
Contents?: true
Size: 549 Bytes
Versions: 60
Compression:
Stored size: 549 Bytes
Contents
module Dragonfly class Middleware def initialize(app, dragonfly_app_name, deprecated_arg=nil) raise ArgumentError, "mounting Dragonfly::Middleware with a mount point is deprecated - just use Dragonfly::Middleware, #{dragonfly_app_name.inspect}" if deprecated_arg @app = app @dragonfly_app_name = dragonfly_app_name end def call(env) response = Dragonfly[@dragonfly_app_name].call(env) if response[1]['X-Cascade'] == 'pass' @app.call(env) else response end end end end
Version data entries
60 entries across 60 versions & 3 rubygems