train 3.10.1 → 3.10.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7efd89c593b5d3676a3aaa39b6df6138181bc729d14e6e4fa71bda99013a83fe
4
- data.tar.gz: db07f812a1bc3a15702b96977390dd2bd36da3f16607df1af8e348166e3b7b3d
3
+ metadata.gz: 1916928e37988ef70adecf939184677eeff3af9e66f536241a1b9a48e94d79bc
4
+ data.tar.gz: 82114704d246f8011e6eb874d17f0c1bf680513b5c530a95b9e30fd804973f7a
5
5
  SHA512:
6
- metadata.gz: 941b825ff06fc1766b53387cb1d7d27e72fd069e891147a13c6a89535b371488082a0f461ffd0fdd63078ea3308d52c7d0fee2566a6dcbc3c02f4d38a8e7984a
7
- data.tar.gz: 2bb1ba30867b74b6d329ed41b2a8c3f5981259044758cda8e58749e5ddc2e41db3ead3bab682b8711fe4dcb4f8dd5fede9a6ae4d4356c2ebaf065b3640986867
6
+ metadata.gz: cd2c0a20ef84ae82fcb8d56e7aa70f496f6595434703b3b754912502898a1750c0ee872d32870a9721b590ed35a4171bd733652db1b334b691bc4262bc574cb0
7
+ data.tar.gz: 0f68d28f460c2fd4851722acb565923ee1593a5e4def9983330403fc99cadcd22dac65b0b4bc59bf3f82440f0543a1690d88310751b8d68c07b59814ced7c40b
@@ -105,9 +105,10 @@ module Train::Transports
105
105
  def unique_identifier
106
106
  unique_id = "default"
107
107
  # use auth client_id for users (issuer is nil)
108
- unique_id = gcp_iam_client.request_options.authorization.client_id unless gcp_iam_client.request_options.authorization.client_id.nil?
108
+ authorization = gcp_iam_client.request_options.authorization
109
+ unique_id = authorization.client_id if authorization.respond_to?(:client_id) && !authorization.client_id.nil?
109
110
  # for service account credentials (client_id is nil)
110
- unique_id = gcp_iam_client.request_options.authorization.issuer unless gcp_iam_client.request_options.authorization.issuer.nil?
111
+ unique_id = authorization.issuer if authorization.respond_to?(:issuer) && !authorization.issuer.nil?
111
112
  unique_id
112
113
  end
113
114
  end
@@ -98,10 +98,11 @@ module Train::Transports
98
98
  private
99
99
 
100
100
  def detect_powershell_binary
101
- if find_executable0("pwsh")
102
- :pwsh
103
- elsif find_executable0("powershell")
101
+ # Detect Powershell first in case of Windows with Powershell 6/7/Core installed as flush_stdout/stderr doesn't work for pwsh on Windows.
102
+ if find_executable0("powershell")
104
103
  :powershell
104
+ elsif find_executable0("pwsh")
105
+ :pwsh
105
106
  else
106
107
  raise "Cannot find PowerShell binary, is `pwsh` installed?"
107
108
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: train
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.1
4
+ version: 3.10.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef InSpec Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-29 00:00:00.000000000 Z
11
+ date: 2022-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: train-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.10.1
19
+ version: 3.10.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.10.1
26
+ version: 3.10.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: train-winrm
29
29
  requirement: !ruby/object:Gem::Requirement