-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
33 lines (25 loc) · 1.1 KB
/
Rakefile
File metadata and controls
33 lines (25 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require 'bundler'
# devel
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
# debug
require 'pry' if Bundler.rubygems.find_name('pry').any?
Bundler.require(:rake)
Dir.glob('build/*.rb').each { |r| import r }
Dir.glob('build/*.rake').each { |r| import r }
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"]
PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}'
PuppetLint.configuration.send("disable_class_inherits_from_params_class")
PuppetLint.configuration.send("disable_80chars")
# use librarian-puppet to manage fixtures instead of .fixtures.yml
# offers more possibilities like explicit version management, forge downloads,...
task :librarian_spec_prep do
sh "librarian-puppet install --path=spec/fixtures/modules/"
pwd = `pwd`.strip
unless File.directory?("#{pwd}/spec/fixtures/modules/dsc")
sh "ln -s #{pwd} #{pwd}/spec/fixtures/modules/dsc"
end
end
task :spec_prep => :librarian_spec_prep
task :default => [:spec, :lint]