Module: Citrus::Utils::PathUtil
- Included in:
- Components::Remote, Server::Server
- Defined in:
- lib/citrus/util/path_util.rb
Overview
PathUtil
Instance Method Summary collapse
-
#get_handler_path(app_base, server_type) ⇒ Object
Get handler path.
-
#get_sys_remote_path(role) ⇒ Object
Get system remote service path.
-
#get_user_remote_path(app_base, server_type) ⇒ Object
Get user remote service path.
-
#remote_path_record(namespace, server_type, path) ⇒ Object
Compose remote path record.
Instance Method Details
#get_handler_path(app_base, server_type) ⇒ Object
Get handler path
44 45 46 47 |
# File 'lib/citrus/util/path_util.rb', line 44 def get_handler_path app_base, server_type path = File.join app_base, '/app/servers/', server_type, 'handlers' File.exists?(path) ? path : nil end |
#get_sys_remote_path(role) ⇒ Object
Get system remote service path
17 18 19 20 |
# File 'lib/citrus/util/path_util.rb', line 17 def get_sys_remote_path role path = File.join File.dirname(__FILE__), '/../common/remote/', role File.exists?(path) ? path : nil end |
#get_user_remote_path(app_base, server_type) ⇒ Object
Get user remote service path
26 27 28 29 |
# File 'lib/citrus/util/path_util.rb', line 26 def get_user_remote_path app_base, server_type path = File.join app_base, '/app/servers/', server_type, 'remote' File.exists?(path) ? path : nil end |
#remote_path_record(namespace, server_type, path) ⇒ Object
Compose remote path record
36 37 38 |
# File 'lib/citrus/util/path_util.rb', line 36 def remote_path_record namespace, server_type, path { :namespace => namespace, :server_type => server_type, :path => path } end |