1 require 'rspec/core/rake_task'
2 require 'rubocop/rake_task'
4 require 'stove/rake_task'
7 desc 'Run Ruby style checks'
8 RuboCop::RakeTask.new(:ruby) do |t|
10 '--auto-gen-config', # creates .rubocop_todo.yml
14 desc 'Run Chef style checks'
15 FoodCritic::Rake::LintTask.new(:chef) do |t|
22 desc 'Run all style checks'
23 task style: ['style:chef', 'style:ruby']
25 desc 'Run ChefSpec examples'
26 RSpec::Core::RakeTask.new(:spec)
28 desc 'Publish cookbook'
29 Stove::RakeTask.new(:publish) do |t|
31 # `--username` and `--key` are set in ~/.stove typically.
32 #'--username', 'somebody',
33 #'--key', '~/chef/chef.io.example.com/somebody.pem',
34 #'--endpoint', 'https://supermarket.io.example.com/api/v1', # default: supermarket.chef.io
37 '--log-level', 'info',
41 task default: ['style', 'spec']