1 require 'puppetlabs_spec_helper/rake_tasks'
2 require 'puppet-lint/tasks/puppet-lint'
4 PuppetLint.configuration.ignore_paths = ['spec/**/*.pp', 'tests/**/*.pp', 'pkg/**/*.pp', 'vendor/**/*.pp']
5 PuppetLint.configuration.log_format = '%{path}:%{line}:%{KIND}: %{message}'
7 desc 'Validate manifests, templates, and ruby files'
9 Dir['manifests/**/*.pp'].each do |manifest|
10 sh "puppet parser validate --noop #{manifest}"
12 Dir['spec/**/*.rb', 'lib/**/*.rb'].each do |ruby_file|
13 sh "ruby -c #{ruby_file}" unless ruby_file =~ %r{/spec\/fixtures/}
15 Dir['templates/**/*.erb'].each do |template|
16 sh "erb -P -x -T '-' #{template} | ruby -c"
20 # blacksmith is broken with ruby 1.8.7
21 if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.8.7')
22 # blacksmith isn't always present, e.g. on Travis with --without development
24 require 'puppet_blacksmith/rake_tasks'
25 Blacksmith::RakeTask.new do |t|