module Citrus::Utils::PathUtil

PathUtil

Public Instance Methods

get_handler_path(app_base, server_type) click to toggle source

Get handler path

@param [String] app_base @param [String] server_type

# 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) click to toggle source

Get system remote service path

@param [String] role

# 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) click to toggle source

Get user remote service path

@param [String] app_base @param [String] server_type

# 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) click to toggle source

Compose remote path record

@param [String] namespace @param [String] server_type @param [String] path

# 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