mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixed rake stats to ignore editor backup files like model.rb~ #791 [skanthak]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@868 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
86543a70fb
commit
693e0df352
2 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
*SVN*
|
*SVN*
|
||||||
|
|
||||||
|
* Fixed rake stats to ignore editor backup files like model.rb~ #791 [skanthak]
|
||||||
|
|
||||||
* Added exception shallowing if the DRb server can't be started (not worth making a fuss about to distract new users) #779 [Tobias Luetke]
|
* Added exception shallowing if the DRb server can't be started (not worth making a fuss about to distract new users) #779 [Tobias Luetke]
|
||||||
|
|
||||||
* Added an empty favicon.ico file to the public directory of new applications (so the logs are not spammed by its absence)
|
* Added an empty favicon.ico file to the public directory of new applications (so the logs are not spammed by its absence)
|
||||||
|
|
|
@ -23,7 +23,7 @@ class CodeStatistics
|
||||||
@pairs.inject({}) { |stats, pair| stats[pair.first] = calculate_directory_statistics(pair.last); stats }
|
@pairs.inject({}) { |stats, pair| stats[pair.first] = calculate_directory_statistics(pair.last); stats }
|
||||||
end
|
end
|
||||||
|
|
||||||
def calculate_directory_statistics(directory, pattern = /.*rb/)
|
def calculate_directory_statistics(directory, pattern = /.*\.rb$/)
|
||||||
stats = { "lines" => 0, "codelines" => 0, "classes" => 0, "methods" => 0 }
|
stats = { "lines" => 0, "codelines" => 0, "classes" => 0, "methods" => 0 }
|
||||||
|
|
||||||
Dir.foreach(directory) do |file_name|
|
Dir.foreach(directory) do |file_name|
|
||||||
|
|
Loading…
Reference in a new issue