diff options
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 38 |
1 files changed, 29 insertions, 9 deletions
@@ -1,16 +1,36 @@ -require "bundler" +require "bundler/gem_tasks" require "rspec/core/rake_task" +task default: [:style, :spec] + Bundler::GemHelper.install_tasks name: "mixlib-shellout" -require "chefstyle" -require "rubocop/rake_task" -desc "Run Ruby style checks" -RuboCop::RakeTask.new(:style) +desc "Run specs" +RSpec::Core::RakeTask.new(:spec) do |spec| + spec.pattern = "spec/**/*_spec.rb" +end -desc "Run all specs in spec directory" -RSpec::Core::RakeTask.new(:spec) do |t| - t.pattern = FileList["spec/**/*_spec.rb"] +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/rubocop is not available. bundle install first to make sure all dependencies are installed." end -task default: [:spec, :style] +begin + require "yard" + YARD::Rake::YardocTask.new(:docs) +rescue LoadError + puts "yard is not available. bundle install first to make sure all dependencies are installed." +end + +task :console do + require "irb" + require "irb/completion" + require "mixlib/shellout" + ARGV.clear + IRB.start +end |