20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/project_types/extension/models/server_config/extension.rb', line 20
def self.build(uuid: "", template:, type:, root_dir:, **args)
renderer = ServerConfig::DevelopmentRenderer.find(type)
entry = ServerConfig::DevelopmentEntries.find(template)
new(
uuid: uuid.empty? ? generate_dev_uuid : uuid,
type: type.downcase,
user: ServerConfig::User.new,
development: ServerConfig::Development.new(
root_dir: root_dir,
template: template,
renderer: renderer,
entries: entry
),
capabilities: ServerConfig::Capabilities.new(
network_access: false
),
metafields: args.delete(:metafields)
)
end
|