train 3.10.1 → 3.10.8

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: fb873d68363c10654ca56cb34e146fc293df3866b69b5da5cfd18e1b2089de97
4
+ data.tar.gz: fc3a3901d02012aaf2bab03f40e857aa6cb3752333a0cdccd6ee1c3cb34d738d
5
5
  SHA512:
6
- metadata.gz: 941b825ff06fc1766b53387cb1d7d27e72fd069e891147a13c6a89535b371488082a0f461ffd0fdd63078ea3308d52c7d0fee2566a6dcbc3c02f4d38a8e7984a
7
- data.tar.gz: 2bb1ba30867b74b6d329ed41b2a8c3f5981259044758cda8e58749e5ddc2e41db3ead3bab682b8711fe4dcb4f8dd5fede9a6ae4d4356c2ebaf065b3640986867
6
+ metadata.gz: bb99d136470181811ac5af1156ebfc2077e2693d8baa42aaf7d94b53c278798b726ec26a7cbe6cc5a9ff739b21be1f707f4934cce64898373be821694f373a1b
7
+ data.tar.gz: f344455fdb5fbf2156f85bbdbc2fcca4e28f4792fa2dbe11712d1db963655b65bceede1bdc57565a36c2c185a93d980076239bcba3aa98b815efc0eaa84ea297
@@ -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.8
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: 2023-06-23 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.8
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.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: train-winrm
29
29
  requirement: !ruby/object:Gem::Requirement