aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/code_statistics.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 19:15:47 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 19:15:47 +0200
commit69ab3eb57e8387b0dd9d672b5e8d9185395baa03 (patch)
treea49845496e36ba7659a863e6550fcccbb9317d7d /railties/lib/rails/code_statistics.rb
parentf8477f13bfe554064bd25a57e5289b4ebaabb504 (diff)
downloadrails-69ab3eb57e8387b0dd9d672b5e8d9185395baa03.tar.gz
rails-69ab3eb57e8387b0dd9d672b5e8d9185395baa03.tar.bz2
rails-69ab3eb57e8387b0dd9d672b5e8d9185395baa03.zip
applies new string literal convention in railties/lib
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
Diffstat (limited to 'railties/lib/rails/code_statistics.rb')
-rw-r--r--railties/lib/rails/code_statistics.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/railties/lib/rails/code_statistics.rb b/railties/lib/rails/code_statistics.rb
index 7a8f42fe94..da0df95c06 100644
--- a/railties/lib/rails/code_statistics.rb
+++ b/railties/lib/rails/code_statistics.rb
@@ -1,16 +1,16 @@
-require 'rails/code_statistics_calculator'
-require 'active_support/core_ext/enumerable'
+require "rails/code_statistics_calculator"
+require "active_support/core_ext/enumerable"
class CodeStatistics #:nodoc:
- TEST_TYPES = ['Controller tests',
- 'Helper tests',
- 'Model tests',
- 'Mailer tests',
- 'Job tests',
- 'Integration tests']
+ TEST_TYPES = ["Controller tests",
+ "Helper tests",
+ "Model tests",
+ "Mailer tests",
+ "Job tests",
+ "Integration tests"]
- HEADERS = {lines: ' Lines', code_lines: ' LOC', classes: 'Classes', methods: 'Methods'}
+ HEADERS = {lines: " Lines", code_lines: " LOC", classes: "Classes", methods: "Methods"}
def initialize(*pairs)
@pairs = pairs
@@ -76,20 +76,20 @@ class CodeStatistics #:nodoc:
def print_header
print_splitter
- print '| Name '
+ print "| Name "
HEADERS.each do |k, v|
print " | #{v.rjust(width_for(k))}"
end
- puts ' | M/C | LOC/M |'
+ puts " | M/C | LOC/M |"
print_splitter
end
def print_splitter
- print '+----------------------'
+ print "+----------------------"
HEADERS.each_key do |k|
print "+#{'-' * (width_for(k) + 2)}"
end
- puts '+-----+-------+'
+ puts "+-----+-------+"
end
def print_line(name, statistics)