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
447 B

3 months ago
3 months ago
3 months ago
3 months ago
  1. return unless Rails.application.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 "#{patches.count} successful patches applied"
  12. # end