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 | |
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>
-rw-r--r-- | .travis.yml | 21 | ||||
-rw-r--r-- | Rakefile | 36 | ||||
-rw-r--r-- | appveyor.yml | 10 | ||||
-rw-r--r-- | mixlib-shellout.gemspec | 2 |
4 files changed, 54 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml index 7b32643..eea4794 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,23 @@ +sudo: false language: ruby cache: bundler -sudo: false -rvm: - - 2.2.10 - - 2.3.7 - - 2.4.4 - - 2.5.3 +distro: xenial + +matrix: + include: + - rvm: 2.2.10 + - rvm: 2.3.8 + - rvm: 2.4.5 + - rvm: 2.5.3 + - rvm: 2.6 + - rvm: ruby-head + allow_failures: + - rvm: ruby-head + branches: only: - master + before_install: - gem update bundler - gem update --system @@ -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 diff --git a/appveyor.yml b/appveyor.yml index 2276bde..20d082a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,16 @@ branches: only: - master +skip_commits: + # version bumps by Expeditor happen as a separate commit after the merge, we can skip + author: Chef Expeditor + # if ONLY the files listed below are changed in a commit, skip + files: + - MAINTAINERS.md + - MAINTAINERS.toml + - CHANGELOG.md + - RELEASE_NOTES.md + install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - echo %PATH% diff --git a/mixlib-shellout.gemspec b/mixlib-shellout.gemspec index 0145759..84ae88e 100644 --- a/mixlib-shellout.gemspec +++ b/mixlib-shellout.gemspec @@ -18,6 +18,6 @@ Gem::Specification.new do |s| s.add_development_dependency "chefstyle" s.require_path = "lib" - s.files = %w{LICENSE README.md} + + s.files = %w{LICENSE} + Dir.glob("lib/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } end |