forked from chef/omnibus-software
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
42 lines (35 loc) · 924 Bytes
/
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
require "bundler/gem_tasks"
require "omnibus-software"
task :test do
OmnibusSoftware.verify!
end
task :fetch do
rake_fakeout
software_name = ARGV[1]
path = ARGV[2] || "."
puts "Downloading #{software_name} to #{path}"
OmnibusSoftware.fetch(software_name, path)
end
task :fetch_all do
rake_fakeout
path = ARGV[1] || "."
puts "Downloading all software to #{path}"
OmnibusSoftware.fetch_all(path)
end
def rake_fakeout
ARGV.each { |a| task a.to_sym {} } # rubocop: disable Lint/AmbiguousBlockAssociation
end
task :list do
OmnibusSoftware.list
end
begin
require "chefstyle"
require "rubocop/rake_task"
desc "Run Chefstyle tests"
RuboCop::RakeTask.new(:style) do |task|
task.options += ["--display-cop-names", "--no-color"]
end
rescue LoadError
puts "chefstyle gem is not installed. bundle install first to make sure all dependencies are installed."
end
task default: %w{style test}