annotate modules/stdlib/Rakefile @ 130:eb32a4978a7c puppet-3.6

Be less agressive with blocking on the grounds of SPF
author IBBoard <dev@ibboard.co.uk>
date Thu, 06 Oct 2016 19:02:30 +0100
parents addb0ea390a1
children c42fb28cff86
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 require 'rubygems'
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 require 'puppetlabs_spec_helper/rake_tasks'
37
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
3 require 'puppet-lint/tasks/puppet-lint'
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
4 PuppetLint.configuration.send('disable_80chars')
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
5 PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
6
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
7 desc "Validate manifests, templates, and ruby files in lib."
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
8 task :validate do
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
9 Dir['manifests/**/*.pp'].each do |manifest|
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
10 sh "puppet parser validate --noop #{manifest}"
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
11 end
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
12 Dir['lib/**/*.rb'].each do |lib_file|
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
13 sh "ruby -c #{lib_file}"
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
14 end
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
15 Dir['templates/**/*.erb'].each do |template|
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
16 sh "erb -P -x -T '-' #{template} | ruby -c"
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
17 end
addb0ea390a1 Update Puppet "stdlib" module
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
18 end