Skip to content
This repository
Browse code

Fixed rake stats to ignore editor backup files like model.rb~ #791 [s…

…kanthak]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@868 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 693e0df352e52dd5b3d1b191bbd018cd17023343 1 parent 86543a7
David Heinemeier Hansson authored March 06, 2005
2  railties/CHANGELOG
... ...
@@ -1,5 +1,7 @@
1 1
 *SVN*
2 2
 
  3
+* Fixed rake stats to ignore editor backup files like model.rb~ #791 [skanthak]
  4
+
3 5
 * Added exception shallowing if the DRb server can't be started (not worth making a fuss about to distract new users) #779 [Tobias Luetke]
4 6
 
5 7
 * Added an empty favicon.ico file to the public directory of new applications (so the logs are not spammed by its absence)
2  railties/lib/code_statistics.rb
@@ -23,7 +23,7 @@ def calculate_statistics
23 23
       @pairs.inject({}) { |stats, pair| stats[pair.first] = calculate_directory_statistics(pair.last); stats }
24 24
     end
25 25
 
26  
-    def calculate_directory_statistics(directory, pattern = /.*rb/)
  26
+    def calculate_directory_statistics(directory, pattern = /.*\.rb$/)
27 27
       stats = { "lines" => 0, "codelines" => 0, "classes" => 0, "methods" => 0 }
28 28
 
29 29
       Dir.foreach(directory) do |file_name| 

0 notes on commit 693e0df

Please sign in to comment.
Something went wrong with that request. Please try again.