forked from DataDog/chef-datadog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
executable file
·46 lines (40 loc) · 1.18 KB
/
Rakefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env rake
require 'foodcritic'
require 'rspec/core/rake_task'
require 'tailor/rake_task'
task :default => [
:tailor,
:foodcritic,
:spec
]
Tailor::RakeTask.new do |task|
task.file_set('attributes/**/*.rb', "attributes") do |style|
style.max_line_length 160, :level => :warn
end
task.file_set('definitions/**/*.rb', "definitions")
task.file_set('libraries/**/*.rb', "libraries")
task.file_set('metadata.rb', "metadata") do |style|
style.max_line_length 160, :level => :warn
end
task.file_set('providers/**/*.rb', "providers")
task.file_set('recipes/**/*.rb', "recipes") do |style|
style.max_line_length 160, :level => :warn
end
task.file_set('resources/**/*.rb', "resources")
task.file_set('spec/**/*.rb', "tests") do |style|
style.max_line_length 160, :level => :warn
end
end
FoodCritic::Rake::LintTask.new do |t|
t.options = { :fail_tags => ['correctness'] }
t.options = { :chef_version => '0.10.8' }
end
# Rspec and ChefSpec
desc "Run ChefSpec examples"
RSpec::Core::RakeTask.new(:spec)
begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new
rescue LoadError
puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
end