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.7.10 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7.9 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7.8 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7.7 lib/action_dispatch/middleware/executor.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7.6 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7.5 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7.4 lib/action_dispatch/middleware/executor.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7.3 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7.2 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7.1 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.6.1 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.7 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.6 lib/action_dispatch/middleware/executor.rb
actionpack-6.1.6.1 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.5.1 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.8.1 lib/action_dispatch/middleware/executor.rb
actionpack-5.2.8 lib/action_dispatch/middleware/executor.rb
actionpack-6.0.5 lib/action_dispatch/middleware/executor.rb