Rakefile in kitchen-linode-0.14.0 vs Rakefile in kitchen-linode-0.15.0

- old
+ new

@@ -1,21 +1,25 @@ require "bundler/gem_tasks" -require 'cane/rake_task' -require 'tailor/rake_task' +require "rspec/core/rake_task" -desc "Run cane to check quality metrics" -Cane::RakeTask.new do |cane| - cane.canefile = './.cane' +desc "Run all specs in spec directory" +RSpec::Core::RakeTask.new(:test) do |t| + t.pattern = "spec/**/*_spec.rb" end -Tailor::RakeTask.new - desc "Display LOC stats" task :stats do puts "\n## Production Code Stats" sh "countloc -r lib" end -desc "Run all quality tasks" -task :quality => [:cane, :tailor, :stats] +begin + require "chefstyle" + require "rubocop/rake_task" + RuboCop::RakeTask.new(:style) do |task| + task.options += ["--display-cop-names", "--no-color"] + end +rescue LoadError + puts "chefstyle is not available. (sudo) gem install chefstyle to do style checking." +end -task :default => [:quality] +task default: %i{test style}