You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
433 B

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. return unless defined?(Rails::Server)
  2. puts '🐵 MonkeyPatcher runs:'
  3. patches = Dir.glob(Rails.root.join('lib', 'monkey_patches', '**', '*.rb'))
  4. patches.each do |file|
  5. puts " patching... #{Pathname.new(file).relative_path_from Rails.root}"
  6. require file
  7. end
  8. puts "📌 "+ case patches.count
  9. when 0 then 'No patch found'
  10. when 1 then '1 successful patch applied'
  11. else "#{count} successful patch applied"
  12. end