Sha256: 801857adfb32b71f2d480bf1ab916b262af7b07cf841e7409ab76d3f76ea00fd

Contents?: true

Size: 439 Bytes

Versions: 141

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

require "rack/body_proxy"

module ActionDispatch
  class Executor
    def initialize(app, executor)
      @app, @executor = app, executor
    end

    def call(env)
      state = @executor.run!
      begin
        response = @app.call(env)
        returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
      ensure
        state.complete! unless returned
      end
    end
  end
end

Version data entries

141 entries across 133 versions & 10 rubygems

Version Path
actionpack-6.0.3.6 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.5 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.3 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.2.1 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.3.5 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.4.5 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.2 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.1 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.0 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.0.rc2 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.0.rc1 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.3.4 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.4.4 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.3.3 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.3.2 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.3.1 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.4.3 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.3 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.3.rc1 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.2.2 lib/action_dispatch/middleware/executor.rb