train 0.21.0 → 0.21.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
  SHA1:
3
- metadata.gz: 1edcda93b18d806fd86e094f251628c130d29edb
4
- data.tar.gz: add339df25ea70aa5d4be363a6ba023f9864f4aa
3
+ metadata.gz: 27a7512d438219eb926939d6e65b7ca59541d43c
4
+ data.tar.gz: 525f5ef0734a59e2f3f6fc90296829f34c0d6376
5
5
  SHA512:
6
- metadata.gz: eb525d6d418efc91d7868ba40c3faeb50e8bb5b600264f914c1c29d76ac2224e2fcf9658d2b3cd5d60e860a2f75af855bb79db4399e65f7d9f17915f7a5d7652
7
- data.tar.gz: 8c0d703a2fe472cc8523503219a49276d4fb63e1258b5ddc070f51efc119776b35713adfef96f54568f8c8e6121cbe7a1afb0fbc4f07609e0ae47dd0261300e5
6
+ metadata.gz: f2066a11bad5834d56ac6af79f5e49cd48323736ffe66b21df929e6cbe3c6d76f0d55c87a6a906677960c585067c8a47b9873ba4179dda1ce4e497d075d30053
7
+ data.tar.gz: fada216873d7e08ed9ba259b2fdc6e1dcc652380964900efe359734dcac817e821fe33f9090ff32985b2703055c0d0850067535d6a04bd150c16368c9126dc17
data/CHANGELOG.md CHANGED
@@ -1,7 +1,18 @@
1
1
  # Change Log
2
2
 
3
- ## [0.21.0](https://github.com/chef/train/tree/0.21.0) (2016-11-04)
4
- [Full Changelog](https://github.com/chef/train/compare/v0.20.1...0.21.0)
3
+ ## [0.21.1](https://github.com/chef/train/tree/0.21.1) (2016-11-04)
4
+ [Full Changelog](https://github.com/chef/train/compare/v0.21.0...0.21.1)
5
+
6
+ **Closed issues:**
7
+
8
+ - detect\_arista\_eos raises exception against unix host [\#160](https://github.com/chef/train/issues/160)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - ensure the os detection works in pty mode [\#161](https://github.com/chef/train/pull/161) ([chris-rock](https://github.com/chris-rock))
13
+
14
+ ## [v0.21.0](https://github.com/chef/train/tree/v0.21.0) (2016-11-04)
15
+ [Full Changelog](https://github.com/chef/train/compare/v0.20.1...v0.21.0)
5
16
 
6
17
  **Implemented enhancements:**
7
18
 
@@ -9,14 +9,16 @@ module Train::Extras
9
9
  module DetectAristaEos
10
10
  def detect_arista_eos
11
11
  if unix_file?('/usr/bin/FastCli')
12
- output = @backend.run_command('FastCli -p 15 -c "show version | json"').stdout
12
+ cmd = @backend.run_command('FastCli -p 15 -c "show version | json"')
13
13
  @platform[:name] = 'arista_eos_bash'
14
14
  family = 'fedora'
15
15
  else
16
- output = @backend.run_command('show version | json').stdout
16
+ cmd = @backend.run_command('show version | json')
17
17
  end
18
18
 
19
- unless output.empty?
19
+ # in PTY mode, stderr is matched with stdout, therefore it may not be empty
20
+ output = cmd.stdout
21
+ if cmd.exit_status == 0 && !output.empty?
20
22
  eos_ver = JSON.parse(output)
21
23
  @platform[:name] = @platform[:name] || 'arista_eos'
22
24
  family ||= 'arista_eos'
@@ -24,6 +26,8 @@ module Train::Extras
24
26
  @platform[:release] = eos_ver['version']
25
27
  @platform[:arch] = eos_ver['architecture']
26
28
  true
29
+ else
30
+ false
27
31
  end
28
32
  end
29
33
  end
data/lib/train/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # Author:: Dominik Richter (<dominik.richter@gmail.com>)
4
4
 
5
5
  module Train
6
- VERSION = '0.21.0'.freeze
6
+ VERSION = '0.21.1'.freeze
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: train
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Richter