hiera-mock 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 0e30137677144b9c9be498f6e4c7e14c75fe4f83
4
- data.tar.gz: 9173551a1910cca74cdd627d0b877454f888b4c1
3
+ metadata.gz: 470d3d4642bec2bb54df8dcc04b4faf76997c765
4
+ data.tar.gz: 32655b1c4268a83b1b07bafd95ef54763effb582
5
5
  SHA512:
6
- metadata.gz: 317570012b76902508b92b16d7172c47f8ef73778e40b1c6e42b28b18a1a6571b0fd137993181d7d2a5bf7862d25113880cb4c7576891a1d7ba041a701589553
7
- data.tar.gz: fdcbe2f6186d8581d985552847db80f96df6ea98ab990b5e6c3a4e5afec838927b1ec7064fddc632709747b1f39ce2e3a1265a6a0570f386a3b067f969fbdc37
6
+ metadata.gz: c74a75994120335c839e2dfe9e529e3efed0cadda6ab467477a75b5a2f486383fcfc04ebac2a57e5610e90b1bd48a16ccb93e2958db077f334c89f15a6e17647
7
+ data.tar.gz: bd915948fd57e5c6c2e9d3e40cca863399b2f91420e2e301c286b5080ec4d7b59b24bb1436e77f05994ca5fb896d416591d5c0eb285e3394962bb2706f60298b
@@ -8,11 +8,11 @@ class Hiera
8
8
 
9
9
  datafile = Config[:mock][:datafile]
10
10
 
11
- @data = if datafile and File.exists?(datafile)
12
- YAML.load(File.read(datafile))
13
- else
14
- {}
15
- end
11
+ if datafile and File.exists?(datafile)
12
+ @data = YAML.load(File.read(datafile))
13
+ end
14
+
15
+ @data ||= {}
16
16
 
17
17
  Hiera.debug("hiera mock initialized")
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiera-mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Vandeginste