train 3.10.0 → 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: e6b8e68e08bf282a4842a3d7ff2b3433ae881762c68ead8976199d7ff3c7d697
4
- data.tar.gz: 2b8406599b0a5da73fce05d206de2eb9633e07603e2edb8c94a8e6669822d738
3
+ metadata.gz: 1916928e37988ef70adecf939184677eeff3af9e66f536241a1b9a48e94d79bc
4
+ data.tar.gz: 82114704d246f8011e6eb874d17f0c1bf680513b5c530a95b9e30fd804973f7a
5
5
  SHA512:
6
- metadata.gz: b7462fd698eaa650607048b34eca28cb24515dea1e8bee54a4f10842f7bd1dd7b6a33fe2d5f53dd3272046539658536279e3d9be3c77911cfd2aaa3bbb90d54d
7
- data.tar.gz: 102693e9e2ad91febec2fda858e61ff1b721a9af806518751ca4e9c70814ac7ad56ef490c0f273a7f01c55a5eac38cc24a4a7a27e72b7aeeee510d6acd637112
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
@@ -1,5 +1,5 @@
1
1
  require "docker"
2
- require_relative "../errors"
2
+ require "train/plugins"
3
3
 
4
4
  module Train::Transports
5
5
  class Podman < Train.plugin(1)
@@ -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.0
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-28 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.0
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.0
26
+ version: 3.10.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: train-winrm
29
29
  requirement: !ruby/object:Gem::Requirement