puppet-limesurvey/Rakefile

28 lines
897 B
Ruby
Raw Permalink Normal View History

2016-09-08 10:59:56 +00:00
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'metadata-json-lint/rake_task'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.relative = true
PuppetLint.configuration.ignore_paths = ['spec/**/*.pp', 'pkg/**/*.pp', "vendor/**/*.pp"]
2016-09-08 10:59:56 +00:00
desc 'Validate manifests, templates, and ruby files'
task :validate do
Dir['manifests/**/*.pp'].each do |manifest|
sh "puppet parser validate --noop #{manifest}"
end
Dir['spec/**/*.rb', 'lib/**/*.rb'].each do |ruby_file|
sh "ruby -c #{ruby_file}" unless ruby_file =~ %r{spec/fixtures}
end
Dir['templates/**/*.erb'].each do |template|
sh "erb -P -x -T '-' #{template} | ruby -c"
end
end
desc 'Run metadata_lint, lint, validate, and spec tests.'
task :default do
[:metadata_lint, :lint, :validate, :spec, :beaker].each do |test|
Rake::Task[test].invoke
end
end