diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-01-18 19:47:17 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-01-18 19:47:17 +0100 |
commit | b505d45a5cd2343eb5b662cda5f48b4a63b397f1 (patch) | |
tree | bf566a2a4549ff5a65234726b236af8c320fe1dc /railties/lib | |
parent | 75f1b229fdb340b2cdaf632bb6a223213f05dc75 (diff) | |
parent | ef233bba9a0770ada1ebb45c804a319777bbff45 (diff) | |
download | rails-b505d45a5cd2343eb5b662cda5f48b4a63b397f1.tar.gz rails-b505d45a5cd2343eb5b662cda5f48b4a63b397f1.tar.bz2 rails-b505d45a5cd2343eb5b662cda5f48b4a63b397f1.zip |
Merge pull request #23006 from Edouard-chin/code_statistic_ignore_hidde_files
CodeStatistic will now ignore hidden files:
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/code_statistics.rb | 2 |
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| |