From 424db5d0e621c1afa328d2db1f5e0f8525b51a3d Mon Sep 17 00:00:00 2001 From: John McCrae Date: Fri, 1 Sep 2023 08:13:12 -0700 Subject: [PATCH 1/6] refactoring networking issues Signed-off-by: John McCrae --- spec/unit/berkshelf/berkshelf/api_client/connection_spec.rb | 6 +++--- spec/unit/berkshelf/community_rest_spec.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/unit/berkshelf/berkshelf/api_client/connection_spec.rb b/spec/unit/berkshelf/berkshelf/api_client/connection_spec.rb index de4132998..7f79f7b26 100644 --- a/spec/unit/berkshelf/berkshelf/api_client/connection_spec.rb +++ b/spec/unit/berkshelf/berkshelf/api_client/connection_spec.rb @@ -130,17 +130,17 @@ end it "raises Berkshelf::APIClient::ServiceUnavailable for 500s" do - stub_request(:get, "http://supermarket.getchef.com/universe").to_return(status: [500, "Internal Server Error"]) + stub_request(:get, "http://supermarket.getchef.com/universe").to_return(status: 500, body: "Internal Server Error") expect { subject }.to raise_error(Berkshelf::APIClient::ServiceUnavailable) end it "raises Berkshelf::APIClient::ServiceNotFound for 404s" do - stub_request(:get, "http://supermarket.getchef.com/universe").to_return(status: [404, "Not Found"]) + stub_request(:get, "http://supermarket.getchef.com/universe").to_return(status: 404, body: "Not Found") expect { subject }.to raise_error(Berkshelf::APIClient::ServiceNotFound) end it "raises Net::HTTPBadRequest for 400s" do - stub_request(:get, "http://supermarket.getchef.com/universe").to_return(status: [400, "Bad Request"]) + stub_request(:get, "http://supermarket.getchef.com/universe").to_return(status: 400, body: "Bad Request") expect { subject }.to raise_error(Berkshelf::APIClient::BadResponse) end diff --git a/spec/unit/berkshelf/community_rest_spec.rb b/spec/unit/berkshelf/community_rest_spec.rb index 9c8d438b6..ced7aa90a 100644 --- a/spec/unit/berkshelf/community_rest_spec.rb +++ b/spec/unit/berkshelf/community_rest_spec.rb @@ -107,7 +107,7 @@ it "raises a CookbookNotFound error on a 404 response for a non-existent cookbook" do stub_request(:get, "#{api_uri}/cookbooks/not_real/versions/1_0_0").to_return( status: 404, - body: nil + body: "Not Found" ) expect do @@ -142,7 +142,7 @@ it "raises a CookbookNotFound error on a 404 response" do stub_request(:get, "#{api_uri}/cookbooks/not_real").to_return( status: 404, - body: nil + body: "Not Found" ) expect do @@ -177,7 +177,7 @@ it "raises a CookbookNotFound error on a 404 response" do stub_request(:get, "#{api_uri}/cookbooks/not_real").to_return( status: 404, - body: nil + body: "Not Found" ) expect do From 514f9cbd6cfc7c5177a344c166d169448151ff20 Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Wed, 6 Sep 2023 13:10:43 +0000 Subject: [PATCH 2/6] Bump version to 8.0.8 by Chef Expeditor Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 12 ++++++++++-- VERSION | 2 +- lib/berkshelf/version.rb | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09e77e6e4..eb0a6cab4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,15 @@ - + +## [v8.0.8](https://github.com/chef/berkshelf/tree/v8.0.8) (2023-09-06) + +#### Merged Pull Requests +- refactoring networking issues [#21](https://github.com/chef/berkshelf/pull/21) ([johnmccrae](https://github.com/johnmccrae)) - + +### Changes not yet released to rubygems.org + +#### Merged Pull Requests +- refactoring networking issues [#21](https://github.com/chef/berkshelf/pull/21) ([johnmccrae](https://github.com/johnmccrae)) diff --git a/VERSION b/VERSION index 3766c29db..33681f42c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.7 \ No newline at end of file +8.0.8 \ No newline at end of file diff --git a/lib/berkshelf/version.rb b/lib/berkshelf/version.rb index 98f7319c8..f133e5f93 100644 --- a/lib/berkshelf/version.rb +++ b/lib/berkshelf/version.rb @@ -1,3 +1,3 @@ module Berkshelf - VERSION = "8.0.7".freeze + VERSION = "8.0.8".freeze end From 123b1e56552e7d3044deea976de5e2fc5c7c3eef Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Wed, 27 Sep 2023 11:53:53 +0530 Subject: [PATCH 3/6] tweaked the error handler to be a regex match versus a strict text match. Signed-off-by: nikhil2611 --- lib/berkshelf/ssl_policies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/berkshelf/ssl_policies.rb b/lib/berkshelf/ssl_policies.rb index 3a691a14d..ea7888094 100644 --- a/lib/berkshelf/ssl_policies.rb +++ b/lib/berkshelf/ssl_policies.rb @@ -16,7 +16,7 @@ def initialize def add_trusted_cert(cert) @store.add_cert(cert) rescue OpenSSL::X509::StoreError => e - raise e unless e.message == "cert already in hash table" + raise e unless e.message.match(/cert already in hash table/) end def trusted_certs_dir From 2c70d98f3b79d3c86aac3068571c76807461a92b Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Wed, 27 Sep 2023 10:30:43 +0000 Subject: [PATCH 4/6] Bump version to 8.0.9 by Chef Expeditor Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 7 ++++--- VERSION | 2 +- lib/berkshelf/version.rb | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb0a6cab4..133c529b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,15 @@ - -## [v8.0.8](https://github.com/chef/berkshelf/tree/v8.0.8) (2023-09-06) + +## [v8.0.9](https://github.com/chef/berkshelf/tree/v8.0.9) (2023-09-27) #### Merged Pull Requests -- refactoring networking issues [#21](https://github.com/chef/berkshelf/pull/21) ([johnmccrae](https://github.com/johnmccrae)) +- This resolves an issue where "berks install" fails due to a cert is already being in the hash table. [#23](https://github.com/chef/berkshelf/pull/23) ([nikhil2611](https://github.com/nikhil2611)) ### Changes not yet released to rubygems.org #### Merged Pull Requests +- This resolves an issue where "berks install" fails due to a cert is already being in the hash table. [#23](https://github.com/chef/berkshelf/pull/23) ([nikhil2611](https://github.com/nikhil2611)) - refactoring networking issues [#21](https://github.com/chef/berkshelf/pull/21) ([johnmccrae](https://github.com/johnmccrae)) diff --git a/VERSION b/VERSION index 33681f42c..7c6e60d85 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.8 \ No newline at end of file +8.0.9 \ No newline at end of file diff --git a/lib/berkshelf/version.rb b/lib/berkshelf/version.rb index f133e5f93..2234b9bae 100644 --- a/lib/berkshelf/version.rb +++ b/lib/berkshelf/version.rb @@ -1,3 +1,3 @@ module Berkshelf - VERSION = "8.0.8".freeze + VERSION = "8.0.9".freeze end From 4d34215e841f7c75b7e1583a0ae1835f3ac0ec61 Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Thu, 28 Sep 2023 18:29:02 +0000 Subject: [PATCH 5/6] Update CHANGELOG.md to reflect the promotion of 8.0.9 Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 133c529b0..225ed3189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,26 +1,23 @@ - -## [v8.0.9](https://github.com/chef/berkshelf/tree/v8.0.9) (2023-09-27) - -#### Merged Pull Requests -- This resolves an issue where "berks install" fails due to a cert is already being in the hash table. [#23](https://github.com/chef/berkshelf/pull/23) ([nikhil2611](https://github.com/nikhil2611)) + - -### Changes not yet released to rubygems.org - -#### Merged Pull Requests -- This resolves an issue where "berks install" fails due to a cert is already being in the hash table. [#23](https://github.com/chef/berkshelf/pull/23) ([nikhil2611](https://github.com/nikhil2611)) -- refactoring networking issues [#21](https://github.com/chef/berkshelf/pull/21) ([johnmccrae](https://github.com/johnmccrae)) + +## [v8.0.9](https://github.com/chef/berkshelf/tree/v8.0.9) (2023-09-28) + +#### Merged Pull Requests +- refactoring networking issues [#21](https://github.com/chef/berkshelf/pull/21) ([johnmccrae](https://github.com/johnmccrae)) +- This resolves an issue where "berks install" fails due to a cert is already being in the hash table. [#23](https://github.com/chef/berkshelf/pull/23) ([nikhil2611](https://github.com/nikhil2611)) + + ## [v8.0.7](https://github.com/chef/berkshelf/tree/v8.0.7) (2023-06-12) #### Merged Pull Requests - Added the SonarQube configuration [#16](https://github.com/chef/berkshelf/pull/16) ([nikhil2611](https://github.com/nikhil2611)) - Refactoring the gemspec for chef-17 support [#17](https://github.com/chef/berkshelf/pull/17) ([johnmccrae](https://github.com/johnmccrae)) - Fix cookbook dependency version validation against chef's required format to berks upload [#18](https://github.com/chef/berkshelf/pull/18) ([nikhil2611](https://github.com/nikhil2611)) - ## [v8.0.5](https://github.com/chef/berkshelf/tree/v8.0.5) (2022-10-27) From e1ff9ba9b61d7ea658162874a1c954d4b844ece3 Mon Sep 17 00:00:00 2001 From: John McCrae Date: Fri, 9 Aug 2024 19:27:28 +0000 Subject: [PATCH 6/6] Updating dependencies and minitar version Signed-off-by: John McCrae --- berkshelf.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/berkshelf.gemspec b/berkshelf.gemspec index 8857f4f77..d9e451929 100644 --- a/berkshelf.gemspec +++ b/berkshelf.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |s| s.add_dependency "mixlib-shellout", ">= 2.0", "< 4.0" s.add_dependency "cleanroom", "~> 1.0" - s.add_dependency "minitar", ">= 0.6" + s.add_dependency "minitar", ">= 0.6", "< 0.12" s.add_dependency "retryable", ">= 2.0", "< 4.0" s.add_dependency "solve", "~> 4.0" s.add_dependency "thor", ">= 0.20" @@ -43,7 +43,7 @@ Gem::Specification.new do |s| s.add_dependency "mixlib-archive", ">= 1.1.4", "< 2.0" # needed for ruby 3.0 / Dir.chdir removal s.add_dependency "concurrent-ruby", "~> 1.0" if RUBY_VERSION.match?(/3.0/) - s.add_dependency "chef", "~> 17.0" # needed for --skip-syntax-check + s.add_dependency "chef", "~> 17.10.122" # needed for --skip-syntax-check elsif s.add_dependency "chef", ">= 15.7.32" end