summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-04-04 15:43:31 -0700
committerGitHub <noreply@github.com>2022-04-04 15:43:31 -0700
commit28cf72ff166582eb1994bd69e2ada102786db822 (patch)
tree79f1c29e6ca12ca64ff59ed0e6aa0c14e1c0e006
parent7c2afb88a4fb34b5515bb1881f335b945b8b0f04 (diff)
parentd72c9fadc054d4b790eb16eb4f0c4c50b37e9ae2 (diff)
downloadmixlib-shellout-28cf72ff166582eb1994bd69e2ada102786db822.tar.gz
Merge pull request #235 from chef/jfm/Ruby3.1testing
-rw-r--r--.expeditor/config.yml1
-rw-r--r--.expeditor/run_windows_tests.ps117
-rw-r--r--.expeditor/verify.pipeline.yml30
-rw-r--r--.github/CODEOWNERS4
-rw-r--r--CHANGELOG.md12
-rw-r--r--Gemfile4
-rw-r--r--mixlib-shellout-universal-mingw-ucrt.gemspec8
-rw-r--r--mixlib-shellout.gemspec2
-rw-r--r--spec/mixlib/shellout_spec.rb2
9 files changed, 59 insertions, 21 deletions
diff --git a/.expeditor/config.yml b/.expeditor/config.yml
index f550cf8..5a4cd54 100644
--- a/.expeditor/config.yml
+++ b/.expeditor/config.yml
@@ -9,6 +9,7 @@ slack:
rubygems:
- mixlib-shellout
- mixlib-shellout-universal-mingw32
+ - mixlib-shellout-universal-mingw-ucrt
github:
# This deletes the GitHub PR branch after successfully merged into the release branch
diff --git a/.expeditor/run_windows_tests.ps1 b/.expeditor/run_windows_tests.ps1
new file mode 100644
index 0000000..f048b32
--- /dev/null
+++ b/.expeditor/run_windows_tests.ps1
@@ -0,0 +1,17 @@
+# Stop script execution when a non-terminating error occurs
+$ErrorActionPreference = "Stop"
+
+# This will run ruby test on windows platform
+
+Write-Output "--- Bundle install"
+
+bundle config --local path vendor/bundle
+If ($lastexitcode -ne 0) { Exit $lastexitcode }
+
+bundle install --jobs=7 --retry=3
+If ($lastexitcode -ne 0) { Exit $lastexitcode }
+
+Write-Output "--- Bundle Execute"
+
+bundle exec rake
+If ($lastexitcode -ne 0) { Exit $lastexitcode } \ No newline at end of file
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index 6535e4f..dd202d3 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -11,53 +11,53 @@ expeditor:
steps:
-- label: run-lint-and-specs-ruby-2.4
+- label: run-lint-and-specs-ruby-2.5
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
- image: ruby:2.4-buster
+ image: ruby:2.5
-- label: run-lint-and-specs-ruby-2.5
+- label: run-lint-and-specs-ruby-2.6
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
- image: ruby:2.5-buster
+ image: ruby:2.6
-- label: run-lint-and-specs-ruby-2.6
+- label: run-lint-and-specs-ruby-2.7
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
- image: ruby:2.6-buster
+ image: ruby:2.7
-- label: run-lint-and-specs-ruby-2.7
+- label: run-lint-and-specs-ruby-3.0
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
- image: ruby:2.7-buster
+ image: ruby:3.0
-- label: run-lint-and-specs-ruby-3.0
+- label: run-lint-and-specs-ruby-3.1
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
- image: ruby:3.0-buster
+ image: ruby:3.1
-- label: run-specs-windows
+- label: run-specs-ruby-3.1-windows
command:
- - bundle config --local path vendor/bundle
- - bundle install --jobs=7 --retry=3
- - bundle exec rake
+ - .expeditor/run_windows_tests.ps1
expeditor:
executor:
docker:
host_os: windows
- user: 'NT AUTHORITY\SYSTEM'
+ shell: ["powershell", "-Command"]
+ image: rubydistros/windows-2019:3.1
+ user: "NT AUTHORITY\\SYSTEM"
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 950afb7..36212ce 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,5 +1,5 @@
# Order is important. The last matching pattern has the most precedence.
-* @chef/chef-foundation-owners @chef/chef-foundation-approvers @chef/chef-foundation-reviewers
-.expeditor/ @chef/jex-team
+* @chef/chef-infra-reviewers @chef/chef-infra-approvers @chef/chef-infra-owners
+.expeditor/ @chef/infra-packages
*.md @chef/docs-team
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cb3f19c..306b7d9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,16 @@
# mixlib-shellout Changelog
+<!-- latest_release 3.2.6 -->
+## [v3.2.6](https://github.com/chef/mixlib-shellout/tree/v3.2.6) (2022-03-29)
+
+#### Merged Pull Requests
+- Loosen platform regex to allow 64 or 32 bit mingw [#234](https://github.com/chef/mixlib-shellout/pull/234) ([clintoncwolfe](https://github.com/clintoncwolfe))
<!-- latest_release -->
-<!-- latest_release -->
-<!-- release_rollup -->
+<!-- release_rollup since=3.2.5 -->
+### Changes not yet released to rubygems.org
+
+#### Merged Pull Requests
+- Loosen platform regex to allow 64 or 32 bit mingw [#234](https://github.com/chef/mixlib-shellout/pull/234) ([clintoncwolfe](https://github.com/clintoncwolfe)) <!-- 3.2.6 -->
<!-- release_rollup -->
<!-- latest_stable_release -->
## [v3.2.6](https://github.com/chef/mixlib-shellout/tree/v3.2.6) (2022-03-31)
diff --git a/Gemfile b/Gemfile
index d5dd10a..c1641f7 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,6 +2,10 @@ source "https://rubygems.org"
gemspec name: "mixlib-shellout"
+gem "win32-process", "~> 0.9"
+gem "ffi-win32-extensions", "~> 1.0.4"
+gem "wmi-lite", "~> 1.0.7"
+
group :test do
gem "chefstyle", "1.6.2"
gem "rake"
diff --git a/mixlib-shellout-universal-mingw-ucrt.gemspec b/mixlib-shellout-universal-mingw-ucrt.gemspec
new file mode 100644
index 0000000..f32b6cb
--- /dev/null
+++ b/mixlib-shellout-universal-mingw-ucrt.gemspec
@@ -0,0 +1,8 @@
+gemspec = instance_eval(File.read(File.expand_path("mixlib-shellout.gemspec", __dir__)))
+
+gemspec.platform = Gem::Platform.new(%w{x64-mingw-ucrt})
+gemspec.add_dependency "win32-process", "~> 0.9"
+gemspec.add_dependency "wmi-lite", "~> 1.0"
+gemspec.add_dependency "ffi-win32-extensions", "~> 1.0.3"
+
+gemspec
diff --git a/mixlib-shellout.gemspec b/mixlib-shellout.gemspec
index d05ecf1..f3fa91a 100644
--- a/mixlib-shellout.gemspec
+++ b/mixlib-shellout.gemspec
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.homepage = "https://github.com/chef/mixlib-shellout"
s.license = "Apache-2.0"
- s.required_ruby_version = ">= 2.4"
+ s.required_ruby_version = ">= 2.5"
s.add_dependency "chef-utils"
s.require_path = "lib"
diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb
index dce47dd..f2a4ab4 100644
--- a/spec/mixlib/shellout_spec.rb
+++ b/spec/mixlib/shellout_spec.rb
@@ -1167,7 +1167,7 @@ describe Mixlib::ShellOut do
context "and child processes should be killed" do
it "kills the child processes" do
expect(shell_cmd).to receive(:kill_process) do |instance|
- expect(instance.wmi_ole_object.Name).to match(/powershell/)
+ expect(instance.wmi_ole_object.Name).to match(/powershell.exe/)
Process.kill(:KILL, instance.wmi_ole_object.processid)
end
expect { executed_cmd }.to raise_error(Mixlib::ShellOut::CommandTimeout)