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 a2d14abf01..c4de06d414 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *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 an empty favicon.ico file to the public directory of new applications (so the logs are not spammed by its absence) diff --git a/railties/lib/code_statistics.rb b/railties/lib/code_statistics.rb index efe8fc2454..ea3c1ad66d 100644 --- a/railties/lib/code_statistics.rb +++ b/railties/lib/code_statistics.rb @@ -23,7 +23,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 = /.*\.rb$/) stats = { "lines" => 0, "codelines" => 0, "classes" => 0, "methods" => 0 } Dir.foreach(directory) do |file_name| |