try again, with puppetforge modules, correctly included now
[mirror/dsa-puppet.git] / 3rdparty / modules / sysctl / Rakefile
1 require 'bundler'
2 Bundler.require(:rake)
3
4 require 'puppetlabs_spec_helper/rake_tasks'
5 require 'puppet-lint/tasks/puppet-lint'
6
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' ]
14 end
15
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/"
20   pwd = `pwd`.strip
21   # because we don't have librarian-puppet
22   unless File.directory?("#{pwd}/spec/fixtures/modules")
23     sh "mkdir -p #{pwd}/spec/fixtures/modules"
24   end
25   unless File.directory?("#{pwd}/spec/fixtures/modules/sysctl")
26     sh "ln -s #{pwd} #{pwd}/spec/fixtures/modules/sysctl"
27   end
28 end
29 task :spec_prep => :librarian_spec_prep
30
31
32 task :default => [:spec, :lint]