-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRakefile
52 lines (45 loc) · 1.62 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
require "rake"
require "rspec"
require "rspec/core"
require "rspec/core/rake_task"
require "chefstyle"
require "rubocop/rake_task"
desc "Default task to run spec suite"
task default: %w{spec rubocop}
desc "Run chef-marketplace-ctl spec suite"
RSpec::Core::RakeTask.new(:ctl_spec) do |task|
task.rspec_opts =
["-I files/chef-marketplace-ctl-commands/",
"-I files/chef-marketplace-ctl-commands/spec",
"-I /opt/chef-marketplace/embedded/service/chef-marketplace-ctl/",
"-I /opt/chef-marketplace/embedded/service/chef-marketplace-ctl/spec",
"--format documentation",
"--color"
]
task.pattern = FileList[
"{files/chef-marketplace-ctl-commands,/opt/chef-marketplace/embedded/service/chef-marketplace-ctl}/spec/**{,/*/**}/*_spec.rb"
]
end
desc "Run chef-marketplace-gem spec suite"
RSpec::Core::RakeTask.new(:gem_spec) do |task|
task.rspec_opts =
["-I files/chef-marketplace-gem/lib/",
"-I files/chef-marketplace-gem/lib/marketplace",
"-I files/chef-marketplace-gem/spec",
"-I files/chef-marketplace-gem/spec/marketplace",
"-I /opt/chef-marketplace/embedded/service/chef-marketplace-gem/spec",
"-I /opt/chef-marketplace/embedded/service/chef-marketplace-gem/spec/marketplace",
"--format documentation",
"--color"
]
task.pattern = FileList[
"{files/chef-marketplace-gem,/opt/chef-marketplace/embedded/service/chef-marketplace-gem}/spec/**{,/*/**}/*_spec.rb"
]
end
desc "Run all rspec suites"
task spec: %w{ctl_spec gem_spec}
desc "Run Rubocop style checks"
RuboCop::RakeTask.new do |task|
task.fail_on_error = true
task.options << "--display-cop-names"
end