Class: Simp::Rake::Helpers
- Inherits:
-
Object
- Object
- Simp::Rake::Helpers
- Defined in:
- lib/simp/rake/helpers.rb,
lib/simp/rake/helpers/version.rb,
lib/simp/rake/helpers/rpm_spec.rb
Defined Under Namespace
Modules: RPMSpec
Constant Summary collapse
- VERSION =
'6.1.0'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dir = Dir.pwd) ⇒ Helpers
constructor
dir = top-level of project,.
Constructor Details
#initialize(dir = Dir.pwd) ⇒ Helpers
dir = top-level of project,
11 12 13 14 15 16 17 |
# File 'lib/simp/rake/helpers.rb', line 11 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 |
Class Method Details
.check_required_commands(required_commands) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/simp/rake/helpers.rb', line 19 def self.check_required_commands(required_commands) require 'facter' invalid_commands = [] Array(required_commands).each do |command| unless Array(command).find { |x| Facter::Core::Execution.which(x) } invalid_commands << Array(command).join(' or ') end end return if invalid_commands.empty? errmsg = "Error: The following required commands were not found on your system:\n\n* \#{invalid_commands.join(\"\\n * \")}\n\nPlease update your system and try again.\n EOM\n\n raise(errmsg)\nend\n" |