Sha256: 7cd38750c02670cafcaa96151df930f2a5084a37d4d076ce1c8da8193f7afe13
Contents?: true
Size: 803 Bytes
Versions: 16
Compression:
Stored size: 803 Bytes
Contents
require 'thor' class Thor module Actions alias_method :run_base, :run def run(command, config={}) command_output = run_base(command, config) if config[:raise_errors] && !$?.success? say "An error has occured while running: \"#{command}\"", :red say 'Command output:' raise Thor::Error, "\n***\n#{command_output}***" end end def run!(command, config={}) config.merge!({ :raise_errors => true }) run command, config end end end class Thor module Actions class EmptyDirectory protected def convert_encoded_instructions(filename) filename.gsub(/%(.*?)%/) do |initial_string| config[$1.strip.to_sym] or call_public_method($1.strip) or initial_string end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems