From ad54419ab0f194c1d89ee8f3065a7a1f053ce6f2 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 29 Sep 2016 14:31:07 -0700 Subject: Add Chefstyle to Rake and Gemspec Signed-off-by: Tim Smith --- Rakefile | 7 ++++++- mixlib-shellout.gemspec | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index e4c694e..bb393d6 100644 --- a/Rakefile +++ b/Rakefile @@ -3,9 +3,14 @@ require 'rspec/core/rake_task' Bundler::GemHelper.install_tasks +require "chefstyle" +require "rubocop/rake_task" +desc "Run Ruby style checks" +RuboCop::RakeTask.new(:style) + desc "Run all specs in spec directory" RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = FileList['spec/**/*_spec.rb'] end -task default: :spec +task default: [:style, :spec] diff --git a/mixlib-shellout.gemspec b/mixlib-shellout.gemspec index bebb3f5..5fe614a 100644 --- a/mixlib-shellout.gemspec +++ b/mixlib-shellout.gemspec @@ -15,6 +15,7 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 2.2" s.add_development_dependency "rspec", "~> 3.0" + s.add_development_dependency "chefstyle", "= 0.4.0" s.bindir = "bin" s.executables = [] -- cgit v1.2.1