Sha256: 01c0df4810ee0b498dd280fe40328df2afe01913856c47f7b2a605c21ba5040b
Contents?: true
Size: 980 Bytes
Versions: 20
Compression:
Stored size: 980 Bytes
Contents
require File.expand_path('pkg', File.dirname(__FILE__)) require File.expand_path('fixtures', File.dirname(__FILE__)) module Simp; end module Simp::Rake; end class Simp::Rake::Helpers # dir = top-level of project, def initialize( dir = Dir.pwd ) Simp::Rake::Pkg.new( dir ) do | t | t.clean_list << "#{t.base_dir}/spec/fixtures/hieradata/hiera.yaml" end Simp::Rake::Fixtures.new( dir ) end def self.check_required_commands(required_commands) require 'facter' invalid_commands = Array.new Array(required_commands).each do |command| unless Array(command).find { |x| Facter::Core::Execution.which(x) } invalid_commands << Array(command).join(' or ') end end unless invalid_commands.empty? errmsg = <<-EOM Error: The following required commands were not found on your system: * #{invalid_commands.join("\n * ")} Please update your system and try again. EOM raise(errmsg) end end end
Version data entries
20 entries across 20 versions & 1 rubygems