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

Version Path
classiccms-0.3.7 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/middleware.rb
classiccms-0.3.6 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/middleware.rb
classiccms-0.3.5 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/middleware.rb
classiccms-0.3.4 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/middleware.rb
classiccms-0.3.3 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/middleware.rb
classiccms-0.3.2 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/middleware.rb
classiccms-0.3.1 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/middleware.rb
classiccms-0.3.0 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/middleware.rb
dragonfly-0.9.12 lib/dragonfly/middleware.rb
dragonfly-0.9.11 lib/dragonfly/middleware.rb
dragonfly-0.9.10 lib/dragonfly/middleware.rb
dragonfly-0.9.9 lib/dragonfly/middleware.rb
dragonfly-0.9.8 lib/dragonfly/middleware.rb
dragonfly-0.9.5 lib/dragonfly/middleware.rb
dragonfly-0.9.4 lib/dragonfly/middleware.rb
dragonfly-0.9.3 lib/dragonfly/middleware.rb
dragonfly-0.9.2 lib/dragonfly/middleware.rb
dragonfly-0.9.1 lib/dragonfly/middleware.rb
dragonfly-0.9.0 lib/dragonfly/middleware.rb
oahu-dragonfly-0.8.2 lib/dragonfly/middleware.rb