mirror of
https://github.com/philippdieter/puppet-ldapquery.git
synced 2026-05-05 15:32:47 +00:00
modulesync 2.12.0
This commit is contained in:
committed by
Ewoud Kohl van Wijngaarden
parent
39610804e1
commit
3c0152dece
43
Rakefile
43
Rakefile
@@ -1,4 +1,4 @@
|
||||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'voxpupuli/test/rake'
|
||||
|
||||
# load optional tasks for releases
|
||||
# only available if gem group releases is installed
|
||||
@@ -7,47 +7,6 @@ begin
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
|
||||
PuppetLint.configuration.absolute_classname_reverse = true
|
||||
|
||||
exclude_paths = %w(
|
||||
pkg/**/*
|
||||
vendor/**/*
|
||||
.vendor/**/*
|
||||
spec/**/*
|
||||
)
|
||||
PuppetLint.configuration.ignore_paths = exclude_paths
|
||||
PuppetSyntax.exclude_paths = exclude_paths
|
||||
|
||||
desc 'Auto-correct puppet-lint offenses'
|
||||
task 'lint:auto_correct' do
|
||||
Rake::Task[:lint_fix].invoke
|
||||
end
|
||||
|
||||
desc 'Run acceptance tests'
|
||||
RSpec::Core::RakeTask.new(:acceptance) do |t|
|
||||
t.pattern = 'spec/acceptance'
|
||||
end
|
||||
|
||||
desc 'Run tests'
|
||||
task test: [:release_checks]
|
||||
|
||||
namespace :check do
|
||||
desc 'Check for trailing whitespace'
|
||||
task :trailing_whitespace do
|
||||
Dir.glob('**/*.md', File::FNM_DOTMATCH).sort.each do |filename|
|
||||
next if filename =~ %r{^((modules|acceptance|\.?vendor|spec/fixtures|pkg)/|REFERENCE.md)}
|
||||
File.foreach(filename).each_with_index do |line, index|
|
||||
if line =~ %r{\s\n$}
|
||||
puts "#{filename} has trailing whitespace on line #{index + 1}"
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Rake::Task[:release_checks].enhance ['check:trailing_whitespace']
|
||||
|
||||
desc "Run main 'test' task and report merged results to coveralls"
|
||||
task test_with_coveralls: [:test] do
|
||||
if Dir.exist?(File.expand_path('../lib', __FILE__))
|
||||
|
||||
Reference in New Issue
Block a user