train-core 3.2.23 → 3.3.1

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: 8833b9ed7f5a514eeea468cfa0864297f20a189310da62c63adbdb97ff6c68bb
4
- data.tar.gz: f059ae5832a58daa8d45da3a27816097e8eabb7728f63207e4ef94a9fb4b161e
3
+ metadata.gz: 0245d5647c9a636cff344b8976bc6983d0f375f4e66b2baa4d2b8dccfcc98f24
4
+ data.tar.gz: c8a74114fd330ffeff3063fd9d452b7142287a0502033e1f91ae9e867c9c0966
5
5
  SHA512:
6
- metadata.gz: 4d7fb1e26cb9a08eb9ce0c854dae087f732b804e1b8f8ba226c0c52b7e9a2214f1ebdd630597de3da28c5c65546a7bb5873225ecd314b16ee9ae7ca7a565a0e4
7
- data.tar.gz: 4d89339a331457c22b45fe6ace83efcf7ca93b57c506d8cb4cd84179b4e553afb257242ca2e0976de73da715f11dbf24634f0c69c43a742b7a4b77a590bab166
6
+ metadata.gz: 4d622422a8d022e6e8c6770d7baf5ae00afd8466029bed65ce86fc08af51308818170744edbae6cfa7242e19ced2e30f202bdf98f16aa02a43547df171c47e05
7
+ data.tar.gz: dda8b333a8a2b9716e992630d65a37599a0a8a7099d52ffd3183a1cb82a2f2aeccdbca1fd5287f285b59ff931fba7a9eaa5ca3a42b65a19fa18ba9019632d355
@@ -72,14 +72,14 @@ module Train::Extras
72
72
  rawerr = "#{res.stdout} #{res.stderr}".strip
73
73
 
74
74
  case rawerr
75
- when "Sorry, try again"
75
+ when /Sorry, try again/
76
76
  ["Wrong sudo password.", :bad_sudo_password]
77
- when "sudo: no tty present and no askpass program specified"
77
+ when /sudo: no tty present and no askpass program specified/
78
78
  ["Sudo requires a password, please configure it.", :sudo_password_required]
79
- when "sudo: command not found"
79
+ when /sudo: command not found/
80
80
  ["Can't find sudo command. Please either install and "\
81
81
  "configure it on the target or deactivate sudo.", :sudo_command_not_found]
82
- when "sudo: sorry, you must have a tty to run sudo"
82
+ when /sudo: sorry, you must have a tty to run sudo/
83
83
  ["Sudo requires a TTY. Please see the README on how to configure "\
84
84
  "sudo to allow for non-interactive usage.", :sudo_no_tty]
85
85
  else
@@ -22,8 +22,14 @@ module Train
22
22
  def exist?
23
23
  @exist ||= begin
24
24
  f = @follow_symlink ? "" : " || test -L #{@spath}"
25
- @backend.run_command("test -e #{@spath}" + f)
26
- .exit_status == 0
25
+ if @backend.platform.solaris?
26
+ # Solaris does not support `-e` flag in default `test`,
27
+ # so we specify by running /usr/bin/test:
28
+ # https://github.com/inspec/train/issues/587
29
+ @backend.run_command("/usr/bin/test -e #{@spath}" + f)
30
+ else
31
+ @backend.run_command("test -e #{@spath}" + f)
32
+ end.exit_status == 0
27
33
  end
28
34
  end
29
35
 
@@ -16,6 +16,9 @@ class Train::Transports::SSH
16
16
  # Use all options left that are not `nil` for `Net::SSH.start` later
17
17
  @ssh_options = options.reject { |_key, value| value.nil? }
18
18
 
19
+ # Allow older algorithms
20
+ @ssh_options[:append_all_supported_algorithms] = true
21
+
19
22
  @prompt = /^\S+[>#]\r\n.*$/
20
23
  end
21
24
 
@@ -54,7 +54,7 @@ class Train::Transports::SSH
54
54
  @bastion_user = @options.delete(:bastion_user)
55
55
  @bastion_port = @options.delete(:bastion_port)
56
56
 
57
- @cmd_wrapper = CommandWrapper.load(self, @transport_options)
57
+ @cmd_wrapper = CommandWrapper.load(self, @transport_options)
58
58
  end
59
59
 
60
60
  # (see Base::Connection#close)
@@ -202,6 +202,8 @@ class Train::Transports::SSH
202
202
  require "net/ssh/proxy/command"
203
203
  @options[:proxy] = Net::SSH::Proxy::Command.new(generate_proxy_command)
204
204
  end
205
+ # Allow older algorithms
206
+ @options[:append_all_supported_algorithms] = true
205
207
  Net::SSH.start(@hostname, @username, @options.clone.delete_if { |_key, value| value.nil? })
206
208
  rescue *RESCUE_EXCEPTIONS_ON_ESTABLISH => e
207
209
  if (opts[:retries] -= 1) <= 0
@@ -3,5 +3,5 @@
3
3
  # Author:: Dominik Richter (<dominik.richter@gmail.com>)
4
4
 
5
5
  module Train
6
- VERSION = "3.2.23".freeze
6
+ VERSION = "3.3.1".freeze
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: train-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.23
4
+ version: 3.3.1
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: 2020-03-02 00:00:00.000000000 Z
11
+ date: 2020-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.5'
27
27
  - !ruby/object:Gem::Dependency
28
- name: inifile
28
+ name: ffi
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - "!="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: 1.13.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - "!="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: 1.13.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: json
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '1.2'
88
88
  - - "<"
89
89
  - !ruby/object:Gem::Version
90
- version: '3.0'
90
+ version: '4.0'
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
@@ -97,7 +97,7 @@ dependencies:
97
97
  version: '1.2'
98
98
  - - "<"
99
99
  - !ruby/object:Gem::Version
100
- version: '3.0'
100
+ version: '4.0'
101
101
  - !ruby/object:Gem::Dependency
102
102
  name: net-ssh
103
103
  requirement: !ruby/object:Gem::Requirement
@@ -107,7 +107,7 @@ dependencies:
107
107
  version: '2.9'
108
108
  - - "<"
109
109
  - !ruby/object:Gem::Version
110
- version: '6.0'
110
+ version: '7.0'
111
111
  type: :runtime
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
@@ -117,7 +117,7 @@ dependencies:
117
117
  version: '2.9'
118
118
  - - "<"
119
119
  - !ruby/object:Gem::Version
120
- version: '6.0'
120
+ version: '7.0'
121
121
  description: A minimal Train with a backends for ssh and winrm.
122
122
  email:
123
123
  - inspec@chef.io