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
|
require "bundler/gem_tasks"
require "rake/testtask"
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
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/test_ffi-libarchive.rb"]
end
desc "Run style & unit tests on Travis"
task travis: %w{style test}
# Default
desc "Run style, unit"
task default: %w{style test}
|