kafo 0.3.12 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kafo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/kafo/puppet_module_parser.rb +8 -3
- data/lib/kafo/version.rb +1 -1
- 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: dd5b4f2364153ba6690849b0cd08ebcd09b4eb89
|
4
|
+
data.tar.gz: 9ac5cbef686845a19bd1060f8b7df8c18bab47b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2c23fd7953c7d3efda843dede39af12180d529ad317e065ce297d7c1f9b9a21595cc4b95f1ce485e1d4e172e736372db2d02b5f2f9970da814299e600ff9108
|
7
|
+
data.tar.gz: 82e5bbf8b98c25017f5c1d075f2f7c5ebd3cc69387ddd2f5e20c52357c23cab20a992f57b9b23d7d2a5fa6021e1fffb9f446c609a3268743f99c27d038c1a5e8
|
@@ -24,9 +24,13 @@ module Kafo
|
|
24
24
|
def initialize(file)
|
25
25
|
@file = file
|
26
26
|
raise ModuleName, "File not found #{file}, check you answer file" unless File.exists?(file)
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
Puppet.settings[:confdir] ||= '/' # just some stubbing
|
28
|
+
if Puppet::Node::Environment.respond_to?(:create)
|
29
|
+
env = Puppet::Node::Environment.create(:production, [], '')
|
30
|
+
else
|
31
|
+
env = Puppet::Node::Environment.new(:production)
|
32
|
+
end
|
33
|
+
parser = Puppet::Parser::Parser.new(env)
|
30
34
|
parser.import(@file)
|
31
35
|
|
32
36
|
# Find object corresponding to class defined in init.pp in list of hostclasses
|
@@ -39,6 +43,7 @@ module Kafo
|
|
39
43
|
ast_type = ast_objects.last
|
40
44
|
@object = ast_type.last if ast_type.last.file == file
|
41
45
|
end
|
46
|
+
parser
|
42
47
|
end
|
43
48
|
|
44
49
|
# TODO - store parsed object type (Puppet::Parser::AST::Variable must be dumped later)
|
data/lib/kafo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kafo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Hulan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|