Class: Build::DependencyTask
- Defined in:
- lib/build/dependency_node.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
Attributes inherited from Task
Instance Method Summary collapse
- #dependency ⇒ Object
-
#initialize(*arguments, **options) ⇒ DependencyTask
constructor
A new instance of DependencyTask.
- #update ⇒ Object
Methods inherited from Task
#name, #node_string, #task_class
Constructor Details
#initialize(*arguments, **options) ⇒ DependencyTask
Returns a new instance of DependencyTask.
82 83 84 85 86 87 88 89 |
# File 'lib/build/dependency_node.rb', line 82 def initialize(*arguments, **) super @provisions = [] @environments = nil @environment = nil end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
91 92 93 |
# File 'lib/build/dependency_node.rb', line 91 def environment @environment end |
Instance Method Details
#dependency ⇒ Object
93 94 95 |
# File 'lib/build/dependency_node.rb', line 93 def dependency @node.dependency end |
#update ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/build/dependency_node.rb', line 97 def update logger.debug(self) do |buffer| buffer.puts "building #{@node} which #{@node.dependency}" @node.provisions.each do |provision| buffer.puts "\tbuilding #{provision.provider.name} which #{provision}" end end # Lookup what things this dependency provides: @node.provisions.each do |provision| @provisions << invoke( @node.provision_node_for(provision) ) end if wait_for_children? update_environments! else fail!(ProvisionsFailed) end end |