train-core 1.5.6 → 1.5.11

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: d678392322f894b6807ecf2da658f788f7829009512ecca7f3b7fa0819c9b050
4
- data.tar.gz: eb0b6e01142247f9a89270638df30554c579fa17e55535dd6436835ec48ea852
3
+ metadata.gz: b96effd96b63d473be914eb23d83523a21bc991299517f822a962c9e2298cdb1
4
+ data.tar.gz: a781e807941a889b19de2ff2f01b2182cea28a81548feecbe9d2b22ab4efabe0
5
5
  SHA512:
6
- metadata.gz: dd5c26cdfc1a057e85129c15ebd559739aea1b27bc76846a7151936f47bb9afd4618fb25177e4e735c9f2cf39e4f470d9c2119109c73fe9cf5832f5f8816fbb6
7
- data.tar.gz: 7b7e9250bec17278aa2626725d045de508f93c3e3fcc17fdf62fb0c9236a16a49fefa65cb044fcc7ee056467232c51344d5b3f5a6d260c513c8c03d1d79daef5
6
+ metadata.gz: c083ae1bcbad82a56e309cea4607efb5c92960bc2639c67b122687ee9d1d2c529a4eb362f7f6f9d06e188826b9c809fb4ac4484eec2f863040484331d492c1c4
7
+ data.tar.gz: c7d7856522f0b9e48703406b6a12278a265ab5d69f6baafaa350e3b0e7b6bc5dbe73e4918d1ba47fa025741ee4322d57303baaeeaedcc8839c9bf471893b8b3b
@@ -1,19 +1,29 @@
1
- <!-- latest_release 1.5.6 -->
2
- ## [v1.5.6](https://github.com/inspec/train/tree/v1.5.6) (2018-11-01)
1
+ <!-- latest_release 1.5.11 -->
2
+ ## [v1.5.11](https://github.com/inspec/train/tree/v1.5.11) (2018-12-10)
3
3
 
4
4
  #### Merged Pull Requests
