Module: Luban::Deployment::Applications::Rack::WebServers::Thin::Paths
- Included in:
- Common
- Defined in:
- lib/luban/deployment/applications/rack/web_servers/thin.rb
Instance Method Summary collapse
- #control_file_extname ⇒ Object
- #pid_file_name(n = nil) ⇒ Object
- #pid_file_path(n = nil) ⇒ Object
- #socket_file_name(n = nil) ⇒ Object
- #socket_file_path(n = nil) ⇒ Object
Instance Method Details
#control_file_extname ⇒ Object
63 64 65 |
# File 'lib/luban/deployment/applications/rack/web_servers/thin.rb', line 63 def control_file_extname @control_file_extname ||= "yml" end |
#pid_file_name(n = nil) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/luban/deployment/applications/rack/web_servers/thin.rb', line 55 def pid_file_name(n = nil) if n.nil? @pid_file_name ||= "#{current_web_server}.pid" else "#{current_web_server}.#{n + web_server[:opts][:port].to_i}.pid" end end |
#pid_file_path(n = nil) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/luban/deployment/applications/rack/web_servers/thin.rb', line 47 def pid_file_path(n = nil) if n.nil? @pid_file_path ||= pids_path.join(pid_file_name) else pids_path.join(pid_file_name(n)) end end |
#socket_file_name(n = nil) ⇒ Object
75 76 77 78 79 80 81 |
# File 'lib/luban/deployment/applications/rack/web_servers/thin.rb', line 75 def socket_file_name(n = nil) if n.nil? @socket_file_name ||= "#{current_web_server}.sock" else "#{current_web_server}.#{n}.sock" end end |
#socket_file_path(n = nil) ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/luban/deployment/applications/rack/web_servers/thin.rb', line 67 def socket_file_path(n = nil) if n.nil? @socket_file_path ||= sockets_path.join(socket_file_name) else sockets_path.join(socket_file_name(n)) end end |