Created
November 9, 2018 18:17
-
-
Save teeparham/4a1b9b2eb47ea1f4b1f5f76dee4aefdd to your computer and use it in GitHub Desktop.
Add directories to rake stats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/stats.rake | |
require "rails/code_statistics" | |
task stats: :more_stats | |
task :more_stats do | |
%w[Forms Policies Presenters Serializers Services].each_with_index do |type, i| | |
STATS_DIRECTORIES.insert i + 5, [type, "app/#{type.downcase}"] | |
STATS_DIRECTORIES.insert i * 2 + 13, ["#{type} tests", "test/#{type.downcase}"] | |
CodeStatistics::TEST_TYPES << "#{type} tests" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment