Sha256: 855a89a0c342f23d23149fe538a9699025082345b204082c0077532ebbfbe57a

Contents?: true

Size: 452 Bytes

Versions: 35

Compression:

Stored size: 452 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!(reset: true)
      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

35 entries across 35 versions & 2 rubygems

Version Path
actionpack-6.1.6 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.5.1 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.4.8 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.7.1 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.7 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.5 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.4.7 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.4.7 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.6.3 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.4.6 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.4.6 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.6.2 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.6.1 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.4.5 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.4.5 lib/action_dispatch/middleware/executor.rb