52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/bolt_server/base_config.rb', line 52
def load_file_config(path)
@config_path = path
begin
parsed_hocon = Hocon.load(path)[service_name]
rescue Hocon::ConfigError => e
raise "Hocon data in '#{path}' failed to load.\n Error: '#{e.message}'"
rescue Errno::EACCES
raise "Your user doesn't have permission to read #{path}"
end
raise "Could not find service config at #{path}" if parsed_hocon.nil?
parsed_hocon = parsed_hocon.select { |key, _| config_keys.include?(key) }
@data = @data.merge(parsed_hocon)
end
|