lib/bumbler/track_initializers.rb in bumbler-0.8.0 vs lib/bumbler/track_initializers.rb in bumbler-0.9.0

- old
+ new

@@ -1,14 +1,18 @@ # 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 +Rails::Engine.prepend( + Module.new do + def load(file, *) + initializer = file.sub(Rails.root.to_s, ".") + Bumbler::Hooks.benchmark(initializer) { super }.last + end 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 +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 -end) +)