Sha256: 2ffb4152def2b9daa0c661070840c97e8a96af047daa35085a4157f230ee2a42

Contents?: true

Size: 938 Bytes

Versions: 37

Compression:

Stored size: 938 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 Facter::Core::Execution.which(command)
        invalid_commands << command
      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

37 entries across 37 versions & 1 rubygems

Version Path
simp-rake-helpers-5.6.2 lib/simp/rake/helpers.rb
simp-rake-helpers-5.6.1 lib/simp/rake/helpers.rb
simp-rake-helpers-5.6.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.5.3 lib/simp/rake/helpers.rb
simp-rake-helpers-5.5.2 lib/simp/rake/helpers.rb
simp-rake-helpers-5.5.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.4.3 lib/simp/rake/helpers.rb
simp-rake-helpers-5.4.1 lib/simp/rake/helpers.rb
simp-rake-helpers-5.3.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.2.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.1.4 lib/simp/rake/helpers.rb
simp-rake-helpers-5.1.2 lib/simp/rake/helpers.rb
simp-rake-helpers-5.1.1 lib/simp/rake/helpers.rb
simp-rake-helpers-5.1.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.0.2 lib/simp/rake/helpers.rb
simp-rake-helpers-5.0.1 lib/simp/rake/helpers.rb
simp-rake-helpers-5.0.0 lib/simp/rake/helpers.rb