Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
23 changes: 14 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -34,3 +37,5 @@ task :console do
ARGV.clear
IRB.start
end

task default: [:spec, :style]