Sha256: 280b8e9f0eab5ad26a3de654dc16e19d0228525c2b46371e1c4886c9589208df

Contents?: true

Size: 903 Bytes

Versions: 42

Compression:

Stored size: 903 Bytes

Contents

require "action_subscriber/logging"
require "action_subscriber/middleware/decoder"
require "action_subscriber/middleware/env"
require "action_subscriber/middleware/error_handler"
require "action_subscriber/middleware/router"
require "action_subscriber/middleware/runner"

module ActionSubscriber
  module Middleware

    class Builder < ::Middleware::Builder
      include ::ActionSubscriber::Logging

      def print_middleware_stack
        logger.info "Middlewares ["

        stack.each do |middleware|
          logger.info "#{middleware}"
        end

        logger.info "]"
      end
    end

    def self.initialize_stack
      builder = ::ActionSubscriber::Middleware::Builder.new(:runner_class => ::ActionSubscriber::Middleware::Runner)

      builder.use ::ActionSubscriber::Middleware::ErrorHandler
      builder.use ::ActionSubscriber::Middleware::Decoder

      builder
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
action_subscriber-5.3.3-java lib/action_subscriber/middleware.rb
action_subscriber-5.3.3 lib/action_subscriber/middleware.rb
action_subscriber-5.3.2-java lib/action_subscriber/middleware.rb
action_subscriber-5.3.2 lib/action_subscriber/middleware.rb
action_subscriber-5.3.1-java lib/action_subscriber/middleware.rb
action_subscriber-5.3.1 lib/action_subscriber/middleware.rb
action_subscriber-5.3.1.pre-java lib/action_subscriber/middleware.rb
action_subscriber-5.3.1.pre lib/action_subscriber/middleware.rb
action_subscriber-5.3.0-java lib/action_subscriber/middleware.rb
action_subscriber-5.3.0 lib/action_subscriber/middleware.rb
action_subscriber-5.2.4-java lib/action_subscriber/middleware.rb
action_subscriber-5.2.4 lib/action_subscriber/middleware.rb
action_subscriber-5.2.3-java lib/action_subscriber/middleware.rb
action_subscriber-5.2.3 lib/action_subscriber/middleware.rb
action_subscriber-5.2.2-java lib/action_subscriber/middleware.rb
action_subscriber-5.2.2 lib/action_subscriber/middleware.rb
action_subscriber-5.2.1-java lib/action_subscriber/middleware.rb
action_subscriber-5.2.1 lib/action_subscriber/middleware.rb
action_subscriber-5.2.0-java lib/action_subscriber/middleware.rb
action_subscriber-5.2.0 lib/action_subscriber/middleware.rb