lib/hako/definition_loader.rb in hako-0.12.0 vs lib/hako/definition_loader.rb in hako-0.13.0
- old
+ new
@@ -1,10 +1,9 @@
# frozen_string_literal: true
require 'set'
require 'hako/app_container'
require 'hako/container'
-require 'hako/fronts'
require 'hako/loader'
module Hako
class DefinitionLoader
def initialize(app, dry_run:)
@@ -37,11 +36,11 @@
containers[name] =
case name
when 'app'
AppContainer.new(@app, @app.yaml['app'].merge('tag' => tag), dry_run: @dry_run)
when 'front'
- load_front(@app.yaml['front'], dry_run: @dry_run)
+ Container.new(@app, @app.yaml.fetch('front'), dry_run: @dry_run)
else
Container.new(@app, additional_containers.fetch(name), dry_run: @dry_run)
end
containers[name].links.each do |link|
@@ -49,12 +48,8 @@
names << (m ? m[1] : link)
end
end
end
containers
- end
-
- def load_front(yaml, dry_run:)
- Loader.new(Hako::Fronts, 'hako/fronts').load(yaml.fetch('type')).new(@app, yaml, dry_run: dry_run)
end
end
end