Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fail if a dep doesn't have met? and meet defined

  • Loading branch information...
commit 6c040077341da478d08293a5dabe5f9194360692 1 parent 7af8cb9
Caleb Spare authored March 26, 2012

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  lib/terraform/terraform_dsl.rb
2  lib/terraform/terraform_dsl.rb
@@ -21,6 +21,8 @@ def dep(name)
21 21
     return if @dependencies.find { |dep| dep[:name] == name }
22 22
     @dependencies.push(@current_dependency = { :name => name })
23 23
     yield
  24
+    fail_and_exit "Error: no 'met?' block defined for dep '#{name}'." unless @current_dependency[:met?]
  25
+    fail_and_exit "Error: no 'meet' block defined for dep '#{name}'." unless @current_dependency[:meet]
24 26
   end
25 27
   def met?(&block) @current_dependency[:met?] = block end
26 28
   def meet(&block) @current_dependency[:meet] = block end

0 notes on commit 6c04007

Please sign in to comment.
Something went wrong with that request. Please try again.