Sha256: dd467c10ca81471a40cf17e7bf1aa60901385780460f1f96df4a3f46deb618da

Contents?: true

Size: 519 Bytes

Versions: 16

Compression:

Stored size: 519 Bytes

Contents

# frozen_string_literal: true

if Rails.env == 'development' && ENV.fetch('DISABLE_PROFILER', 0).to_i.zero?
  require 'rack-mini-profiler'

  # Fix circular ref conflict with Oj.mimic_json
  module Rack
    class MiniProfiler
      module TimerStruct
        class Base
          def as_json
            @attributes
          end
        end
      end
    end
  end

  # initialization is skipped so trigger it
  Rack::MiniProfiler.config.position = 'right'
  Rack::MiniProfilerRails.initialize!(Rails.application)
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lcms-engine-0.5.5 config/initializers/rack_profiler.rb
lcms-engine-0.5.4 config/initializers/rack_profiler.rb
lcms-engine-0.5.3 config/initializers/rack_profiler.rb
lcms-engine-0.5.2 config/initializers/rack_profiler.rb
lcms-engine-0.5.1 config/initializers/rack_profiler.rb
lcms-engine-0.5.0 config/initializers/rack_profiler.rb
lcms-engine-0.4.2 config/initializers/rack_profiler.rb
lcms-engine-0.4.1 config/initializers/rack_profiler.rb
lcms-engine-0.4.0 config/initializers/rack_profiler.rb
lcms-engine-0.3.1 config/initializers/rack_profiler.rb
lcms-engine-0.1.4 config/initializers/rack_profiler.rb
lcms-engine-0.3.0 config/initializers/rack_profiler.rb
lcms-engine-0.1.3 config/initializers/rack_profiler.rb
lcms-engine-0.2.0 config/initializers/rack_profiler.rb
lcms-engine-0.1.2 config/initializers/rack_profiler.rb
lcms-engine-0.1.0 config/initializers/rack_profiler.rb