diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/code_statistics.rb | 8 | ||||
-rw-r--r-- | railties/lib/rails/engine.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/ruby_version_check.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/restart.rake | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/code_statistics.rb b/railties/lib/rails/code_statistics.rb index 0bdf63943f..583d005d46 100644 --- a/railties/lib/rails/code_statistics.rb +++ b/railties/lib/rails/code_statistics.rb @@ -71,12 +71,12 @@ class CodeStatistics #:nodoc: def print_header print_splitter - puts "| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |" + puts "| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |" print_splitter end def print_splitter - puts "+----------------------+-------+-------+---------+---------+-----+-------+" + puts "+----------------------+--------+--------+---------+---------+-----+-------+" end def print_line(name, statistics) @@ -84,8 +84,8 @@ class CodeStatistics #:nodoc: loc_over_m = (statistics.code_lines / statistics.methods) - 2 rescue loc_over_m = 0 puts "| #{name.ljust(20)} " \ - "| #{statistics.lines.to_s.rjust(5)} " \ - "| #{statistics.code_lines.to_s.rjust(5)} " \ + "| #{statistics.lines.to_s.rjust(6)} " \ + "| #{statistics.code_lines.to_s.rjust(6)} " \ "| #{statistics.classes.to_s.rjust(7)} " \ "| #{statistics.methods.to_s.rjust(7)} " \ "| #{m_over_c.to_s.rjust(3)} " \ diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index e1d5caf790..fd37fd0457 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -513,7 +513,7 @@ module Rails def call(env) env.merge!(env_config) if env['SCRIPT_NAME'] - env["ROUTES_#{routes.object_id}_SCRIPT_NAME"] = env['SCRIPT_NAME'].dup + env[routes.env_key] = env['SCRIPT_NAME'].dup end app.call(env) end diff --git a/railties/lib/rails/ruby_version_check.rb b/railties/lib/rails/ruby_version_check.rb index aea3d2339c..e2a199ec4d 100644 --- a/railties/lib/rails/ruby_version_check.rb +++ b/railties/lib/rails/ruby_version_check.rb @@ -1,4 +1,4 @@ -if RUBY_VERSION < '2.2.0' +if RUBY_VERSION < '2.2.0' && RUBY_ENGINE == 'ruby' desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" abort <<-end_message diff --git a/railties/lib/rails/tasks/restart.rake b/railties/lib/rails/tasks/restart.rake index 1af0302824..1e8940b675 100644 --- a/railties/lib/rails/tasks/restart.rake +++ b/railties/lib/rails/tasks/restart.rake @@ -1,4 +1,4 @@ desc "Restart app by touching tmp/restart.txt" -task restart: :environment do +task :restart do FileUtils.touch('tmp/restart.txt') end |