specinfra 2.14.0 → 2.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/host_inventory.rb +6 -2
- data/lib/specinfra/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40d138c8273c6ee22427a9a9bc7f75fcdecafab0
|
4
|
+
data.tar.gz: be3e270aa40466b77491d1ea2281013a01c1df47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 850f3b120522278c98362ea45b7bf61b45206f4a7cdd67f575219e6873353b150db8fa053f6804da5a108239ffd12ae1aec96bd7846ef0dd2a0044966295a8a1
|
7
|
+
data.tar.gz: f998486d2f1f7cdce24e9c622d75ff9de96cc58064c789d18265146260e3637c70d00b737c023e3ea723abe257b971d673e60d7fbbaf1cba91b64e3afe07b919
|
@@ -19,8 +19,12 @@ module Specinfra
|
|
19
19
|
def [](key)
|
20
20
|
@inventory[key.to_sym] ||= {}
|
21
21
|
if @inventory[key.to_sym].empty?
|
22
|
-
|
23
|
-
|
22
|
+
begin
|
23
|
+
inventory_class = Specinfra::HostInventory.const_get(key.to_s.to_camel_case)
|
24
|
+
@inventory[key.to_sym] = inventory_class.get
|
25
|
+
rescue
|
26
|
+
@inventory[key.to_sym] = nil
|
27
|
+
end
|
24
28
|
end
|
25
29
|
@inventory[key.to_sym]
|
26
30
|
end
|
data/lib/specinfra/version.rb
CHANGED