4 require 'puppetlabs_spec_helper/rake_tasks'
5 require 'puppet-lint/tasks/puppet-lint'
7 Rake::Task[:lint].clear
8 PuppetLint::RakeTask.new :lint do |config|
9 config.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp", "pkg/**/*.pp"]
10 config.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}'
11 # TODO: remove this check once the relative config
12 # is supported by puppet-lint release
13 config.disable_checks = [ 'autoloader_layout' ]
16 # use librarian-puppet to manage fixtures instead of .fixtures.yml
17 # offers more possibilities like explicit version management, forge downloads,...
18 task :librarian_spec_prep do
19 # sh "librarian-puppet install --path=spec/fixtures/modules/"
21 # because we don't have librarian-puppet
22 unless File.directory?("#{pwd}/spec/fixtures/modules")
23 sh "mkdir -p #{pwd}/spec/fixtures/modules"
25 unless File.directory?("#{pwd}/spec/fixtures/modules/sysctl")
26 sh "ln -s #{pwd} #{pwd}/spec/fixtures/modules/sysctl"
29 task :spec_prep => :librarian_spec_prep
32 task :default => [:spec, :lint]