diff options
author | Ken Barber <ken@bob.sh> | 2011-06-29 23:39:23 +0100 |
---|---|---|
committer | Ken Barber <ken@bob.sh> | 2011-06-29 23:39:23 +0100 |
commit | c7c8647634df07f0de0e662360eb4567f7c20770 (patch) | |
tree | df875d96e38e606fdb89cdb04df667151f152efe /lib | |
parent | 464fb1f41b9c7197fcaade6831b80d6390829ec7 (diff) | |
download | puppet-stdlib-c7c8647634df07f0de0e662360eb4567f7c20770.tar.gz puppet-stdlib-c7c8647634df07f0de0e662360eb4567f7c20770.tar.bz2 |
Move require inside function for kwalify.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/parser/functions/kwalify.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/kwalify.rb b/lib/puppet/parser/functions/kwalify.rb index 7238f84..49b9aeb 100644 --- a/lib/puppet/parser/functions/kwalify.rb +++ b/lib/puppet/parser/functions/kwalify.rb @@ -2,8 +2,6 @@ # kwalify.rb # -require 'kwalify' - module Puppet::Parser::Functions newfunction(:kwalify, :type => :statement, :doc => <<-EOS This function uses kwalify to validate Puppet data structures against Kwalify @@ -17,6 +15,8 @@ schemas. schema = args[0] document = args[1] + require 'kwalify' + validator = Kwalify::Validator.new(schema) errors = validator.validate(document) |