Sha256: a818d2840e3dfbfde88ac253a1eaed848ac7819e443f471e60319a12485512c2

Contents?: true

Size: 391 Bytes

Versions: 3

Compression:

Stored size: 391 Bytes

Contents

# frozen_string_literal: true
Rails::Engine.prepend(Module.new do
  def load(file, *)
    initializer = file.sub(Rails.root.to_s, ".")
    Bumbler::Hooks.benchmark(initializer) { super }.last
  end
end)

Rails::Initializable::Initializer.prepend(Module.new do
  def run(*)
    name = (@name.is_a?(Symbol) ? @name.inspect : @name)
    Bumbler::Hooks.benchmark(name) { super }.last
  end
end)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bumbler-0.8.0 lib/bumbler/track_initializers.rb
bumbler-0.7.0 lib/bumbler/track_initializers.rb
bumbler-0.6.0 lib/bumbler/track_initializers.rb