Skip to content
This repository was archived by the owner on May 15, 2019. It is now read-only.

Commit 708dd78

Browse files
committed
Update rakefile with default tasks
1 parent 87df626 commit 708dd78

1 file changed

Lines changed: 37 additions & 3 deletions

File tree

Rakefile

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
1-
require 'rubygems'
21
require 'puppetlabs_spec_helper/rake_tasks'
3-
require 'puppet-lint'
4-
PuppetLint.configuration.send("disable_80chars")
2+
require 'puppet-lint/tasks/puppet-lint'
3+
require 'puppet-syntax/tasks/puppet-syntax'
4+
5+
# These two gems aren't always present, for instance
6+
# on Travis with --without development
7+
begin
8+
require 'puppet_blacksmith/rake_tasks'
9+
rescue LoadError
10+
end
11+
12+
PuppetLint.configuration.fail_on_warnings
13+
PuppetLint.configuration.send('relative')
14+
PuppetLint.configuration.send('disable_80chars')
15+
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
516
PuppetLint.configuration.send('disable_class_parameter_defaults')
17+
PuppetLint.configuration.send('disable_documentation')
18+
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
19+
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
20+
21+
exclude_paths = [
22+
"pkg/**/*",
23+
"vendor/**/*",
24+
"spec/**/*",
25+
]
26+
PuppetLint.configuration.ignore_paths = exclude_paths
27+
PuppetSyntax.exclude_paths = exclude_paths
28+
29+
desc "Run acceptance tests"
30+
RSpec::Core::RakeTask.new(:acceptance) do |t|
31+
t.pattern = 'spec/acceptance'
32+
end
33+
34+
desc "Run syntax, lint, and spec tests."
35+
task :test => [
36+
:syntax,
37+
:lint,
38+
:spec,
39+
]

0 commit comments

Comments
 (0)