Sha256: 1dc278facc3492ba419f4e16af3a0453bc26c5cc482b16dd8483a0a1140bb691

Contents?: true

Size: 590 Bytes

Versions: 13

Compression:

Stored size: 590 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! }
      rescue => error
        @executor.error_reporter.report(error, handled: false, source: "application.action_dispatch")
        raise
      ensure
        state.complete! unless returned
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/executor.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/executor.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/executor.rb
actionpack-7.1.3.4 lib/action_dispatch/middleware/executor.rb
actionpack-7.1.3.2 lib/action_dispatch/middleware/executor.rb
actionpack-7.1.3.1 lib/action_dispatch/middleware/executor.rb
actionpack-7.1.3 lib/action_dispatch/middleware/executor.rb
actionpack-7.1.2 lib/action_dispatch/middleware/executor.rb
actionpack-7.1.1 lib/action_dispatch/middleware/executor.rb
actionpack-7.1.0 lib/action_dispatch/middleware/executor.rb
actionpack-7.1.0.rc2 lib/action_dispatch/middleware/executor.rb
actionpack-7.1.0.rc1 lib/action_dispatch/middleware/executor.rb
actionpack-7.1.0.beta1 lib/action_dispatch/middleware/executor.rb