Module: DockerSync::ConfigLocator
- Defined in:
- lib/docker-sync/config/config_locator.rb
Overview
helps us loading our config files, GlobalConfig and ProjectConfig
Constant Summary collapse
- ERROR_MISSING_PROJECT_CONFIG =
'No docker-sync.yml configuration found in your path ( traversing up ) '\ 'Did you define it for your project?'.freeze
Class Attribute Summary collapse
-
.global_config_path ⇒ Object
Returns the value of attribute global_config_path.
Class Method Summary collapse
-
.current_global_config_path ⇒ String
The path to the global config location.
-
.lookup_project_config_path ⇒ String
The path to the project configuration found.
Class Attribute Details
.global_config_path ⇒ Object
Returns the value of attribute global_config_path.
11 12 13 |
# File 'lib/docker-sync/config/config_locator.rb', line 11 def global_config_path @global_config_path end |
Class Method Details
.current_global_config_path ⇒ String
Returns The path to the global config location.
13 14 15 16 17 |
# File 'lib/docker-sync/config/config_locator.rb', line 13 def current_global_config_path path = global_config_path path = File.('~/.docker-sync-global.yml') if path.nil? path end |
.lookup_project_config_path ⇒ String
Returns the path to the project configuration found.
20 21 22 23 24 25 26 |
# File 'lib/docker-sync/config/config_locator.rb', line 20 def lookup_project_config_path files = project_config_find raise ERROR_MISSING_PROJECT_CONFIG if files.empty? files.pop end |