From 9116babd08d7de508d02ba3f5f5dac3658a349f3 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 6 Apr 2024 01:45:21 +0400 Subject: [PATCH] monkey_patcher --- config/initializers/monkey_patcher.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/config/initializers/monkey_patcher.rb b/config/initializers/monkey_patcher.rb index 075b9f8..4d0aa19 100644 --- a/config/initializers/monkey_patcher.rb +++ b/config/initializers/monkey_patcher.rb @@ -1,15 +1,14 @@ return unless defined?(Rails::Server) -logger = SemanticLogger['MonkeyPatcher'] - +puts '🐵 MonkeyPatcher runs:' patches = Dir.glob(Rails.root.join('lib', 'monkey_patches', '**', '*.rb')) patches.each do |file| - logger.info "patching... #{Pathname.new(file).relative_path_from Rails.root}" + puts " patching... #{Pathname.new(file).relative_path_from Rails.root}" require file end -case patches.count -when 0 then logger.info '== No patch found ==' -when 1 then logger.info '== 1 successful patch applied ==' -else logger.info "== #{count} successful patch applied ==" -end +puts "📌 "+ case patches.count + when 0 then 'No patch found' + when 1 then '1 successful patch applied' + else "#{count} successful patch applied" + end