aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorEdouard CHIN <edouard.chin@shopify.com>2016-01-11 02:42:23 -0500
committerEdouard CHIN <edouard.chin@shopify.com>2016-01-18 12:56:20 -0500
commitef233bba9a0770ada1ebb45c804a319777bbff45 (patch)
tree5c0cea696d44b488b37006d4599ca89306ff864a /railties/lib
parent5465224892281a088422df438e4fc0ce7f6c8f5e (diff)
downloadrails-ef233bba9a0770ada1ebb45c804a319777bbff45.tar.gz
rails-ef233bba9a0770ada1ebb45c804a319777bbff45.tar.bz2
rails-ef233bba9a0770ada1ebb45c804a319777bbff45.zip
CodeStatistic will now ignore hidden files:
- Modify the default regex to not match hidden files
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/code_statistics.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/code_statistics.rb b/railties/lib/rails/code_statistics.rb
index 8e9097e1ef..0997414482 100644
--- a/railties/lib/rails/code_statistics.rb
+++ b/railties/lib/rails/code_statistics.rb
@@ -33,7 +33,7 @@ class CodeStatistics #:nodoc:
Hash[@pairs.map{|pair| [pair.first, calculate_directory_statistics(pair.last)]}]
end
- def calculate_directory_statistics(directory, pattern = /.*\.(rb|js|coffee|rake)$/)
+ def calculate_directory_statistics(directory, pattern = /^(?!\.).*?\.(rb|js|coffee|rake)$/)
stats = CodeStatisticsCalculator.new
Dir.foreach(directory) do |file_name|