diff options
author | Marc A. Paradise <marc.paradise@gmail.com> | 2021-03-09 16:55:10 -0500 |
---|---|---|
committer | Marc A. Paradise <marc.paradise@gmail.com> | 2021-03-10 12:57:09 -0500 |
commit | 5a0d43f4fedd328fd1be377723f63aff7f5ce118 (patch) | |
tree | fc28980ff277ecbb5c1374f8800a4b4a21db0660 | |
parent | 83965fa6eadfe1cf6a693ae36cccc883eaf90a43 (diff) | |
download | chef-5a0d43f4fedd328fd1be377723f63aff7f5ce118.tar.gz |
Add missing rakefile back in
Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
-rw-r--r-- | knife/Rakefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/knife/Rakefile b/knife/Rakefile new file mode 100644 index 0000000000..d016d5f4e0 --- /dev/null +++ b/knife/Rakefile @@ -0,0 +1,34 @@ +# frozen_string_literal: true +require "bundler/gem_tasks" + +Bundler::GemHelper.install_tasks + + +begin + require "rspec/core/rake_task" + namespace :spec do + %i{unit functional integration stress}.each do |sub| + desc "Run the specs under spec/#{sub}" + RSpec::Core::RakeTask.new(sub) do |t| + t.verbose = false + t.rspec_opts = %w{--profile} + t.pattern = FileList["spec/#{sub}/**/*_spec.rb"] + end + end + end +rescue LoadError + puts "rspec not available. bundle install first to make sure all dependencies are installed." +end + +begin + require "chefstyle" + require "rubocop/rake_task" + + RuboCop::RakeTask.new(:style) do |task| + task.options += ["-r", "chefstyle", "--display-cop-names", "--no-color"] + end +rescue LoadError + puts "chefstyle/rubocop is not available. bundle install first to make sure all dependencies are installed." +end + + |