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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f73ffc339b00893e3f6cd0821d5571bd8341af92
4
- data.tar.gz: 8ca161791a470335b1f4d36bec29a4e38821bf71
3
+ metadata.gz: 14776c682ec1522eb2d67cff57195ea216f4764d
4
+ data.tar.gz: 6d4bf3b22efdc6c0b13f18eef464964dbbef1c63
5
5
  SHA512:
6
- metadata.gz: 8a40caa27f56a2f0f650b6941cd3041334029bb6105896a8d6e779ed9b971740023b0ed98d08f8dc087933e9ee99b7225f85194f0ea3d2ae0b02dd907a96e9cf
7
- data.tar.gz: cf8fb3c40e56f1bda28f4cfc7346616b9941f3d779240f67718fe37797c23e2ce0cf4efd9f85e0c2f3f31b59f88091e5e80ad59552b0581e74807286679f487f
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.key.prepend("#{request.namespace.join('::')}::")
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
- if request.namespace.length > 0
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
-
@@ -4,6 +4,6 @@ class Jerakia
4
4
  #
5
5
  # This should be updated when a new gem is released and it is read from the gemspec file
6
6
  #
7
- VERSION = "0.5.3"
7
+ VERSION = "1.0.0"
8
8
 
9
9
  end
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.5.3
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-06-07 00:00:00.000000000 Z
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
-