diff options
author | Tim Smith <tsmith@chef.io> | 2019-06-06 21:36:55 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2019-07-22 11:33:03 -0700 |
commit | 1e96ffdd156422a02b3ddd7a5fd06316d5e35cf4 (patch) | |
tree | ac290a3223303a7b6170f24edac3274b6344e821 | |
parent | 46bd1446cd7d75e12e410a00c028aa8c2787cca3 (diff) | |
download | mixlib-authentication-1e96ffdd156422a02b3ddd7a5fd06316d5e35cf4.tar.gz |
Use the standard rakefile
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | Rakefile | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -1,23 +1,26 @@ require "bundler/gem_tasks" -require "rspec/core/rake_task" -task default: [:style, :spec] - -Bundler::GemHelper.install_tasks - -desc "Run specs" -RSpec::Core::RakeTask.new(:spec) do |spec| - spec.pattern = "spec/**/*_spec.rb" +begin + require "rspec/core/rake_task" + RSpec::Core::RakeTask.new do |t| + t.pattern = "spec/**/*_spec.rb" + end +rescue LoadError + desc "rspec is not installed, this task is disabled" + task :spec do + abort "rspec is not installed. bundle install first to make sure all dependencies are installed." + end 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/rubocop is not available. bundle install first to make sure all dependencies are installed." + puts "chefstyle gem is not installed. bundle install first to make sure all dependencies are installed." end begin @@ -34,3 +37,5 @@ task :console do ARGV.clear IRB.start end + +task default: [:spec, :style] |