kafo_parsers 0.0.1 → 0.0.2

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: b30e88b47bab4b2e93f985edad54bbaf15d39f88
4
- data.tar.gz: e55504058e7761a4007713304e4fa7f170aec79e
3
+ metadata.gz: c53da59ae231825b90091173bd1a154a48a1d4f2
4
+ data.tar.gz: 70b95df6b66b8000e810de4199fe855ba34196b2
5
5
  SHA512:
6
- metadata.gz: dda98ff6406272517880053973c475be3edd7ceeebd9133996fd0ba0a31f03d20f9ea36502f20149a9fdcaa22d5b5964fbd35c7ffc96bf964c5e5956501af570
7
- data.tar.gz: 4bc186885a9e4a0890343741c85bc8049bd26c18a3ed94cccf4aeb4d8e4d00f4a3dc8c48289012397ee3ccdf643835e2d4c2592d81113dbdfc6f37664102aeb5
6
+ metadata.gz: e517f68f980eb15d066c3f5420346b22bc935a7fc1445f41bb54beaf7b6b17742842796fdbbc01ac9cec7f203ee9e5cb6afa27f338fc7f28300af44760fd7d11
7
+ data.tar.gz: 357f3bae6f4e56e5b592978e879123fa7bbd9d0251ec3e2e4176af380d85323e0748e4e2cb112fccf0d841083c9a0f18fb97e1c6f2e7c6006992d1ad965bf9c4
data/README.md CHANGED
@@ -4,6 +4,9 @@ This gem can parse values, validations, documentation, types, groups and
4
4
  conditions of parameters from your puppet modules. Only thing you have
5
5
  to do is provide a path to manifest file you want to be parsed.
6
6
 
7
+ The library is used in [Kafo](https://github.com/theforeman/kafo), which can
8
+ be used to get an idea of what's possible to build on top of this library.
9
+
7
10
  ## Installation
8
11
 
9
12
  Add this line to your application's Gemfile:
@@ -22,8 +25,8 @@ Or install it yourself as:
22
25
 
23
26
  To parse file and see parsed information
24
27
  ```ruby
25
- require 'kafo_parsers/kafo_module_parser'
26
- hash = KafoParsers::KafoModuleParser.parse('/puppet/module/manifests/init.pp')
28
+ require 'kafo_parsers/puppet_module_parser'
29
+ hash = KafoParsers::PuppetModuleParser.parse('/puppet/module/manifests/init.pp')
27
30
  p hash
28
31
  ```
29
32
 
@@ -55,6 +55,7 @@ module KafoParsers
55
55
  end
56
56
 
57
57
  def validations(param = nil)
58
+ return [] if @object.code.nil?
58
59
  @object.code.select { |stmt| stmt.is_a?(Puppet::Parser::AST::Function) && stmt.name =~ /^validate_/ }
59
60
  end
60
61
 
@@ -1,3 +1,3 @@
1
1
  module KafoParsers
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafo_parsers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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-03-10 00:00:00.000000000 Z
11
+ date: 2014-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler