summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2016-09-29 14:31:07 -0700
committerThom May <thom@chef.io>2016-10-07 11:11:37 +0100
commitad54419ab0f194c1d89ee8f3065a7a1f053ce6f2 (patch)
treef3bd23447a39a37649868da8a69b29d4fda811d0
parent120b1247484e6553035097e2f7e7e935425e968c (diff)
downloadmixlib-shellout-ad54419ab0f194c1d89ee8f3065a7a1f053ce6f2.tar.gz
Add Chefstyle to Rake and Gemspec
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--Rakefile7
-rw-r--r--mixlib-shellout.gemspec1
2 files changed, 7 insertions, 1 deletions
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 = []