OSDN Git Service

Initial release of minio-grid
[metasearch/grid-chef-repo.git] / cookbooks / minio-grid / Rakefile
1 require 'rspec/core/rake_task'
2 require 'rubocop/rake_task'
3 require 'foodcritic'
4 require 'stove/rake_task'
5
6 namespace :style do
7   desc 'Run Ruby style checks'
8   RuboCop::RakeTask.new(:ruby) do |t|
9     t.options = [
10       '--auto-gen-config',  # creates .rubocop_todo.yml
11     ]
12   end
13
14   desc 'Run Chef style checks'
15   FoodCritic::Rake::LintTask.new(:chef) do |t|
16     t.options = {
17       fail_tags: ['any'],
18     }
19   end
20 end
21
22 desc 'Run all style checks'
23 task style: ['style:chef', 'style:ruby']
24
25 desc 'Run ChefSpec examples'
26 RSpec::Core::RakeTask.new(:spec)
27
28 desc 'Publish cookbook'
29 Stove::RakeTask.new(:publish) do |t|
30   t.stove_opts = [
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
35     #'--no-ssl-verify',
36     '--no-git',
37     '--log-level', 'info',
38   ]
39 end
40
41 task default: ['style', 'spec']