aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/debug_locks.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 18:51:43 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 18:51:43 +0200
commit628e51ff109334223094e30ad1365188bbd7f9c6 (patch)
tree6bf28936ffa0fb4fe2390b933958053daeffbc90 /actionpack/lib/action_dispatch/middleware/debug_locks.rb
parent4b6c68dfb810c836f87587a16353317d1a180805 (diff)
downloadrails-628e51ff109334223094e30ad1365188bbd7f9c6.tar.gz
rails-628e51ff109334223094e30ad1365188bbd7f9c6.tar.bz2
rails-628e51ff109334223094e30ad1365188bbd7f9c6.zip
applies new string literal convention in actionpack/lib
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/debug_locks.rb')
-rw-r--r--actionpack/lib/action_dispatch/middleware/debug_locks.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/debug_locks.rb b/actionpack/lib/action_dispatch/middleware/debug_locks.rb
index 13254d08de..91c2fbac01 100644
--- a/actionpack/lib/action_dispatch/middleware/debug_locks.rb
+++ b/actionpack/lib/action_dispatch/middleware/debug_locks.rb
@@ -21,7 +21,7 @@ module ActionDispatch
# This middleware exposes operational details of the server, with no access
# control. It should only be enabled when in use, and removed thereafter.
class DebugLocks
- def initialize(app, path = '/rails/locks')
+ def initialize(app, path = "/rails/locks")
@app = app
@path = path
end
@@ -30,7 +30,7 @@ module ActionDispatch
req = ActionDispatch::Request.new env
if req.get?
- path = req.path_info.chomp('/'.freeze)
+ path = req.path_info.chomp("/".freeze)
if path == @path
return render_details(req)
end
@@ -61,16 +61,16 @@ module ActionDispatch
str = threads.map do |thread, info|
if info[:exclusive]
- lock_state = 'Exclusive'
+ lock_state = "Exclusive"
elsif info[:sharing] > 0
- lock_state = 'Sharing'
+ lock_state = "Sharing"
lock_state << " x#{info[:sharing]}" if info[:sharing] > 1
else
- lock_state = 'No lock'
+ lock_state = "No lock"
end
if info[:waiting]
- lock_state << ' (yielded share)'
+ lock_state << " (yielded share)"
end
msg = "Thread #{info[:index]} [0x#{thread.__id__.to_s(16)} #{thread.status || 'dead'}] #{lock_state}\n"