summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKen Barber <ken@bob.sh>2011-06-29 23:39:23 +0100
committerKen Barber <ken@bob.sh>2011-06-29 23:39:23 +0100
commitc7c8647634df07f0de0e662360eb4567f7c20770 (patch)
treedf875d96e38e606fdb89cdb04df667151f152efe /lib
parent464fb1f41b9c7197fcaade6831b80d6390829ec7 (diff)
downloadpuppet-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.rb4
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)