-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathRakefile
73 lines (59 loc) · 1.52 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env rake
require 'rake'
require 'rspec/core/rake_task'
task :default => 'test:quick'
namespace :test do
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = Dir.glob('test/spec/**/*_spec.rb')
t.rspec_opts = "--color -f d"
end
begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new
rescue
puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
end
begin
require 'foodcritic/rake_task'
require 'foodcritic'
task :default => [:foodcritic]
FoodCritic::Rake::LintTask.new do |t|
t.options = {
fail_tags: %w/correctness services libraries deprecated/,
exclude_paths: ['test/**/*', 'spec/**/*', 'features/**/*', 'example/**/*']
}
end
rescue LoadError
warn "Foodcritic Is missing ZOMG"
end
begin
require 'rubocop/rake_task'
Rubocop::RakeTask.new do |task|
task.fail_on_error = true
task.options = %w{-D -a}
end
rescue LoadError
warn "Rubocop gem not installed, now the code will look like crap!"
end
desc 'Run all of the quick tests.'
task :quick do
Rake::Task['test:rubocop'].invoke
Rake::Task['test:foodcritic'].invoke
Rake::Task['test:spec'].invoke
end
desc 'Run _all_ the tests. Go get a coffee.'
task :complete do
Rake::Task['test:quick'].invoke
Rake::Task['test:kitchen:all'].invoke
end
desc 'Run CI tests'
task :ci do
Rake::Task['test:complete'].invoke
end
end
namespace :release do
task :update_metadata do
end
task :tag_release do
end
end