lib/mikoshi/plan.rb in mikoshi-0.2.0 vs lib/mikoshi/plan.rb in mikoshi-0.2.1

- old
+ new

@@ -3,10 +3,12 @@ require 'active_support/core_ext/hash/keys' require 'erb' require 'yaml' module Mikoshi + HookExecutionError = Class.new(StandardError) + class Plan class Base attr_reader :data, :client def initialize(yaml_path: nil, client: nil) @@ -17,10 +19,10 @@ @client = client end def invoke_hooks(hooks) hooks.each do |hook| - system hook + raise(HookExecutionError, hook) unless system(hook) end end end end end