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