diff options
author | Jeremiah Snapp <jeremiah.snapp@gmail.com> | 2022-04-07 12:21:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 12:21:47 -0400 |
commit | cd14b7d85b87e68aaae03a763bed514730977a46 (patch) | |
tree | 7555b86b0bd484af026034eba2b44d3d3688654d | |
parent | ee14aa7be4196f837954dbebc461e373249ffbb5 (diff) | |
parent | 0650db3ee1d33df1c8cf80bf93a30cd623fb6800 (diff) | |
download | mixlib-authentication-cd14b7d85b87e68aaae03a763bed514730977a46.tar.gz |
Merge pull request #59 from chef/poorndm/IPACK-100-Test-Ruby-3.1
Remove Ruby 2.4 support & Test Ruby 3.1
-rw-r--r-- | .expeditor/run_windows_tests.ps1 | 16 | ||||
-rw-r--r-- | .expeditor/verify.pipeline.yml | 50 | ||||
-rw-r--r-- | .github/CODEOWNERS | 4 | ||||
-rw-r--r-- | lib/mixlib/authentication/signedheaderauth.rb | 2 | ||||
-rw-r--r-- | mixlib-authentication.gemspec | 2 |
5 files changed, 51 insertions, 23 deletions
diff --git a/.expeditor/run_windows_tests.ps1 b/.expeditor/run_windows_tests.ps1 new file mode 100644 index 0000000..c37728b --- /dev/null +++ b/.expeditor/run_windows_tests.ps1 @@ -0,0 +1,16 @@ +# 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 } diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 165dccc..416b41b 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -8,52 +8,64 @@ expeditor: steps: -- label: run-lint-and-specs-:ruby:-2.4 +- label: run-specs-:ruby:-2.5 command: - - .expeditor/run_linux_tests.sh rake + - .expeditor/run_linux_tests.sh rake spec expeditor: executor: docker: - image: ruby:2.4-buster + image: ruby:2.5 -- label: run-lint-and-specs-:ruby:-2.5 +- label: run-specs-:ruby:-2.6 command: - - .expeditor/run_linux_tests.sh rake + - .expeditor/run_linux_tests.sh rake spec expeditor: executor: docker: - image: ruby:2.5-buster + image: ruby:2.6 -- label: run-lint-and-specs-:ruby:-2.6 +- label: run-specs-:ruby:-2.7 command: - - .expeditor/run_linux_tests.sh rake + - .expeditor/run_linux_tests.sh rake spec expeditor: executor: docker: - image: ruby:2.6-buster + image: ruby:2.7 -- label: run-lint-and-specs-:ruby:-2.7 +- label: run-specs-:ruby:-3.0 command: - - .expeditor/run_linux_tests.sh rake + - .expeditor/run_linux_tests.sh rake spec expeditor: executor: docker: - image: ruby:2.7-buster + image: ruby:3.0 -- label: run-lint-and-specs-:ruby:-3.0 +- label: run-specs-:ruby:-3.1 command: - - .expeditor/run_linux_tests.sh rake + - .expeditor/run_linux_tests.sh rake spec expeditor: executor: docker: - image: ruby:3.0-buster + image: ruby:3.1 -- label: run-specs-windows +- label: run-specs-ruby-3.0-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 + shell: ["powershell", "-Command"] + image: rubydistros/windows-2019:3.0 + user: 'NT AUTHORITY\SYSTEM' + +- label: run-specs-ruby-3.1-windows + command: + - .expeditor/run_windows_tests.ps1 + expeditor: + executor: + docker: + host_os: windows + 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/lib/mixlib/authentication/signedheaderauth.rb b/lib/mixlib/authentication/signedheaderauth.rb index dc2adf3..cfd7bfe 100644 --- a/lib/mixlib/authentication/signedheaderauth.rb +++ b/lib/mixlib/authentication/signedheaderauth.rb @@ -196,7 +196,7 @@ module Mixlib # TODO: tim 2009-12-28: It'd be nice to just remove this special case, # always sign the entire request body, using the expanded multipart # body in the case of a file being include. - @hashed_body ||= if file&.respond_to?(:read) + @hashed_body ||= if file.respond_to?(:read) digester.hash_file(file, digest) else digester.hash_string(body, digest) diff --git a/mixlib-authentication.gemspec b/mixlib-authentication.gemspec index 2bcf30e..a9d4ddd 100644 --- a/mixlib-authentication.gemspec +++ b/mixlib-authentication.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |s| s.author = "Chef Software, Inc." s.email = "info@chef.io" s.homepage = "https://github.com/chef/mixlib-authentication" - s.required_ruby_version = ">= 2.4" + s.required_ruby_version = ">= 2.5" s.files = %w{LICENSE} + Dir.glob("lib/**/*") s.require_paths = ["lib"] |