summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-12-06 14:52:53 -0800
committerGitHub <noreply@github.com>2018-12-06 14:52:53 -0800
commit497eea0f857d6f32e6f97c94c342d297235f0613 (patch)
tree74ae66813e667f73143fd3a06e5125b5f3e06081
parent616c56d734d4bcaefd3665ef57f1ce02824c8c52 (diff)
parentd04c2d85cd7355a91203efc2f5fc0f44af45dbd7 (diff)
downloadmixlib-shellout-497eea0f857d6f32e6f97c94c342d297235f0613.tar.gz
Merge pull request #170 from chef/appveyor
Test on ruby-head and Ruby 2.6 in Travis
-rw-r--r--.travis.yml21
-rw-r--r--Rakefile36
-rw-r--r--appveyor.yml10
-rw-r--r--mixlib-shellout.gemspec2
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
diff --git a/Rakefile b/Rakefile
index 06a7620..dd326ab 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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