From 31da0d42b1758c8307d2981e0233c03db2ad5cd3 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 10 Jun 2019 17:07:13 -0700 Subject: Use our standard rakefile Rescue failures and use chefstyle in the description. Signed-off-by: Tim Smith --- Rakefile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Rakefile b/Rakefile index 1baff27..199e0ce 100644 --- a/Rakefile +++ b/Rakefile @@ -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] -- cgit v1.2.1 From e26a76bcab94ec7716c932863bb972698d0e94af Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 10 Jun 2019 17:08:28 -0700 Subject: Add buildkite readme badge Signed-off-by: Tim Smith --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b186d48..e91295a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Mixlib::CLI - [![Gem Version](https://badge.fury.io/rb/mixlib-cli.svg)](https://badge.fury.io/rb/mixlib-cli) +[![Build Status](https://badge.buildkite.com/5b595abc5c79a69fa4da5aeb14efd8e9104ec3a4ca53fc904a.svg)](https://buildkite.com/chef-oss/chef-mixlib-cli-master-verify) +[![Gem Version](https://badge.fury.io/rb/mixlib-cli.svg)](https://badge.fury.io/rb/mixlib-cli) **Umbrella Project**: [Chef Foundation](https://github.com/chef/chef-oss-practices/blob/master/projects/chef-foundation.md) -- cgit v1.2.1