statistics.rake 517 B

123456789101112131415161718192021
  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. ['App Libraries', 'app/lib'],
  9. %w(Presenters app/presenters),
  10. %w(Policies app/policies),
  11. %w(Serializers app/serializers),
  12. %w(Services app/services),
  13. %w(Validators app/validators),
  14. %w(Workers app/workers),
  15. ].each do |name, dir|
  16. STATS_DIRECTORIES << [name, dir]
  17. end
  18. end
  19. end