2017-04-26 19:47:22 +03:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
task stats: 'mastodon:stats'
|
|
|
|
|
|
|
|
namespace :mastodon do
|
|
|
|
desc 'Report code statistics (KLOCs, etc)'
|
|
|
|
task :stats do
|
|
|
|
require 'rails/code_statistics'
|
|
|
|
[
|
2023-02-20 07:14:10 +02:00
|
|
|
['App Libraries', 'app/lib'],
|
2017-04-26 19:47:22 +03:00
|
|
|
%w(Presenters app/presenters),
|
|
|
|
%w(Services app/services),
|
|
|
|
%w(Validators app/validators),
|
|
|
|
%w(Workers app/workers),
|
|
|
|
].each do |name, dir|
|
2023-02-18 05:30:03 +02:00
|
|
|
STATS_DIRECTORIES << [name, Rails.root.join(dir)]
|
2017-04-26 19:47:22 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|