Sha256: 9bd5fcef8a9a3017b5614433c58d26ad0025fc7aff995d92c5a9f61276354208
Contents?: true
Size: 591 Bytes
Versions: 18
Compression:
Stored size: 591 Bytes
Contents
require 'mattock/task' require 'mattock/command-line' module Mattock class CommandTask < Task setting(:task_name, :run) setting(:command) setting(:verify_command, nil) def verify_command if @verify_command.respond_to?(:call) @verify_command = @verify_command.call end @verify_command end def decorated(cmd) cmd end def action decorated(command).must_succeed! end def needed? unless verify_command.nil? !decorated(verify_command).succeeds? else super end end end end
Version data entries
18 entries across 18 versions & 1 rubygems