specinfra 2.36.2 → 2.36.3

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: b2614c9ee3fe910bb0c2e9748a70ffa97e717985
4
- data.tar.gz: 930762841f0b671550a9ead4b011a5cd834789be
3
+ metadata.gz: 0e3655d436e777aec0304d4d5d11ce4beb6d71fb
4
+ data.tar.gz: 386998989ce6643c0fcd2cd83b5c9155cb085a6d
5
5
  SHA512:
6
- metadata.gz: 42fbe06c4d271f2b9afe39500dc18deedc1391863594fa8514ff3e4d72a63920396991993cba67572fbf253b2009d51ac2a602e6f593a5764601e4e5b6a3ad93
7
- data.tar.gz: fff226f108813851d8a5cda6dee4c65b63dc0b07a398a58f29df971f704a6b740c565ea0adf4045fa421587edf1466dc5c011997784f10e9086f012c10abe23a
6
+ metadata.gz: f9a5ce035324f424f81a9580d8bfb8285fbafa589d831c621c0c2465de3222df5769538f3da364f5fbf120d380c37169d69a465f94eb8134875126de3806c7ae
7
+ data.tar.gz: e98a782548cccfd606b1b8411147b8c465da0b22e5214e7c516871936c1d064620dc7a79cc6b47b4b10bab4d448df5f826eb5c41857af13a461998144308c6d1
@@ -3,7 +3,13 @@ module Specinfra
3
3
  class Domain < Base
4
4
  def get
5
5
  cmd = backend.command.get(:get_inventory_domain)
6
- backend.run_command(cmd).stdout.strip
6
+ result = backend.run_command(cmd)
7
+
8
+ if result.exit_status == 0
9
+ result.stdout.strip
10
+ else
11
+ nil
12
+ end
7
13
  end
8
14
  end
9
15
  end
@@ -3,7 +3,13 @@ module Specinfra
3
3
  class Fqdn < Base
4
4
  def get
5
5
  cmd = backend.command.get(:get_inventory_fqdn)
6
- backend.run_command(cmd).stdout.strip
6
+ result = backend.run_command(cmd)
7
+
8
+ if result.exit_status == 0
9
+ result.stdout.strip
10
+ else
11
+ nil
12
+ end
7
13
  end
8
14
  end
9
15
  end
@@ -3,7 +3,13 @@ module Specinfra
3
3
  class Hostname < Base
4
4
  def get
5
5
  cmd = backend.command.get(:get_inventory_hostname)
6
- backend.run_command(cmd).stdout.strip
6
+ result = backend.run_command(cmd)
7
+
8
+ if result.exit_status == 0
9
+ result.stdout.strip
10
+ else
11
+ nil
12
+ end
7
13
  end
8
14
  end
9
15
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.36.2"
2
+ VERSION = "2.36.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.36.2
4
+ version: 2.36.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita