chef-winrm 2.4.4 → 2.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc905683daca5dde47698c91b81eb45856294518b8f763c39bacf9b50fb64a11
4
- data.tar.gz: 9edb4876aa8928b898f4012522d8a50130a6d04ef9f5fe0330ac28390e673d06
3
+ metadata.gz: 9f214448a52d639a799a05d7f0ebd14134bcb6cc35aaa0f380d849f31102b117
4
+ data.tar.gz: 2260a3ad486a5cf8fdbdeddcbba1aa9ce6b9d0452f4a8dd7940b2f79f507652d
5
5
  SHA512:
6
- metadata.gz: 3e8dbe6cb43f5a8374c81127de36a31659461dce27cfadb4fae49d5d3231fcbf8c95390c00ec523513906501a63c8fbbd3fa957e3635726bcdf3e5f3a8257d4a
7
- data.tar.gz: e70e81dfb3d0de92cabf8fa6dcd7d5b389592afb4d1e0ee5c6f305d0abc8c5ba3f4020ea713552fa87e1af2d5917664bf25437f23b5c15155a68365721a928a6
6
+ metadata.gz: '0816dd280d448ca0fbd4c0a0e34645a8b5fab9edf3d12a0d0fd3376d66d95a3221c8cbaab1c5913c09a59e484fd69e6986c65f2f453aaf5738a57e3714a88b2b'
7
+ data.tar.gz: ecdc0ba3ac814cfb35dca35cdfa18fda5e13e3da07ed0abab39afa46c9b144bed62876236f938aed98596f46fe99228a5b3da7240a931e8f9e45f888397c86ac
@@ -67,8 +67,8 @@ module WinRM
67
67
  return if soap_errors.empty?
68
68
 
69
69
  fault = REXML::XPath.first(
70
- soap_errors,
71
- "//*[local-name() = 'WSManFault']"
70
+ response_xml,
71
+ "//*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'Fault']/*[local-name() = 'Detail']//*[local-name() = 'WSManFault']"
72
72
  )
73
73
  raise WinRMWSManFault.new(fault.to_s, fault.attributes["Code"]) unless fault.nil?
74
74
  end
@@ -81,8 +81,8 @@ module WinRM
81
81
  return if soap_errors.empty?
82
82
 
83
83
  error = REXML::XPath.first(
84
- soap_errors,
85
- "//*[local-name() = 'MSFT_WmiError']"
84
+ response_xml,
85
+ "//*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'Fault']/*[local-name() = 'Detail']//*[local-name() = 'MSFT_WmiError']"
86
86
  )
87
87
  return if error.nil?
88
88
 
@@ -101,16 +101,16 @@ module WinRM
101
101
  return if soap_errors.empty?
102
102
 
103
103
  code = REXML::XPath.first(
104
- soap_errors,
105
- "//*[local-name() = 'Code']/*[local-name() = 'Value']/text()"
104
+ response_xml,
105
+ "//*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'Fault']/*[local-name() = 'Code']/*[local-name() = 'Value']/text()"
106
106
  )
107
107
  subcode = REXML::XPath.first(
108
- soap_errors,
109
- "//*[local-name() = 'Subcode']/*[local-name() = 'Value']/text()"
108
+ response_xml,
109
+ "//*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'Fault']/*[local-name() = 'Code']/*[local-name() = 'Subcode']/*[local-name() = 'Value']/text()"
110
110
  )
111
111
  reason = REXML::XPath.first(
112
- soap_errors,
113
- "//*[local-name() = 'Reason']/*[local-name() = 'Text']/text()"
112
+ response_xml,
113
+ "//*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'Fault']/*[local-name() = 'Reason']/*[local-name() = 'Text']/text()"
114
114
  )
115
115
 
116
116
  raise WinRMSoapFault.new(code, subcode, reason) unless
@@ -35,7 +35,7 @@ module WinRM
35
35
  parser = Nori.new(
36
36
  parser: :rexml,
37
37
  advanced_typecasting: false,
38
- convert_tags_to: ->(tag) { tag.snakecase.to_sym },
38
+ convert_tags_to: ->(tag) { tag.gsub(/([a-z\d])([A-Z])/, '\1_\2').downcase.to_sym },
39
39
  strip_namespaces: true
40
40
  )
41
41
  parser.parse(raw)[:obj][:ms]
@@ -95,7 +95,11 @@ module WinRM
95
95
  end
96
96
 
97
97
  def self.finalize(connection_opts, transport, shell_id)
