class ChefApply::Config
Constants
- SUPPORTED_PROTOCOLS
- WS_BASE_PATH
Public Class Methods
base_log_directory()
click to toggle source
# File lib/chef_apply/config.rb, line 61 def base_log_directory File.dirname(log.location) end
custom_location(path)
click to toggle source
# File lib/chef_apply/config.rb, line 40 def custom_location(path) @custom_location = path raise "No config file located at #{path}" unless exist? end
default_location()
click to toggle source
# File lib/chef_apply/config.rb, line 45 def default_location File.join(WS_BASE_PATH, "config.toml") end
error_output_path()
click to toggle source
These paths are relative to the log output path, which is user-configurable.
# File lib/chef_apply/config.rb, line 66 def error_output_path File.join(base_log_directory, "errors.txt") end
exist?()
click to toggle source
# File lib/chef_apply/config.rb, line 88 def exist? File.exist? location end
initialize_mixlib_config()
click to toggle source
Ensure when we extend Mixlib::Config that we load up the workstation config since we will need that to converge later
Calls superclass method
# File lib/chef_apply/config.rb, line 36 def initialize_mixlib_config super end
load()
click to toggle source
# File lib/chef_apply/config.rb, line 82 def load if exist? from_file(location) end end
location()
click to toggle source
# File lib/chef_apply/config.rb, line 78 def location using_default_location? ? default_location : @custom_location end
reset()
click to toggle source
Calls superclass method
# File lib/chef_apply/config.rb, line 92 def reset @custom_location = nil super end
stack_trace_path()
click to toggle source
# File lib/chef_apply/config.rb, line 70 def stack_trace_path File.join(base_log_directory, "stack-trace.log") end
telemetry_installation_identifier_file()
click to toggle source
# File lib/chef_apply/config.rb, line 57 def telemetry_installation_identifier_file File.join(WS_BASE_PATH, "installation_id") end
telemetry_path()
click to toggle source
# File lib/chef_apply/config.rb, line 49 def telemetry_path File.join(WS_BASE_PATH, "telemetry") end
telemetry_session_file()
click to toggle source
# File lib/chef_apply/config.rb, line 53 def telemetry_session_file File.join(telemetry_path, "TELEMETRY_SESSION_ID") end
using_default_location?()
click to toggle source
# File lib/chef_apply/config.rb, line 74 def using_default_location? @custom_location.nil? end