Class: Luban::Deployment::Helpers::Configuration::Finder::Application
- Inherits:
-
Luban::Deployment::Helpers::Configuration::Finder
- Object
- Luban::Deployment::Helpers::Configuration::Finder
- Luban::Deployment::Helpers::Configuration::Finder::Application
- Defined in:
- lib/luban/deployment/helpers/configuration.rb
Instance Attribute Summary collapse
-
#profile_templates_path ⇒ Object
readonly
Returns the value of attribute profile_templates_path.
-
#stage_profile_path ⇒ Object
readonly
Returns the value of attribute stage_profile_path.
-
#stage_profile_templates_path ⇒ Object
readonly
Returns the value of attribute stage_profile_templates_path.
Attributes inherited from Luban::Deployment::Helpers::Configuration::Finder
#config_file, #config_path, #config_root, #stage_config_file, #stage_config_path, #stage_templates_path, #target, #templates_path
Instance Method Summary collapse
Methods inherited from Luban::Deployment::Helpers::Configuration::Finder
application, default_templates_paths, #deployfile, find_default_template_file, #initialize, #load_configuration, #load_general_configuration, #load_stage_configuration, project, #stagefile
Constructor Details
This class inherits a constructor from Luban::Deployment::Helpers::Configuration::Finder
Instance Attribute Details
#profile_templates_path ⇒ Object (readonly)
Returns the value of attribute profile_templates_path.
101 102 103 |
# File 'lib/luban/deployment/helpers/configuration.rb', line 101 def profile_templates_path @profile_templates_path end |
#stage_profile_path ⇒ Object (readonly)
Returns the value of attribute stage_profile_path.
102 103 104 |
# File 'lib/luban/deployment/helpers/configuration.rb', line 102 def stage_profile_path @stage_profile_path end |
#stage_profile_templates_path ⇒ Object (readonly)
Returns the value of attribute stage_profile_templates_path.
103 104 105 |
# File 'lib/luban/deployment/helpers/configuration.rb', line 103 def stage_profile_templates_path @stage_profile_templates_path end |
Instance Method Details
#base_path ⇒ Object
105 |
# File 'lib/luban/deployment/helpers/configuration.rb', line 105 def base_path; base_path ||= target.apps_path.join(target.application); end |
#find_template_file(file_name) ⇒ Object
113 114 115 116 117 |
# File 'lib/luban/deployment/helpers/configuration.rb', line 113 def find_template_file(file_name) return file_path if (file_path = stage_profile_templates_path.join(file_name)).file? return file_path if (file_path = profile_templates_path.join(file_name)).file? super end |
#has_profile? ⇒ Boolean
107 108 109 110 111 |
# File 'lib/luban/deployment/helpers/configuration.rb', line 107 def has_profile? !Dir["#{stage_profile_templates_path}/**/*"].empty? or !Dir["#{stage_profile_path}/**/*"].empty? or !Dir["#{profile_templates_path}/**/*"].empty? end |