mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Properly show middlewares on rake about.
This commit is contained in:
parent
622e3dda84
commit
391f2543c9
1 changed files with 6 additions and 3 deletions
|
@ -51,9 +51,12 @@ module Rails
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
column_width = properties.names.map {|name| name.length}.max
|
column_width = properties.names.map {|name| name.length}.max
|
||||||
["About your application's environment", *properties.map do |property|
|
info = properties.map do |name, value|
|
||||||
"%-#{column_width}s %s" % property
|
value = value.join(", ") if value.is_a?(Array)
|
||||||
end] * "\n"
|
"%-#{column_width}s %s" % [name, value]
|
||||||
|
end
|
||||||
|
info.unshift "About your application's environment"
|
||||||
|
info * "\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
alias inspect to_s
|
alias inspect to_s
|
||||||
|
|
Loading…
Reference in a new issue