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

Version Path
simp-rake-helpers-5.22.1 lib/simp/rake/helpers.rb
simp-rake-helpers-5.22.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.21.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.20.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.19.2 lib/simp/rake/helpers.rb
simp-rake-helpers-5.19.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.18.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.17.1 lib/simp/rake/helpers.rb
simp-rake-helpers-5.17.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.16.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.15.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.14.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.13.2 lib/simp/rake/helpers.rb
simp-rake-helpers-5.13.1 lib/simp/rake/helpers.rb
simp-rake-helpers-5.13.0 lib/simp/rake/helpers.rb
simp-rake-helpers-5.12.7 lib/simp/rake/helpers.rb
simp-rake-helpers-5.12.6 lib/simp/rake/helpers.rb
simp-rake-helpers-5.12.5 lib/simp/rake/helpers.rb
simp-rake-helpers-5.12.4 lib/simp/rake/helpers.rb
simp-rake-helpers-5.12.3 lib/simp/rake/helpers.rb