5
- - Adds cached_client method in BaseConnection [#371](https://github.com/inspec/train/pull/371) ([dmccown](https://github.com/dmccown))
5
+ - Pass logger to Cisco IOS transport [#381](https://github.com/inspec/train/pull/381) ([btm](https://github.com/btm))
6
6
  <!-- latest_release -->
7
7
 
8
- <!-- release_rollup since=1.5.4 -->
9
- ### Changes since 1.5.4 release
8
+ <!-- release_rollup since=1.5.6 -->
9
+ ### Changes since 1.5.6 release
10
10
 
11
11
  #### Merged Pull Requests
12
- - Adds cached_client method in BaseConnection [#371](https://github.com/inspec/train/pull/371) ([dmccown](https://github.com/dmccown)) <!-- 1.5.6 -->
13
- - Fix Cisco IOS detection when banners lack a `\r\n` [#372](https://github.com/inspec/train/pull/372) ([jerryaldrichiii](https://github.com/jerryaldrichiii)) <!-- 1.5.5 -->
12
+ - Pass logger to Cisco IOS transport [#381](https://github.com/inspec/train/pull/381) ([btm](https://github.com/btm)) <!-- 1.5.11 -->
13
+ - Added a new matcher for amazon linux 2 [#380](https://github.com/inspec/train/pull/380) ([artyomtkachenko](https://github.com/artyomtkachenko)) <!-- 1.5.10 -->
14
+ - Remove `#local?` [#365](https://github.com/inspec/train/pull/365) ([jerryaldrichiii](https://github.com/jerryaldrichiii)) <!-- 1.5.9 -->
15
+ - Fix shallow_link_path on remote unix [#373](https://github.com/inspec/train/pull/373) ([mheiges](https://github.com/mheiges)) <!-- 1.5.8 -->
16
+ - Add Google API application info [#378](https://github.com/inspec/train/pull/378) ([nathenharvey](https://github.com/nathenharvey)) <!-- 1.5.7 -->
14
17
  <!-- release_rollup -->
15
18
 
16
19
  <!-- latest_stable_release -->
20
+ ## [v1.5.6](https://github.com/inspec/train/tree/v1.5.6) (2018-11-01)
21
+
22
+ #### Merged Pull Requests
23
+ - Fix Cisco IOS detection when banners lack a `\r\n` [#372](https://github.com/inspec/train/pull/372) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
24
+ - Adds cached_client method in BaseConnection [#371](https://github.com/inspec/train/pull/371) ([dmccown](https://github.com/dmccown))
25
+ <!-- latest_stable_release -->
26
+
17
27
  ## [v1.5.4](https://github.com/inspec/train/tree/v1.5.4) (2018-10-18)
18
28
 
19
29
  #### Merged Pull Requests
@@ -21,7 +31,6 @@
21
31
  - Remove the legacy version bumping from the rakefile [#359](https://github.com/inspec/train/pull/359) ([tas50](https://github.com/tas50))
22
32
  - Adds Azure Vault Client [#351](https://github.com/inspec/train/pull/351) ([r-fennell](https://github.com/r-fennell))
23
33
  - Correct example plugin link [#363](https://github.com/inspec/train/pull/363) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
24
- <!-- latest_stable_release -->
25
34
 
26
35
  ## [v1.5.0](https://github.com/inspec/train/tree/v1.5.0) (2018-09-27)
27
36
 
@@ -62,7 +62,8 @@ module Train
62
62
 
63
63
  def shallow_link_path
64
64
  return nil unless symlink?
65
- @shallow_link_path ||= ::File.readlink(@path)
65
+ @shallow_link_path ||=
66
+ @backend.run_command("readlink #{@spath}").stdout.chomp
66
67
  end
67
68
 
68
69
  def unix_mode_mask(owner, type)
@@ -10,8 +10,8 @@ module Train::Platforms::Detect::Helpers
10
10
  case conf
11
11
  when /rawhide/i
12
12
  /((\d+) \(Rawhide\))/i.match(conf)[1].downcase
13
- when /Amazon Linux AMI/i
14
- /release ([\d\.]+)/.match(conf)[1]
13
+ when /Amazon Linux/i
14
+ /([\d\.]+)/.match(conf)[1]
15
15
  when /derived from .*linux|amazon/i
16
16
  /Linux ((\d+|\.)+)/i.match(conf)[1]
17
17
  else
@@ -17,9 +17,15 @@ module Train::Platforms::Detect::Specifications
17
17
 
18
18
  plat.family('windows').in_family('os')
19
19
  .detect {
20
- if winrm? || (@backend.local? && ruby_host_os(/mswin|mingw32|windows/))
21
- true
20
+ # Can't return from a `proc` thus the `is_windows` shenanigans
21
+ is_windows = false
22
+ is_windows = true if winrm?
23
+
24
+ if @backend.class.to_s == 'Train::Transports::Local::Connection'
25
+ is_windows = true if ruby_host_os(/mswin|mingw32|windows/)
22
26
  end
27
+
28
+ is_windows
23
29
  }
24
30
  # windows platform
25
31
  plat.name('windows').in_family('windows')
@@ -91,11 +91,6 @@ class Train::Plugins::Transport
91
91
  end
92
92
  end
93
93
 
94
- # Is this a local transport?
95
- def local?
96
- false
97
- end
98
-
99
94
  def force_platform!(name, platform_details = nil)
100
95
  plat = Train::Platforms.name(name)
101
96
  plat.backend = self
@@ -28,10 +28,6 @@ module Train::Transports
28
28
  end
29
29
  end
30
30
 
31
- def local?
32
- true
33
- end
34
-
35
31
  def login_command
36
32
  nil # none, open your shell
37
33
  end
@@ -3,5 +3,5 @@
3
3
  # Author:: Dominik Richter (<dominik.richter@gmail.com>)
4
4
 
5
5
  module Train
6
- VERSION = '1.5.6'.freeze
6
+ VERSION = '1.5.11'.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: 1.5.6
4
+ version: 1.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Richter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-01 00:00:00.000000000 Z
11
+ date: 2018-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout