statistics.rake 462 B

12345678910111213141516171819
  1. # frozen_string_literal: true
  2. task stats: 'mastodon:stats'
  3. namespace :mastodon do
  4. desc 'Report code statistics (KLOCs, etc)'
  5. task :stats do
  6. require 'rails/code_statistics'
  7. [
  8. %w(App\ Libraries app/lib),
  9. %w(Presenters app/presenters),
  10. %w(Services app/services),
  11. %w(Validators app/validators),
  12. %w(Workers app/workers),
  13. ].each do |name, dir|
  14. ::STATS_DIRECTORIES << [name, Rails.root.join(dir)]
  15. end
  16. end
  17. end