Re-added custom ODL Yum repo but without relationship to ODL pkg
[integration/packaging/puppet-opendaylight.git] / Rakefile
1 require 'puppetlabs_spec_helper/rake_tasks'
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.relative = true
13 PuppetLint.configuration.send("disable_80chars")
14 PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}"
15 PuppetLint.configuration.fail_on_warnings = true
16
17 # Forsake support for Puppet 2.6.2 for the benefit of cleaner code.
18 # http://puppet-lint.com/checks/class_parameter_defaults/
19 PuppetLint.configuration.send('disable_class_parameter_defaults')
20 # http://puppet-lint.com/checks/class_inherits_from_params_class/
21 PuppetLint.configuration.send('disable_class_inherits_from_params_class')
22
23 exclude_paths = [
24   "bundle/**/*",
25   "pkg/**/*",
26   "vendor/**/*",
27   "spec/**/*",
28 ]
29 PuppetLint.configuration.ignore_paths = exclude_paths
30 PuppetSyntax.exclude_paths = exclude_paths
31
32 desc "Run acceptance tests"
33 RSpec::Core::RakeTask.new(:acceptance) do |t|
34   t.pattern = 'spec/acceptance'
35 end
36
37 task :metadata do
38   sh "metadata-json-lint metadata.json"
39 end
40
41 desc "Run syntax, lint, and spec tests."
42 task :test => [
43   :syntax,
44   :lint,
45   :spec,
46   :metadata,
47 ]