hiera-router 0.1.9 → 0.2.0

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: e432ecbc1699558863fe2ee1c50ee7e70b696521
4
- data.tar.gz: 2b6a287868b7d7691fad3532c9dcbdfb9ed92705
3
+ metadata.gz: 122a0f7e4e3d0e981e012bb94c2caac79ba6f0dc
4
+ data.tar.gz: 29e83b677d0c249a36060f0d335e8619f2509868
5
5
  SHA512:
6
- metadata.gz: 9d4059262fab1f188e5952274e90879116619c4616189a9f850b87a71bf3b44cc3372d3b7a579002bb9ecd942222131a5b5753adb9aee436ab5757b4158904e4
7
- data.tar.gz: cbdcd2786b2d33e66b91ea5479e8ea79a99026b13394f8b738aa8cb5c5a82570618a8f8f977881488dbc701ef655f96a06a018c44ce3a82f937848d692541655
6
+ metadata.gz: 1d4a36a0749b16642d694f5bccfe67066c1d1b1b6071dc0bddd6c5c917d70fe36b21720ddeeb8c7f61233ca97664011bb69bdbd280c08c26173b17e521e9eb84
7
+ data.tar.gz: 8ff6b1889fa79d37c775e5ef97288daf5db03adda47990ad2cc451268cac89a1abf8630be0db474ad3359306d847f740dbcadca20deae702132f6ad2f8b8e68f
@@ -10,8 +10,11 @@ class Hiera
10
10
  @backends = {}
11
11
  if backend_list = Config[:router][:backends]
12
12
  backend_list.each do |backend|
13
- require "hiera/backend/#{backend.downcase}_backend"
14
- @backends[backend] = Hiera::Backend.const_get("#{backend.capitalize}_backend").new
13
+ backend_config = Config[:router][backend.to_sym] || {}
14
+ backend_classname = backend_config[:backend_class] || backend
15
+
16
+ require "hiera/backend/#{backend_classname.downcase}_backend"
17
+ @backends[backend] = Hiera::Backend.const_get("#{backend_classname.capitalize}_backend").new
15
18
  end
16
19
  end
17
20
 
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.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Vandeginste
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-23 00:00:00.000000000 Z
12
+ date: 2016-06-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: |
15
15
  This hiera backend replaces the default yaml backend, but will resend queries to other hiera backends based on the value returned by the yaml files.