hiera-router 0.3.2 → 0.3.3

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: 86e443c63237be161b1bce49efb771b5db93db81
4
- data.tar.gz: be04264990b7d1e46066159b5fb0d827ab66ee6f
3
+ metadata.gz: 43963a8b7ae64ae4df6930f042a96c9d72f41de4
4
+ data.tar.gz: a352c0f02f8e8093d1a2cb99551984ab9493c6aa
5
5
  SHA512:
6
- metadata.gz: c00c455756502f060cebd6b4ca4db44bdb62f347bdcacb306c03149bc10ba11c3d6c12f38da82efb1b20cdd50525e1fd1efbb0dce6d4a0f155e9103fd07b3249
7
- data.tar.gz: 4d1d5ade097c65ca9ca513e2b932011bad10bc36f5128fa1c7f589c1242648abe7bb13a6051a1fa2f7bc341eb07c7ebe05a53a50e41c7500b0337457e1558e92
6
+ metadata.gz: 601162d82e78f61c06b6f1cc131c1621e9278992419b53d412e188e3ff9f305f6e148e24c08f4978aa7c79785f273bd4aad7d6713e8da867a13fa9ad510b0821
7
+ data.tar.gz: 90e18f7bb03116bf38a62c61918353841387dfc23a3705fb881d8270f89d03285a85e42db9189ed647df32a41449351fa0b2dbe5114528a7141716f836b02919
@@ -30,12 +30,17 @@ class Hiera
30
30
  backend_config_override = backend_config['backend_key'] || backend_config[:backend_key] || backend_classname
31
31
  Hiera.debug("[hiera-router] Backend class for '#{backend}' will be '#{backend_classname}'")
32
32
 
33
+ backend_config_override_config = Config[backend_config_override.to_sym] || Config[:router][backend_config_override.to_sym] || {}
33
34
  backend_config = Config[:router].merge({
34
35
  :hierarchy => Config[:hierarchy],
35
36
  :backends => [backend_classname],
36
- backend_classname.to_sym => Config[backend_config_override.to_sym] || Config[:router][backend_config_override.to_sym] || {},
37
+ backend_classname.to_sym => backend_config_override_config,
37
38
  })
38
39
 
40
+ if backend_config_override_config[:hierarchy]
41
+ backend_config[:hierarchy] = backend_config_override_config[:hierarchy]
42
+ end
43
+
39
44
  Config.load(backend_config)
40
45
  require "hiera/backend/#{full_backend_classname.downcase}"
41
46
  backend_inst = Hiera::Backend.const_get(full_backend_classname).new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiera-router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Vandeginste