lib/logical-construct/target/platforms/default/resolve-configuration.rb in logical-construct-0.0.1.localtesting vs lib/logical-construct/target/platforms/default/resolve-configuration.rb in logical-construct-0.0.1

- old
+ new

@@ -6,19 +6,38 @@ setting :bind, '0.0.0.0' setting :port, 51076 setting :valise + def initialize(*args, &block) + @pending_satisfiables = [] + @resolver = nil + @manifest = nil + super + end + def default_configuration(provision) + super self.valise = provision.valise end + def add_file(file_satisfiable) + if @resolver.nil? + @pending_satifiables << file_satisfiable + else + @resolver.add_satisfiable(file_satisfiable) + @manifest.add_satisfiable(file_satisfiable) + end + end + def define in_namespace do - resolver = LogicalConstruct::SinatraResolver.new do |task| - task.task_name = "resolve" + @manifest = LogicalConstruct::Manifest.new(*@pending_satisfiables) + + @resolver = LogicalConstruct::SinatraResolver.new(*([@manifest] + @pending_satisfiables)) do |task| + copy_settings_to(task) end - copy_settings_to(resolver) + @pending_satisfiables.clear end end end end end