kafo 0.0.16 → 0.0.17

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4febb461aa6503caff954eb79a85bfb7e9fd2872
4
- data.tar.gz: 6e60596106b93a4a89183e149d7ab7d5a4a528af
3
+ metadata.gz: 50b4317c6753f887ed5f82958ccddb7c7231b0c6
4
+ data.tar.gz: 80e53f9fc0c40a7898beb5cd1df07e4f2159d2bb
5
5
  SHA512:
6
- metadata.gz: 804aeb0e1504ac6bd13dbf6c6a92b55f790bb13c12aa012363cf23434c05d254156550d53a83fa6fcc551d5ac5c0b8c858c77d1bfa87ec23d63603bcfc698c11
7
- data.tar.gz: efa517c78ba534fd5fc1ae260ce528e474ccd3e6f288db6cfa3d83c4a5108ccd96ccf1549956a67fa4a5256961a97461058847e53e7134f020d2c06023a57078
6
+ metadata.gz: 1d6874b159789e97761e7ac8cb1f86595a5d167d23cd1720f582914dea450408fb37c3c03269451f5ce38723e3e1d4b88abbd5cdedda284600d8976bfc0fd434
7
+ data.tar.gz: 6c9fb42c37dd21084cd32a0895eb3b284a918acbe8d37727d64953b928fbf511e7ffd23803d9b6e13310f5dbf28a44518ddbeebcd17cefa0d7a74aa33a739d97
@@ -45,13 +45,25 @@ class Param
45
45
  # also we want to clone validations so we don't interfere
46
46
  validations.map! do |v|
47
47
  v = v.clone
48
- args = v.arguments.select { |a| a.to_s == "$#{self.name}" }
48
+ if v.name == 'validate_re'
49
+ # validate_re does not take more variables as arguments, instead we need to pass all arguments
50
+ args = v.arguments
51
+ else
52
+ args = v.arguments.select { |a| a.to_s == "$#{self.name}" }
53
+ end
49
54
  v.arguments = Puppet::Parser::AST::ASTArray.new :children => args
50
55
  v
51
56
  end
52
57
 
53
58
  validator = Validator.new([self])
54
- validations.map { |v| v.evaluate(validator) }.all?
59
+ validations.map! do |v|
60
+ result = v.evaluate(validator)
61
+ # validate_re returns nil if succeeds
62
+ result = true if v.name == 'validate_re' && result.nil?
63
+ result
64
+ end
65
+
66
+ validations.all?
55
67
  end
56
68
 
57
69
  # To be overwritten in children
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Kafo
3
- VERSION = "0.0.16"
3
+ VERSION = "0.0.17"
4
4
  end
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.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Hulan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-26 00:00:00.000000000 Z
11
+ date: 2013-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler