chef-cli 5.6.21 → 5.6.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +4 -1
- data/lib/chef-cli/chef_server_api_multi.rb +4 -1
- data/lib/chef-cli/version.rb +1 -1
- data/spec/unit/chef_server_api_multi_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0484f407c36de3f4a1f395826238d937aa802d26f188fc6b2a981e53eeee206f'
|
|
4
|
+
data.tar.gz: d86fe03440295c206011d2f7d7232341fe99a3d0c7786027bff6920542477c18
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97dd2adb6a8f5faa636b72e60d672017b0bc4fa35e1d18290127c7dc1c003db073ed43234320c6d8c8d16f9656d1dfdc0397e1d765a43c320afd845a91e3af53
|
|
7
|
+
data.tar.gz: 52ed991df1bf48b581702d400e605a1a77e1a63e6b6a6c905facf73a6373a9d4819fd67a68f0ca8c2fa325203a156c2018396f6cc5cb83fa97c6e4887351c96a
|
data/Gemfile
CHANGED
|
@@ -4,6 +4,9 @@ gemspec
|
|
|
4
4
|
|
|
5
5
|
gem "logger", "< 1.6" # 1.6 causes errors with mixlib-log < 3.1.1
|
|
6
6
|
|
|
7
|
+
# Pin psych < 5.2 to avoid build issues on Windows Ruby 3.3 where libyaml headers are unavailable
|
|
8
|
+
gem "psych", "< 5.2" if RUBY_PLATFORM.match?(/mingw|mswin/) && RUBY_VERSION.start_with?("3.3")
|
|
9
|
+
|
|
7
10
|
group :test do
|
|
8
11
|
gem "rake"
|
|
9
12
|
gem "rspec", "~> 3.8"
|
|
@@ -17,7 +20,7 @@ end
|
|
|
17
20
|
|
|
18
21
|
group :development do
|
|
19
22
|
gem "pry"
|
|
20
|
-
gem "pry-byebug"
|
|
23
|
+
gem "pry-byebug", platforms: :ruby # byebug doesn't work on Windows
|
|
21
24
|
gem "rb-readline"
|
|
22
25
|
end
|
|
23
26
|
|
|
@@ -66,7 +66,10 @@ module ChefCLI
|
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def client_for_thread
|
|
69
|
-
Thread.current[
|
|
69
|
+
# Use thread_variable_* methods instead of Thread.current[] to avoid
|
|
70
|
+
# fiber-local variable issues and provide better thread isolation
|
|
71
|
+
Thread.current.thread_variable_get(:chef_server_api_multi) ||
|
|
72
|
+
Thread.current.thread_variable_set(:chef_server_api_multi, Chef::ServerAPI.new(@url, @opts))
|
|
70
73
|
end
|
|
71
74
|
|
|
72
75
|
end
|
data/lib/chef-cli/version.rb
CHANGED
|
@@ -44,7 +44,7 @@ describe ChefCLI::ChefServerAPIMulti do
|
|
|
44
44
|
before do
|
|
45
45
|
# clean out thread local storage or else `chef_server_api` instance double
|
|
46
46
|
# will get re-used across test examples and rspec will complain:
|
|
47
|
-
Thread.current
|
|
47
|
+
Thread.current.thread_variable_set(:chef_server_api_multi, nil)
|
|
48
48
|
allow(Chef::ServerAPI).to receive(:new).with(url, expected_server_api_opts).and_return(chef_server_api)
|
|
49
49
|
end
|
|
50
50
|
|
|
@@ -57,8 +57,8 @@ describe ChefCLI::ChefServerAPIMulti do
|
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
it "creates a thread-local Chef::ServerAPI object for requests" do
|
|
60
|
-
server_api_multi.client_for_thread # force
|
|
61
|
-
expect(server_api_multi.client_for_thread).to eq(Thread.current
|
|
60
|
+
server_api_multi.client_for_thread # force lazy initialization to run
|
|
61
|
+
expect(server_api_multi.client_for_thread).to eq(Thread.current.thread_variable_get(:chef_server_api_multi))
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
describe "when keepalives are disabled" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chef-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.6.
|
|
4
|
+
version: 5.6.23
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chef Software, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mixlib-cli
|