diff options
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/code_statistics.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 35fb6dc425..7487be5b62 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Include lib/tasks/*.rake in rake stats. #2261 [Thomas Fuchs <thomas@fesch.at>] + * Clearly label functional and unit tests in rake stats output. #2297 [lasse.koskela@gmail.com] * Make the migration generator only check files ending in *.rb when calculating the next file name #2317 [Chad Fowler] diff --git a/railties/lib/code_statistics.rb b/railties/lib/code_statistics.rb index 75334c4610..203a91f323 100644 --- a/railties/lib/code_statistics.rb +++ b/railties/lib/code_statistics.rb @@ -26,7 +26,7 @@ class CodeStatistics @pairs.inject({}) { |stats, pair| stats[pair.first] = calculate_directory_statistics(pair.last); stats } end - def calculate_directory_statistics(directory, pattern = /.*\.rb$/) + def calculate_directory_statistics(directory, pattern = /.*\.r(b|ake)$/) stats = { "lines" => 0, "codelines" => 0, "classes" => 0, "methods" => 0 } Dir.foreach(directory) do |file_name| |