diff options
author | Tim Smith <tsmith@chef.io> | 2018-12-02 21:26:53 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-12-06 14:45:59 -0800 |
commit | d04c2d85cd7355a91203efc2f5fc0f44af45dbd7 (patch) | |
tree | 807d734a5b1df47d223f3e5dcf8d991232a96042 /Rakefile | |
parent | 2c8f1dbcd6346c48c3598a7660bc68b2b60141f5 (diff) | |
download | mixlib-shellout-d04c2d85cd7355a91203efc2f5fc0f44af45dbd7.tar.gz |
Test on ruby-head and 2.6 in Travis
Also skip the tests when expeditor commits.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 36 |
1 files changed, 28 insertions, 8 deletions
@@ -3,14 +3,34 @@ require "rspec/core/rake_task" Bundler::GemHelper.install_tasks name: "mixlib-shellout" -require "chefstyle" -require "rubocop/rake_task" -desc "Run Ruby style checks" -RuboCop::RakeTask.new(:style) +task default: [:style, :spec] -desc "Run all specs in spec directory" -RSpec::Core::RakeTask.new(:spec) do |t| - t.pattern = FileList["spec/**/*_spec.rb"] +desc "Run specs" +RSpec::Core::RakeTask.new(:spec) do |spec| + spec.pattern = "spec/**/*_spec.rb" end -task default: [:spec, :style] +begin + require "chefstyle" + require "rubocop/rake_task" + 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." +end + +begin + require "yard" + YARD::Rake::YardocTask.new(:docs) +rescue LoadError + puts "yard is not available. bundle install first to make sure all dependencies are installed." +end + +task :console do + require "irb" + require "irb/completion" + require "mixlib/shellout" + ARGV.clear + IRB.start +end |