dop_common 0.14.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/dop_common/thread_context_logger.rb +10 -2
- data/lib/dop_common/version.rb +1 -1
- data/lib/hiera/backend/dop_backend.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06db02a6e3c138e0cefb89889a14bc57af725157
|
4
|
+
data.tar.gz: 19e104c7a7b4cece0fb0858bfb3399a5c83ef3db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f960ca073dda2ee7ddf9094ee54a4ea2c75baddc0570293943ec73116965dff1b24396df2a5d6b400d75d79d0ebb0b14b89bb564d0a347c63d92758b623d6af
|
7
|
+
data.tar.gz: 64da82634072e695027fad76e8cda5ffe53bfb5afa613385e245eae337d86e79f93492acb49c358e13d7b91ff59983f865404483ad3cf5e2fe8e92ca6f4f4b24
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to dop_common will be documented in this file.
|
3
3
|
|
4
|
+
## [0.15.0]
|
5
|
+
### Added
|
6
|
+
- Some small API addition to the log stuff to get the current log file
|
7
|
+
|
4
8
|
## [0.14.2] - 2017-05-01
|
5
9
|
### Fixed
|
6
10
|
- Some errors in the config class when using ruby 1.8.7
|
@@ -39,11 +39,19 @@ module DopCommon
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
def current_log_file
|
43
|
+
context = @threads[Thread.current.object_id.to_s]
|
44
|
+
log_file(context)
|
45
|
+
end
|
46
|
+
|
42
47
|
private
|
43
48
|
|
49
|
+
def log_file(context)
|
50
|
+
File.join(@log_path, context)
|
51
|
+
end
|
52
|
+
|
44
53
|
def add(context)
|
45
|
-
|
46
|
-
logger = Logger.new(log_file)
|
54
|
+
logger = Logger.new(log_file(context))
|
47
55
|
if context == 'all'
|
48
56
|
logger.formatter = Logger::Formatter.new
|
49
57
|
else
|
data/lib/dop_common/version.rb
CHANGED
@@ -26,13 +26,14 @@ class Hiera
|
|
26
26
|
Hiera.debug('DOP Plan Cache Loaded')
|
27
27
|
end
|
28
28
|
|
29
|
-
def lookup(key, scope, order_override, resolution_type, context)
|
29
|
+
def lookup(key, scope, order_override, resolution_type, context = nil)
|
30
30
|
node_name = scope['::clientcert']
|
31
31
|
plan = @plan_cache.plan_by_node(node_name)
|
32
32
|
|
33
33
|
if plan.nil?
|
34
34
|
Hiera.debug("Node #{node_name} not found in any plan")
|
35
|
-
throw(:no_such_key)
|
35
|
+
#throw(:no_such_key)
|
36
|
+
return nil
|
36
37
|
else
|
37
38
|
Hiera.debug("Node #{node_name} found in plan #{plan.name}")
|
38
39
|
plan_lookup(plan, key, scope, order_override, resolution_type, context)
|
@@ -63,7 +64,7 @@ class Hiera
|
|
63
64
|
next
|
64
65
|
end
|
65
66
|
end
|
66
|
-
throw(:no_such_key) unless found
|
67
|
+
#throw(:no_such_key) unless found
|
67
68
|
return answer
|
68
69
|
end
|
69
70
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dop_common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Zuber
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-05-
|
12
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashdiff
|