jerakia 0.5.3 → 1.0.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/lib/jerakia/lookup/plugin/hiera.rb +4 -8
- data/lib/jerakia/version.rb +1 -1
- metadata +2 -3
- data/lib/jerakia/plugins/lookup/confine.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14776c682ec1522eb2d67cff57195ea216f4764d
|
4
|
+
data.tar.gz: 6d4bf3b22efdc6c0b13f18eef464964dbbef1c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cf71c5ca0674c56990a42040b004b37eb2f5c847e09f16b696178101225a1e6004cd3a3359286aaa86b63130c5db97a333d3f000c57ecfb928b46f02d8235c4
|
7
|
+
data.tar.gz: d56d1107d9a52a0bd2c7df363a953003717194d3660b960e1b1cc0e8926ccd5b7612c71008ed22337c10dfb0319ac7187e92590617a31c77ec8ca0b9b0bf2d37
|
@@ -10,7 +10,9 @@ class Jerakia::Lookup::Plugin
|
|
10
10
|
module Hiera
|
11
11
|
|
12
12
|
def autorun
|
13
|
-
request.
|
13
|
+
if request.namespace.length > 0
|
14
|
+
request.key.prepend("#{request.namespace.join('::')}::")
|
15
|
+
end
|
14
16
|
request.namespace=[]
|
15
17
|
end
|
16
18
|
|
@@ -19,13 +21,7 @@ class Jerakia::Lookup::Plugin
|
|
19
21
|
end
|
20
22
|
|
21
23
|
def calling_module
|
22
|
-
|
23
|
-
request.namespace[0]
|
24
|
-
else
|
25
|
-
Jerakia.log.error("hiera_compat plugin tried to use calling_module but there is no namespace declared. Ensure that calling_module is called before hiera_compat in the policy")
|
26
|
-
end
|
24
|
+
request.key.split('::')[0]
|
27
25
|
end
|
28
26
|
end
|
29
27
|
end
|
30
|
-
|
31
|
-
|
data/lib/jerakia/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jerakia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig Dunn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -81,7 +81,6 @@ files:
|
|
81
81
|
- lib/jerakia/lookup/plugin.rb
|
82
82
|
- lib/jerakia/lookup/plugin/hiera.rb
|
83
83
|
- lib/jerakia/lookup/pluginfactory.rb
|
84
|
-
- lib/jerakia/plugins/lookup/confine.rb
|
85
84
|
- lib/jerakia/policy.rb
|
86
85
|
- lib/jerakia/request.rb
|
87
86
|
- lib/jerakia/response.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class Jerakia::Lookup
|
2
|
-
module Plugin
|
3
|
-
|
4
|
-
def confine(key=nil,match)
|
5
|
-
if key
|
6
|
-
invalidate unless key[Regexp.new(match)] == key
|
7
|
-
else
|
8
|
-
invalidate
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def exclude(key=nil,match)
|
13
|
-
if key
|
14
|
-
invalidate if key[Regexp.new(match)] == key
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|