diff options
author | Tim Smith <tsmith@chef.io> | 2017-04-18 17:52:21 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2017-04-18 17:52:21 -0700 |
commit | a0676a677732d3c974efc64ba879ed6442dea8d6 (patch) | |
tree | aae42f0290f09d4d694904c86b417048853fc6d2 | |
parent | 0455024df6b737e959fc7c2129aafc8cf4fddc88 (diff) | |
download | mixlib-shellout-a0676a677732d3c974efc64ba879ed6442dea8d6.tar.gz |
Use our github_changelog_generator and update Travis config
Use the same config we’re using in the other mixlibs
Also fix a chefstyle warning
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | .rspec | 3 | ||||
-rw-r--r-- | .travis.yml | 27 | ||||
-rw-r--r-- | Gemfile | 4 | ||||
-rw-r--r-- | Rakefile | 12 | ||||
-rw-r--r-- | lib/mixlib/shellout/windows.rb | 20 |
5 files changed, 49 insertions, 17 deletions
@@ -1 +1,2 @@ --cf documentation +--format documentation +--color diff --git a/.travis.yml b/.travis.yml index 28638b9..4ecda54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,26 @@ +sudo: false language: ruby cache: bundler -sudo: false -rvm: - - 2.2.6 - - 2.3.3 - - 2.4.0 + +matrix: + include: + - rvm: 2.2.7 + - rvm: 2.3.4 + - rvm: 2.4.1 + - rvm: ruby-head + allow_failures: + - rvm: ruby-head branches: only: - - master + - master + +bundler_args: --without changelog + before_install: - - gem update bundler + - gem install bundler + - bundle --version - gem update --system + - gem --version -script: bundle exec rake +script: + - bundle exec rake @@ -13,3 +13,7 @@ group(:development) do gem "pry-stack_explorer" gem "rb-readline" end + +group(:changelog) do + gem "github_changelog_generator", git: "https://github.com/chef/github-changelog-generator" +end @@ -1,5 +1,6 @@ require "bundler" require "rspec/core/rake_task" +require "mixlib/shellout/version" Bundler::GemHelper.install_tasks name: "mixlib-shellout" @@ -13,4 +14,15 @@ RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = FileList["spec/**/*_spec.rb"] end +begin + require "github_changelog_generator/task" + + GitHubChangelogGenerator::RakeTask.new :changelog do |config| + config.issues = false + config.future_release = Mixlib::ShellOut::VERSION + end +rescue LoadError + puts "github_changelog_generator is not available. gem install github_changelog_generator to generate changelogs" +end + task default: [:spec, :style] diff --git a/lib/mixlib/shellout/windows.rb b/lib/mixlib/shellout/windows.rb index 5f6058d..bc95f43 100644 --- a/lib/mixlib/shellout/windows.rb +++ b/lib/mixlib/shellout/windows.rb @@ -337,16 +337,20 @@ module Mixlib def kill_process(instance, logger) child_pid = instance.wmi_ole_object.processid - logger.debug([ - "killing child process #{child_pid}::", - "#{instance.wmi_ole_object.Name} of parent #{pid}", - ].join) if logger + if logger + logger.debug([ + "killing child process #{child_pid}::", + "#{instance.wmi_ole_object.Name} of parent #{pid}", + ].join) + end Process.kill(:KILL, instance.wmi_ole_object.processid) rescue Errno::EIO, SystemCallError - logger.debug([ - "Failed to kill child process #{child_pid}::", - "#{instance.wmi_ole_object.Name} of parent #{pid}", - ].join) if logger + if logger + logger.debug([ + "Failed to kill child process #{child_pid}::", + "#{instance.wmi_ole_object.Name} of parent #{pid}", + ].join) + end end def format_process(process, app_name, command_line, timeout) |