mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Ticket 2261 - Include lib/tasks/*.rake in rake stats
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2376 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
17d2732b1c
commit
5217b90909
2 changed files with 3 additions and 1 deletions
|
@ -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]
|
||||
|
|
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue