Sha256: 068ece26810b6fe39c2d96f663921ea2bfbddd8f5a41c291ae33471cd542b846

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

# frozen_string_literal: true

require "silent_ping/version"
require "silent_ping/logger"
require "silent_ping/pong"

module SilentPing
  class Engine < ::Rails::Engine
    config.silent_ping = true

    initializer :silent_ping do |app|
      next unless app.config.silent_ping

      app.middleware.swap ::Rails::Rack::Logger, ::SilentPing::Logger
      app.middleware.use ::SilentPing::Pong
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
silent_ping-0.1.2 lib/silent_ping.rb
silent_ping-0.1.0 lib/silent_ping.rb