98
- proc { Thread.new { close_shell(connection_opts, transport, shell_id) } }
98
+ # Don't attempt to close shell during finalization as it requires
99
+ # HTTP operations which need threads. Ruby 3.3+ doesn't allow thread
100
+ # creation during finalization. The WinRM server will clean up
101
+ # orphaned shells after the timeout period.
102
+ proc {}
99
103
  end
100
104
 
101
105
  protected
@@ -1,5 +1,5 @@
1
1
  # WinRM module
2
2
  module WinRM
3
3
  # The version of the WinRM library
4
- VERSION = "2.4.4".freeze
4
+ VERSION = "2.5.0".freeze
5
5
  end
@@ -15,7 +15,7 @@ module WinRM
15
15
  parser = Nori.new(
16
16
  parser: :rexml,
17
17
  advanced_typecasting: false,
18
- convert_tags_to: ->(tag) { Nori::StringUtils.snakecase(tag).to_sym },
18
+ convert_tags_to: ->(tag) { tag.gsub(/([a-z\d])([A-Z])/, '\1_\2').downcase.to_sym },
19
19
  strip_namespaces: true
20
20
  )
21
21
  parser.parse(response.to_s)[:envelope][:body]
@@ -30,7 +30,7 @@ module WinRM
30
30
  parser = Nori.new(
31
31
  parser: :rexml,
32
32
  advanced_typecasting: false,
33
- convert_tags_to: ->(tag) { Nori::StringUtils.snakecase(tag).to_sym },
33
+ convert_tags_to: ->(tag) { tag.gsub(/([a-z\d])([A-Z])/, '\1_\2').downcase.to_sym },
34
34
  strip_namespaces: true
35
35
  )
36
36
  @items = Hash.new { |h, k| h[k] = [] }
metadata CHANGED
@@ -1,17 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-winrm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.4
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Wanek
8
8
  - Paul Morton
9
9
  - Matt Wrock
10
10
  - Shawn Neal
11
- autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2025-07-29 00:00:00.000000000 Z
13
+ date: 1980-01-02 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: builder
@@ -113,30 +112,36 @@ dependencies:
113
112
  name: nori
114
113
  requirement: !ruby/object:Gem::Requirement
115
114
  requirements:
116
- - - '='
115
+ - - "~>"
117
116
  - !ruby/object:Gem::Version
118
- version: 2.7.0
117
+ version: '2.7'
119
118
  type: :runtime
120
119
  prerelease: false
121
120
  version_requirements: !ruby/object:Gem::Requirement
122
121
  requirements:
123
- - - '='
122
+ - - "~>"
124
123
  - !ruby/object:Gem::Version
125
- version: 2.7.0
124
+ version: '2.7'
126
125
  - !ruby/object:Gem::Dependency
127
126
  name: rexml
128
127
  requirement: !ruby/object:Gem::Requirement
129
128
  requirements:
130
- - - "~>"
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: 3.4.2
132
+ - - "<"
131
133
  - !ruby/object:Gem::Version
132
- version: '3.3'
134
+ version: '4.0'
133
135
  type: :runtime
134
136
  prerelease: false
135
137
  version_requirements: !ruby/object:Gem::Requirement
136
138
  requirements:
137
- - - "~>"
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ version: 3.4.2
142
+ - - "<"
138
143
  - !ruby/object:Gem::Version
139
- version: '3.3'
144
+ version: '4.0'
140
145
  - !ruby/object:Gem::Dependency
141
146
  name: pry
142
147
  requirement: !ruby/object:Gem::Requirement
@@ -299,8 +304,8 @@ executables:
299
304
  - rwinrm
300
305
  extensions: []
301
306
  extra_rdoc_files:
302
- - README.md
303
307
  - LICENSE
308
+ - README.md
304
309
  files:
305
310
  - LICENSE
306
311
  - README.md
@@ -363,7 +368,6 @@ licenses:
363
368
  - Apache-2.0
364
369
  metadata:
365
370
  rubygems_mfa_required: 'true'
366
- post_install_message:
367
371
  rdoc_options:
368
372
  - "-x"
369
373
  - test/
@@ -382,8 +386,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
382
386
  - !ruby/object:Gem::Version
383
387
  version: '0'
384
388
  requirements: []
385
- rubygems_version: 3.3.27
386
- signing_key:
389
+ rubygems_version: 3.6.7
387
390
  specification_version: 4
388
391
  summary: Ruby library for Windows Remote Management
389
392
  test_files: []