hiera-router 0.2.0 → 0.2.1

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: 122a0f7e4e3d0e981e012bb94c2caac79ba6f0dc
4
- data.tar.gz: 29e83b677d0c249a36060f0d335e8619f2509868
3
+ metadata.gz: db3b791b3292b848979608328b58dfc7dd60b136
4
+ data.tar.gz: 564e4ed4c0b8fb62fedf0be30e08ab73c6c083ad
5
5
  SHA512:
6
- metadata.gz: 1d4a36a0749b16642d694f5bccfe67066c1d1b1b6071dc0bddd6c5c917d70fe36b21720ddeeb8c7f61233ca97664011bb69bdbd280c08c26173b17e521e9eb84
7
- data.tar.gz: 8ff6b1889fa79d37c775e5ef97288daf5db03adda47990ad2cc451268cac89a1abf8630be0db474ad3359306d847f740dbcadca20deae702132f6ad2f8b8e68f
6
+ metadata.gz: 0acd0d7e6cb93b8731c19c43b0360d32f686ec9f2772ed9987e04608da18c089bfe5edcc030ab13a4f6be5f8702c8c4df053ed4f777118dc51811bfdee0c223a
7
+ data.tar.gz: 70069df8815d3435ac3b043174c7feee02ba39b6efadc0d319471af6a6165b6e05bcc32e945682cd564be8c44221706f7c31d59954a40f50cff7e5e2f6b6d64f
@@ -18,7 +18,7 @@ class Hiera
18
18
  end
19
19
  end
20
20
 
21
- Hiera.debug("hiera router initialized")
21
+ Hiera.debug("[hiera-router] hiera router initialized")
22
22
  end
23
23
  def lookup(key, scope, order_override, resolution_type)
24
24
  options = {
@@ -29,10 +29,10 @@ class Hiera
29
29
  }
30
30
  answer = nil
31
31
 
32
- Hiera.debug("Looking up #{key} in yaml backend")
32
+ Hiera.debug("[hiera-router] Looking up #{key} in yaml backend")
33
33
 
34
34
  Backend.datasources(scope, order_override) do |source|
35
- Hiera.debug("Looking for data source #{source}")
35
+ Hiera.debug("[hiera-router] Looking for data source #{source}")
36
36
  yaml_file = Backend.datafile(:router, scope, source, 'yaml') || next
37
37
 
38
38
  next unless File.exists?(yaml_file)
@@ -44,7 +44,7 @@ class Hiera
44
44
  next if data.empty?
45
45
  next unless data.include?(key)
46
46
 
47
- Hiera.debug("Found #{key} in #{source}")
47
+ Hiera.debug("[hiera-router] Found #{key} in #{source}")
48
48
 
49
49
  new_answer = parse_answer(data[key], scope, options)
50
50
  next if new_answer.nil?
@@ -95,14 +95,14 @@ class Hiera
95
95
  backend_name, backend_parameters = match.captures
96
96
  backend_options = options
97
97
  backend_options = backend_options.merge(backend_parameters) if backend_parameters
98
- Hiera.debug "Calling hiera with '#{backend_name}'..."
98
+ Hiera.debug("[hiera-router] Calling hiera with '#{backend_name}'...")
99
99
  if backend = backends[backend_name]
100
100
  result = backend.lookup(backend_options[:key], backend_options[:scope], nil, backend_options[:resolution_type])
101
101
  else
102
102
  Hiera.warn "Backend '#{backend_name}' was not configured; returning the data as-is."
103
103
  result = data
104
104
  end
105
- Hiera.debug "Call to '#{backend_name}' finished."
105
+ Hiera.debug("[hiera-router] Call to '#{backend_name}' finished.")
106
106
  return result
107
107
  else
108
108
  Backend.parse_string(data, scope)
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Vandeginste